Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Correlation
- type CorrelationClient
- func (c *CorrelationClient) Create() *CorrelationCreate
- func (c *CorrelationClient) CreateBulk(builders ...*CorrelationCreate) *CorrelationCreateBulk
- func (c *CorrelationClient) Delete() *CorrelationDelete
- func (c *CorrelationClient) DeleteOne(co *Correlation) *CorrelationDeleteOne
- func (c *CorrelationClient) DeleteOneID(id int) *CorrelationDeleteOne
- func (c *CorrelationClient) Get(ctx context.Context, id int) (*Correlation, error)
- func (c *CorrelationClient) GetX(ctx context.Context, id int) *Correlation
- func (c *CorrelationClient) Hooks() []Hook
- func (c *CorrelationClient) Query() *CorrelationQuery
- func (c *CorrelationClient) QueryLeft(co *Correlation) *DatasetQuery
- func (c *CorrelationClient) QueryRight(co *Correlation) *DatasetQuery
- func (c *CorrelationClient) Update() *CorrelationUpdate
- func (c *CorrelationClient) UpdateOne(co *Correlation) *CorrelationUpdateOne
- func (c *CorrelationClient) UpdateOneID(id int) *CorrelationUpdateOne
- func (c *CorrelationClient) Use(hooks ...Hook)
- type CorrelationCreate
- func (cc *CorrelationCreate) Mutation() *CorrelationMutation
- func (cc *CorrelationCreate) Save(ctx context.Context) (*Correlation, error)
- func (cc *CorrelationCreate) SaveX(ctx context.Context) *Correlation
- func (cc *CorrelationCreate) SetCoef(f float64) *CorrelationCreate
- func (cc *CorrelationCreate) SetCreateTime(t time.Time) *CorrelationCreate
- func (cc *CorrelationCreate) SetGranularity(c correlation.Granularity) *CorrelationCreate
- func (cc *CorrelationCreate) SetLeft(d *Dataset) *CorrelationCreate
- func (cc *CorrelationCreate) SetLeftID(id int) *CorrelationCreate
- func (cc *CorrelationCreate) SetNillableCreateTime(t *time.Time) *CorrelationCreate
- func (cc *CorrelationCreate) SetNillableGranularity(c *correlation.Granularity) *CorrelationCreate
- func (cc *CorrelationCreate) SetNillableUpdateTime(t *time.Time) *CorrelationCreate
- func (cc *CorrelationCreate) SetP(f float64) *CorrelationCreate
- func (cc *CorrelationCreate) SetR2(f float64) *CorrelationCreate
- func (cc *CorrelationCreate) SetRight(d *Dataset) *CorrelationCreate
- func (cc *CorrelationCreate) SetRightID(id int) *CorrelationCreate
- func (cc *CorrelationCreate) SetType(s string) *CorrelationCreate
- func (cc *CorrelationCreate) SetUpdateTime(t time.Time) *CorrelationCreate
- type CorrelationCreateBulk
- type CorrelationDelete
- type CorrelationDeleteOne
- type CorrelationEdges
- type CorrelationGroupBy
- func (cgb *CorrelationGroupBy) Aggregate(fns ...AggregateFunc) *CorrelationGroupBy
- func (cgb *CorrelationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (cgb *CorrelationGroupBy) BoolX(ctx context.Context) bool
- func (cgb *CorrelationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *CorrelationGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *CorrelationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (cgb *CorrelationGroupBy) Float64X(ctx context.Context) float64
- func (cgb *CorrelationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *CorrelationGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *CorrelationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (cgb *CorrelationGroupBy) IntX(ctx context.Context) int
- func (cgb *CorrelationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *CorrelationGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CorrelationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *CorrelationGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *CorrelationGroupBy) String(ctx context.Context) (_ string, err error)
- func (cgb *CorrelationGroupBy) StringX(ctx context.Context) string
- func (cgb *CorrelationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *CorrelationGroupBy) StringsX(ctx context.Context) []string
- type CorrelationMutation
- func (m *CorrelationMutation) AddCoef(f float64)
- func (m *CorrelationMutation) AddField(name string, value ent.Value) error
- func (m *CorrelationMutation) AddP(f float64)
- func (m *CorrelationMutation) AddR2(f float64)
- func (m *CorrelationMutation) AddedCoef() (r float64, exists bool)
- func (m *CorrelationMutation) AddedEdges() []string
- func (m *CorrelationMutation) AddedField(name string) (ent.Value, bool)
- func (m *CorrelationMutation) AddedFields() []string
- func (m *CorrelationMutation) AddedIDs(name string) []ent.Value
- func (m *CorrelationMutation) AddedP() (r float64, exists bool)
- func (m *CorrelationMutation) AddedR2() (r float64, exists bool)
- func (m *CorrelationMutation) ClearEdge(name string) error
- func (m *CorrelationMutation) ClearField(name string) error
- func (m *CorrelationMutation) ClearLeft()
- func (m *CorrelationMutation) ClearRight()
- func (m *CorrelationMutation) ClearedEdges() []string
- func (m *CorrelationMutation) ClearedFields() []string
- func (m CorrelationMutation) Client() *Client
- func (m *CorrelationMutation) Coef() (r float64, exists bool)
- func (m *CorrelationMutation) CreateTime() (r time.Time, exists bool)
- func (m *CorrelationMutation) EdgeCleared(name string) bool
- func (m *CorrelationMutation) Field(name string) (ent.Value, bool)
- func (m *CorrelationMutation) FieldCleared(name string) bool
- func (m *CorrelationMutation) Fields() []string
- func (m *CorrelationMutation) GetType() (r string, exists bool)
- func (m *CorrelationMutation) Granularity() (r correlation.Granularity, exists bool)
- func (m *CorrelationMutation) ID() (id int, exists bool)
- func (m *CorrelationMutation) LeftCleared() bool
- func (m *CorrelationMutation) LeftID() (id int, exists bool)
- func (m *CorrelationMutation) LeftIDs() (ids []int)
- func (m *CorrelationMutation) OldCoef(ctx context.Context) (v float64, err error)
- func (m *CorrelationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *CorrelationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CorrelationMutation) OldGranularity(ctx context.Context) (v correlation.Granularity, err error)
- func (m *CorrelationMutation) OldP(ctx context.Context) (v float64, err error)
- func (m *CorrelationMutation) OldR2(ctx context.Context) (v float64, err error)
- func (m *CorrelationMutation) OldType(ctx context.Context) (v string, err error)
- func (m *CorrelationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *CorrelationMutation) Op() Op
- func (m *CorrelationMutation) P() (r float64, exists bool)
- func (m *CorrelationMutation) R2() (r float64, exists bool)
- func (m *CorrelationMutation) RemovedEdges() []string
- func (m *CorrelationMutation) RemovedIDs(name string) []ent.Value
- func (m *CorrelationMutation) ResetCoef()
- func (m *CorrelationMutation) ResetCreateTime()
- func (m *CorrelationMutation) ResetEdge(name string) error
- func (m *CorrelationMutation) ResetField(name string) error
- func (m *CorrelationMutation) ResetGranularity()
- func (m *CorrelationMutation) ResetLeft()
- func (m *CorrelationMutation) ResetP()
- func (m *CorrelationMutation) ResetR2()
- func (m *CorrelationMutation) ResetRight()
- func (m *CorrelationMutation) ResetType()
- func (m *CorrelationMutation) ResetUpdateTime()
- func (m *CorrelationMutation) RightCleared() bool
- func (m *CorrelationMutation) RightID() (id int, exists bool)
- func (m *CorrelationMutation) RightIDs() (ids []int)
- func (m *CorrelationMutation) SetCoef(f float64)
- func (m *CorrelationMutation) SetCreateTime(t time.Time)
- func (m *CorrelationMutation) SetField(name string, value ent.Value) error
- func (m *CorrelationMutation) SetGranularity(c correlation.Granularity)
- func (m *CorrelationMutation) SetLeftID(id int)
- func (m *CorrelationMutation) SetP(f float64)
- func (m *CorrelationMutation) SetR2(f float64)
- func (m *CorrelationMutation) SetRightID(id int)
- func (m *CorrelationMutation) SetType(s string)
- func (m *CorrelationMutation) SetUpdateTime(t time.Time)
- func (m CorrelationMutation) Tx() (*Tx, error)
- func (m *CorrelationMutation) Type() string
- func (m *CorrelationMutation) UpdateTime() (r time.Time, exists bool)
- type CorrelationQuery
- func (cq *CorrelationQuery) All(ctx context.Context) ([]*Correlation, error)
- func (cq *CorrelationQuery) AllX(ctx context.Context) []*Correlation
- func (cq *CorrelationQuery) Clone() *CorrelationQuery
- func (cq *CorrelationQuery) Count(ctx context.Context) (int, error)
- func (cq *CorrelationQuery) CountX(ctx context.Context) int
- func (cq *CorrelationQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CorrelationQuery) ExistX(ctx context.Context) bool
- func (cq *CorrelationQuery) First(ctx context.Context) (*Correlation, error)
- func (cq *CorrelationQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CorrelationQuery) FirstIDX(ctx context.Context) int
- func (cq *CorrelationQuery) FirstX(ctx context.Context) *Correlation
- func (cq *CorrelationQuery) GroupBy(field string, fields ...string) *CorrelationGroupBy
- func (cq *CorrelationQuery) IDs(ctx context.Context) ([]int, error)
- func (cq *CorrelationQuery) IDsX(ctx context.Context) []int
- func (cq *CorrelationQuery) Limit(limit int) *CorrelationQuery
- func (cq *CorrelationQuery) Offset(offset int) *CorrelationQuery
- func (cq *CorrelationQuery) Only(ctx context.Context) (*Correlation, error)
- func (cq *CorrelationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CorrelationQuery) OnlyIDX(ctx context.Context) int
- func (cq *CorrelationQuery) OnlyX(ctx context.Context) *Correlation
- func (cq *CorrelationQuery) Order(o ...OrderFunc) *CorrelationQuery
- func (cq *CorrelationQuery) QueryLeft() *DatasetQuery
- func (cq *CorrelationQuery) QueryRight() *DatasetQuery
- func (cq *CorrelationQuery) Select(field string, fields ...string) *CorrelationSelect
- func (cq *CorrelationQuery) Where(ps ...predicate.Correlation) *CorrelationQuery
- func (cq *CorrelationQuery) WithLeft(opts ...func(*DatasetQuery)) *CorrelationQuery
- func (cq *CorrelationQuery) WithRight(opts ...func(*DatasetQuery)) *CorrelationQuery
- type CorrelationSelect
- func (cs *CorrelationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (cs *CorrelationSelect) BoolX(ctx context.Context) bool
- func (cs *CorrelationSelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *CorrelationSelect) BoolsX(ctx context.Context) []bool
- func (cs *CorrelationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (cs *CorrelationSelect) Float64X(ctx context.Context) float64
- func (cs *CorrelationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *CorrelationSelect) Float64sX(ctx context.Context) []float64
- func (cs *CorrelationSelect) Int(ctx context.Context) (_ int, err error)
- func (cs *CorrelationSelect) IntX(ctx context.Context) int
- func (cs *CorrelationSelect) Ints(ctx context.Context) ([]int, error)
- func (cs *CorrelationSelect) IntsX(ctx context.Context) []int
- func (cs *CorrelationSelect) Scan(ctx context.Context, v interface{}) error
- func (cs *CorrelationSelect) ScanX(ctx context.Context, v interface{})
- func (cs *CorrelationSelect) String(ctx context.Context) (_ string, err error)
- func (cs *CorrelationSelect) StringX(ctx context.Context) string
- func (cs *CorrelationSelect) Strings(ctx context.Context) ([]string, error)
- func (cs *CorrelationSelect) StringsX(ctx context.Context) []string
- type CorrelationUpdate
- func (cu *CorrelationUpdate) AddCoef(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) AddP(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) AddR2(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) ClearLeft() *CorrelationUpdate
- func (cu *CorrelationUpdate) ClearRight() *CorrelationUpdate
- func (cu *CorrelationUpdate) Exec(ctx context.Context) error
- func (cu *CorrelationUpdate) ExecX(ctx context.Context)
- func (cu *CorrelationUpdate) Mutation() *CorrelationMutation
- func (cu *CorrelationUpdate) Save(ctx context.Context) (int, error)
- func (cu *CorrelationUpdate) SaveX(ctx context.Context) int
- func (cu *CorrelationUpdate) SetCoef(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetGranularity(c correlation.Granularity) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetLeft(d *Dataset) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetLeftID(id int) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetNillableGranularity(c *correlation.Granularity) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetP(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetR2(f float64) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetRight(d *Dataset) *CorrelationUpdate
- func (cu *CorrelationUpdate) SetRightID(id int) *CorrelationUpdate
- func (cu *CorrelationUpdate) Where(ps ...predicate.Correlation) *CorrelationUpdate
- type CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) AddCoef(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) AddP(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) AddR2(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) ClearLeft() *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) ClearRight() *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) Exec(ctx context.Context) error
- func (cuo *CorrelationUpdateOne) ExecX(ctx context.Context)
- func (cuo *CorrelationUpdateOne) Mutation() *CorrelationMutation
- func (cuo *CorrelationUpdateOne) Save(ctx context.Context) (*Correlation, error)
- func (cuo *CorrelationUpdateOne) SaveX(ctx context.Context) *Correlation
- func (cuo *CorrelationUpdateOne) SetCoef(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetGranularity(c correlation.Granularity) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetLeft(d *Dataset) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetLeftID(id int) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetNillableGranularity(c *correlation.Granularity) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetP(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetR2(f float64) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetRight(d *Dataset) *CorrelationUpdateOne
- func (cuo *CorrelationUpdateOne) SetRightID(id int) *CorrelationUpdateOne
- type Correlations
- type Dataset
- func (d *Dataset) QueryDatasetParams() *DatasetParamsQuery
- func (d *Dataset) QueryIndicator() *IndicatorQuery
- func (d *Dataset) QueryLeft() *CorrelationQuery
- func (d *Dataset) QueryObservations() *ObservationQuery
- func (d *Dataset) QueryRight() *CorrelationQuery
- func (d *Dataset) QueryUser() *UserQuery
- func (d *Dataset) String() string
- func (d *Dataset) Unwrap() *Dataset
- func (d *Dataset) Update() *DatasetUpdateOne
- type DatasetClient
- func (c *DatasetClient) Create() *DatasetCreate
- func (c *DatasetClient) CreateBulk(builders ...*DatasetCreate) *DatasetCreateBulk
- func (c *DatasetClient) Delete() *DatasetDelete
- func (c *DatasetClient) DeleteOne(d *Dataset) *DatasetDeleteOne
- func (c *DatasetClient) DeleteOneID(id int) *DatasetDeleteOne
- func (c *DatasetClient) Get(ctx context.Context, id int) (*Dataset, error)
- func (c *DatasetClient) GetX(ctx context.Context, id int) *Dataset
- func (c *DatasetClient) Hooks() []Hook
- func (c *DatasetClient) Query() *DatasetQuery
- func (c *DatasetClient) QueryDatasetParams(d *Dataset) *DatasetParamsQuery
- func (c *DatasetClient) QueryIndicator(d *Dataset) *IndicatorQuery
- func (c *DatasetClient) QueryLeft(d *Dataset) *CorrelationQuery
- func (c *DatasetClient) QueryObservations(d *Dataset) *ObservationQuery
- func (c *DatasetClient) QueryRight(d *Dataset) *CorrelationQuery
- func (c *DatasetClient) QueryUser(d *Dataset) *UserQuery
- func (c *DatasetClient) Update() *DatasetUpdate
- func (c *DatasetClient) UpdateOne(d *Dataset) *DatasetUpdateOne
- func (c *DatasetClient) UpdateOneID(id int) *DatasetUpdateOne
- func (c *DatasetClient) Use(hooks ...Hook)
- type DatasetCreate
- func (dc *DatasetCreate) AddLeft(c ...*Correlation) *DatasetCreate
- func (dc *DatasetCreate) AddLeftIDs(ids ...int) *DatasetCreate
- func (dc *DatasetCreate) AddObservationIDs(ids ...int) *DatasetCreate
- func (dc *DatasetCreate) AddObservations(o ...*Observation) *DatasetCreate
- func (dc *DatasetCreate) AddRight(c ...*Correlation) *DatasetCreate
- func (dc *DatasetCreate) AddRightIDs(ids ...int) *DatasetCreate
- func (dc *DatasetCreate) Mutation() *DatasetMutation
- func (dc *DatasetCreate) Save(ctx context.Context) (*Dataset, error)
- func (dc *DatasetCreate) SaveX(ctx context.Context) *Dataset
- func (dc *DatasetCreate) SetCreateTime(t time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetDatasetParams(d *DatasetParams) *DatasetCreate
- func (dc *DatasetCreate) SetDatasetParamsID(id int) *DatasetCreate
- func (dc *DatasetCreate) SetIndicator(i *Indicator) *DatasetCreate
- func (dc *DatasetCreate) SetIndicatorID(id int) *DatasetCreate
- func (dc *DatasetCreate) SetNillableCreateTime(t *time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetNillableDatasetParamsID(id *int) *DatasetCreate
- func (dc *DatasetCreate) SetNillableShared(b *bool) *DatasetCreate
- func (dc *DatasetCreate) SetNillableSource(s *string) *DatasetCreate
- func (dc *DatasetCreate) SetNillableUpdateTime(t *time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetNillableUserID(id *int) *DatasetCreate
- func (dc *DatasetCreate) SetShared(b bool) *DatasetCreate
- func (dc *DatasetCreate) SetSource(s string) *DatasetCreate
- func (dc *DatasetCreate) SetUpdateTime(t time.Time) *DatasetCreate
- func (dc *DatasetCreate) SetUser(u *User) *DatasetCreate
- func (dc *DatasetCreate) SetUserID(id int) *DatasetCreate
- type DatasetCreateBulk
- type DatasetDelete
- type DatasetDeleteOne
- type DatasetEdges
- func (e DatasetEdges) DatasetParamsOrErr() (*DatasetParams, error)
- func (e DatasetEdges) IndicatorOrErr() (*Indicator, error)
- func (e DatasetEdges) LeftOrErr() ([]*Correlation, error)
- func (e DatasetEdges) ObservationsOrErr() ([]*Observation, error)
- func (e DatasetEdges) RightOrErr() ([]*Correlation, error)
- func (e DatasetEdges) UserOrErr() (*User, error)
- type DatasetGroupBy
- func (dgb *DatasetGroupBy) Aggregate(fns ...AggregateFunc) *DatasetGroupBy
- func (dgb *DatasetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dgb *DatasetGroupBy) BoolX(ctx context.Context) bool
- func (dgb *DatasetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DatasetGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DatasetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dgb *DatasetGroupBy) Float64X(ctx context.Context) float64
- func (dgb *DatasetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DatasetGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DatasetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dgb *DatasetGroupBy) IntX(ctx context.Context) int
- func (dgb *DatasetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DatasetGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DatasetGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DatasetGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DatasetGroupBy) String(ctx context.Context) (_ string, err error)
- func (dgb *DatasetGroupBy) StringX(ctx context.Context) string
- func (dgb *DatasetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DatasetGroupBy) StringsX(ctx context.Context) []string
- type DatasetMutation
- func (m *DatasetMutation) AddField(name string, value ent.Value) error
- func (m *DatasetMutation) AddLeftIDs(ids ...int)
- func (m *DatasetMutation) AddObservationIDs(ids ...int)
- func (m *DatasetMutation) AddRightIDs(ids ...int)
- func (m *DatasetMutation) AddedEdges() []string
- func (m *DatasetMutation) AddedField(name string) (ent.Value, bool)
- func (m *DatasetMutation) AddedFields() []string
- func (m *DatasetMutation) AddedIDs(name string) []ent.Value
- func (m *DatasetMutation) ClearDatasetParams()
- func (m *DatasetMutation) ClearEdge(name string) error
- func (m *DatasetMutation) ClearField(name string) error
- func (m *DatasetMutation) ClearIndicator()
- func (m *DatasetMutation) ClearLeft()
- func (m *DatasetMutation) ClearObservations()
- func (m *DatasetMutation) ClearRight()
- func (m *DatasetMutation) ClearSource()
- func (m *DatasetMutation) ClearUser()
- func (m *DatasetMutation) ClearedEdges() []string
- func (m *DatasetMutation) ClearedFields() []string
- func (m DatasetMutation) Client() *Client
- func (m *DatasetMutation) CreateTime() (r time.Time, exists bool)
- func (m *DatasetMutation) DatasetParamsCleared() bool
- func (m *DatasetMutation) DatasetParamsID() (id int, exists bool)
- func (m *DatasetMutation) DatasetParamsIDs() (ids []int)
- func (m *DatasetMutation) EdgeCleared(name string) bool
- func (m *DatasetMutation) Field(name string) (ent.Value, bool)
- func (m *DatasetMutation) FieldCleared(name string) bool
- func (m *DatasetMutation) Fields() []string
- func (m *DatasetMutation) ID() (id int, exists bool)
- func (m *DatasetMutation) IndicatorCleared() bool
- func (m *DatasetMutation) IndicatorID() (id int, exists bool)
- func (m *DatasetMutation) IndicatorIDs() (ids []int)
- func (m *DatasetMutation) LeftCleared() bool
- func (m *DatasetMutation) LeftIDs() (ids []int)
- func (m *DatasetMutation) ObservationsCleared() bool
- func (m *DatasetMutation) ObservationsIDs() (ids []int)
- func (m *DatasetMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DatasetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DatasetMutation) OldShared(ctx context.Context) (v bool, err error)
- func (m *DatasetMutation) OldSource(ctx context.Context) (v *string, err error)
- func (m *DatasetMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *DatasetMutation) Op() Op
- func (m *DatasetMutation) RemoveLeftIDs(ids ...int)
- func (m *DatasetMutation) RemoveObservationIDs(ids ...int)
- func (m *DatasetMutation) RemoveRightIDs(ids ...int)
- func (m *DatasetMutation) RemovedEdges() []string
- func (m *DatasetMutation) RemovedIDs(name string) []ent.Value
- func (m *DatasetMutation) RemovedLeftIDs() (ids []int)
- func (m *DatasetMutation) RemovedObservationsIDs() (ids []int)
- func (m *DatasetMutation) RemovedRightIDs() (ids []int)
- func (m *DatasetMutation) ResetCreateTime()
- func (m *DatasetMutation) ResetDatasetParams()
- func (m *DatasetMutation) ResetEdge(name string) error
- func (m *DatasetMutation) ResetField(name string) error
- func (m *DatasetMutation) ResetIndicator()
- func (m *DatasetMutation) ResetLeft()
- func (m *DatasetMutation) ResetObservations()
- func (m *DatasetMutation) ResetRight()
- func (m *DatasetMutation) ResetShared()
- func (m *DatasetMutation) ResetSource()
- func (m *DatasetMutation) ResetUpdateTime()
- func (m *DatasetMutation) ResetUser()
- func (m *DatasetMutation) RightCleared() bool
- func (m *DatasetMutation) RightIDs() (ids []int)
- func (m *DatasetMutation) SetCreateTime(t time.Time)
- func (m *DatasetMutation) SetDatasetParamsID(id int)
- func (m *DatasetMutation) SetField(name string, value ent.Value) error
- func (m *DatasetMutation) SetIndicatorID(id int)
- func (m *DatasetMutation) SetShared(b bool)
- func (m *DatasetMutation) SetSource(s string)
- func (m *DatasetMutation) SetUpdateTime(t time.Time)
- func (m *DatasetMutation) SetUserID(id int)
- func (m *DatasetMutation) Shared() (r bool, exists bool)
- func (m *DatasetMutation) Source() (r string, exists bool)
- func (m *DatasetMutation) SourceCleared() bool
- func (m DatasetMutation) Tx() (*Tx, error)
- func (m *DatasetMutation) Type() string
- func (m *DatasetMutation) UpdateTime() (r time.Time, exists bool)
- func (m *DatasetMutation) UserCleared() bool
- func (m *DatasetMutation) UserID() (id int, exists bool)
- func (m *DatasetMutation) UserIDs() (ids []int)
- type DatasetParams
- type DatasetParamsClient
- func (c *DatasetParamsClient) Create() *DatasetParamsCreate
- func (c *DatasetParamsClient) CreateBulk(builders ...*DatasetParamsCreate) *DatasetParamsCreateBulk
- func (c *DatasetParamsClient) Delete() *DatasetParamsDelete
- func (c *DatasetParamsClient) DeleteOne(dp *DatasetParams) *DatasetParamsDeleteOne
- func (c *DatasetParamsClient) DeleteOneID(id int) *DatasetParamsDeleteOne
- func (c *DatasetParamsClient) Get(ctx context.Context, id int) (*DatasetParams, error)
- func (c *DatasetParamsClient) GetX(ctx context.Context, id int) *DatasetParams
- func (c *DatasetParamsClient) Hooks() []Hook
- func (c *DatasetParamsClient) Query() *DatasetParamsQuery
- func (c *DatasetParamsClient) QueryDataset(dp *DatasetParams) *DatasetQuery
- func (c *DatasetParamsClient) Update() *DatasetParamsUpdate
- func (c *DatasetParamsClient) UpdateOne(dp *DatasetParams) *DatasetParamsUpdateOne
- func (c *DatasetParamsClient) UpdateOneID(id int) *DatasetParamsUpdateOne
- func (c *DatasetParamsClient) Use(hooks ...Hook)
- type DatasetParamsCreate
- func (dpc *DatasetParamsCreate) Mutation() *DatasetParamsMutation
- func (dpc *DatasetParamsCreate) Save(ctx context.Context) (*DatasetParams, error)
- func (dpc *DatasetParamsCreate) SaveX(ctx context.Context) *DatasetParams
- func (dpc *DatasetParamsCreate) SetAggregation(da domain.DatasetAggregation) *DatasetParamsCreate
- func (dpc *DatasetParamsCreate) SetDataset(d *Dataset) *DatasetParamsCreate
- func (dpc *DatasetParamsCreate) SetDatasetID(id int) *DatasetParamsCreate
- func (dpc *DatasetParamsCreate) SetStyle(ds domain.DatasetStyle) *DatasetParamsCreate
- type DatasetParamsCreateBulk
- type DatasetParamsDelete
- type DatasetParamsDeleteOne
- type DatasetParamsEdges
- type DatasetParamsGroupBy
- func (dpgb *DatasetParamsGroupBy) Aggregate(fns ...AggregateFunc) *DatasetParamsGroupBy
- func (dpgb *DatasetParamsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dpgb *DatasetParamsGroupBy) BoolX(ctx context.Context) bool
- func (dpgb *DatasetParamsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dpgb *DatasetParamsGroupBy) BoolsX(ctx context.Context) []bool
- func (dpgb *DatasetParamsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dpgb *DatasetParamsGroupBy) Float64X(ctx context.Context) float64
- func (dpgb *DatasetParamsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dpgb *DatasetParamsGroupBy) Float64sX(ctx context.Context) []float64
- func (dpgb *DatasetParamsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dpgb *DatasetParamsGroupBy) IntX(ctx context.Context) int
- func (dpgb *DatasetParamsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dpgb *DatasetParamsGroupBy) IntsX(ctx context.Context) []int
- func (dpgb *DatasetParamsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dpgb *DatasetParamsGroupBy) ScanX(ctx context.Context, v interface{})
- func (dpgb *DatasetParamsGroupBy) String(ctx context.Context) (_ string, err error)
- func (dpgb *DatasetParamsGroupBy) StringX(ctx context.Context) string
- func (dpgb *DatasetParamsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dpgb *DatasetParamsGroupBy) StringsX(ctx context.Context) []string
- type DatasetParamsMutation
- func (m *DatasetParamsMutation) AddField(name string, value ent.Value) error
- func (m *DatasetParamsMutation) AddedEdges() []string
- func (m *DatasetParamsMutation) AddedField(name string) (ent.Value, bool)
- func (m *DatasetParamsMutation) AddedFields() []string
- func (m *DatasetParamsMutation) AddedIDs(name string) []ent.Value
- func (m *DatasetParamsMutation) Aggregation() (r domain.DatasetAggregation, exists bool)
- func (m *DatasetParamsMutation) ClearDataset()
- func (m *DatasetParamsMutation) ClearEdge(name string) error
- func (m *DatasetParamsMutation) ClearField(name string) error
- func (m *DatasetParamsMutation) ClearedEdges() []string
- func (m *DatasetParamsMutation) ClearedFields() []string
- func (m DatasetParamsMutation) Client() *Client
- func (m *DatasetParamsMutation) DatasetCleared() bool
- func (m *DatasetParamsMutation) DatasetID() (id int, exists bool)
- func (m *DatasetParamsMutation) DatasetIDs() (ids []int)
- func (m *DatasetParamsMutation) EdgeCleared(name string) bool
- func (m *DatasetParamsMutation) Field(name string) (ent.Value, bool)
- func (m *DatasetParamsMutation) FieldCleared(name string) bool
- func (m *DatasetParamsMutation) Fields() []string
- func (m *DatasetParamsMutation) ID() (id int, exists bool)
- func (m *DatasetParamsMutation) OldAggregation(ctx context.Context) (v domain.DatasetAggregation, err error)
- func (m *DatasetParamsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DatasetParamsMutation) OldStyle(ctx context.Context) (v domain.DatasetStyle, err error)
- func (m *DatasetParamsMutation) Op() Op
- func (m *DatasetParamsMutation) RemovedEdges() []string
- func (m *DatasetParamsMutation) RemovedIDs(name string) []ent.Value
- func (m *DatasetParamsMutation) ResetAggregation()
- func (m *DatasetParamsMutation) ResetDataset()
- func (m *DatasetParamsMutation) ResetEdge(name string) error
- func (m *DatasetParamsMutation) ResetField(name string) error
- func (m *DatasetParamsMutation) ResetStyle()
- func (m *DatasetParamsMutation) SetAggregation(da domain.DatasetAggregation)
- func (m *DatasetParamsMutation) SetDatasetID(id int)
- func (m *DatasetParamsMutation) SetField(name string, value ent.Value) error
- func (m *DatasetParamsMutation) SetStyle(ds domain.DatasetStyle)
- func (m *DatasetParamsMutation) Style() (r domain.DatasetStyle, exists bool)
- func (m DatasetParamsMutation) Tx() (*Tx, error)
- func (m *DatasetParamsMutation) Type() string
- type DatasetParamsQuery
- func (dpq *DatasetParamsQuery) All(ctx context.Context) ([]*DatasetParams, error)
- func (dpq *DatasetParamsQuery) AllX(ctx context.Context) []*DatasetParams
- func (dpq *DatasetParamsQuery) Clone() *DatasetParamsQuery
- func (dpq *DatasetParamsQuery) Count(ctx context.Context) (int, error)
- func (dpq *DatasetParamsQuery) CountX(ctx context.Context) int
- func (dpq *DatasetParamsQuery) Exist(ctx context.Context) (bool, error)
- func (dpq *DatasetParamsQuery) ExistX(ctx context.Context) bool
- func (dpq *DatasetParamsQuery) First(ctx context.Context) (*DatasetParams, error)
- func (dpq *DatasetParamsQuery) FirstID(ctx context.Context) (id int, err error)
- func (dpq *DatasetParamsQuery) FirstIDX(ctx context.Context) int
- func (dpq *DatasetParamsQuery) FirstX(ctx context.Context) *DatasetParams
- func (dpq *DatasetParamsQuery) GroupBy(field string, fields ...string) *DatasetParamsGroupBy
- func (dpq *DatasetParamsQuery) IDs(ctx context.Context) ([]int, error)
- func (dpq *DatasetParamsQuery) IDsX(ctx context.Context) []int
- func (dpq *DatasetParamsQuery) Limit(limit int) *DatasetParamsQuery
- func (dpq *DatasetParamsQuery) Offset(offset int) *DatasetParamsQuery
- func (dpq *DatasetParamsQuery) Only(ctx context.Context) (*DatasetParams, error)
- func (dpq *DatasetParamsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dpq *DatasetParamsQuery) OnlyIDX(ctx context.Context) int
- func (dpq *DatasetParamsQuery) OnlyX(ctx context.Context) *DatasetParams
- func (dpq *DatasetParamsQuery) Order(o ...OrderFunc) *DatasetParamsQuery
- func (dpq *DatasetParamsQuery) QueryDataset() *DatasetQuery
- func (dpq *DatasetParamsQuery) Select(field string, fields ...string) *DatasetParamsSelect
- func (dpq *DatasetParamsQuery) Where(ps ...predicate.DatasetParams) *DatasetParamsQuery
- func (dpq *DatasetParamsQuery) WithDataset(opts ...func(*DatasetQuery)) *DatasetParamsQuery
- type DatasetParamsSelect
- func (dps *DatasetParamsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (dps *DatasetParamsSelect) BoolX(ctx context.Context) bool
- func (dps *DatasetParamsSelect) Bools(ctx context.Context) ([]bool, error)
- func (dps *DatasetParamsSelect) BoolsX(ctx context.Context) []bool
- func (dps *DatasetParamsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (dps *DatasetParamsSelect) Float64X(ctx context.Context) float64
- func (dps *DatasetParamsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (dps *DatasetParamsSelect) Float64sX(ctx context.Context) []float64
- func (dps *DatasetParamsSelect) Int(ctx context.Context) (_ int, err error)
- func (dps *DatasetParamsSelect) IntX(ctx context.Context) int
- func (dps *DatasetParamsSelect) Ints(ctx context.Context) ([]int, error)
- func (dps *DatasetParamsSelect) IntsX(ctx context.Context) []int
- func (dps *DatasetParamsSelect) Scan(ctx context.Context, v interface{}) error
- func (dps *DatasetParamsSelect) ScanX(ctx context.Context, v interface{})
- func (dps *DatasetParamsSelect) String(ctx context.Context) (_ string, err error)
- func (dps *DatasetParamsSelect) StringX(ctx context.Context) string
- func (dps *DatasetParamsSelect) Strings(ctx context.Context) ([]string, error)
- func (dps *DatasetParamsSelect) StringsX(ctx context.Context) []string
- type DatasetParamsSlice
- type DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) ClearDataset() *DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) Exec(ctx context.Context) error
- func (dpu *DatasetParamsUpdate) ExecX(ctx context.Context)
- func (dpu *DatasetParamsUpdate) Mutation() *DatasetParamsMutation
- func (dpu *DatasetParamsUpdate) Save(ctx context.Context) (int, error)
- func (dpu *DatasetParamsUpdate) SaveX(ctx context.Context) int
- func (dpu *DatasetParamsUpdate) SetAggregation(da domain.DatasetAggregation) *DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) SetDataset(d *Dataset) *DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) SetDatasetID(id int) *DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) SetStyle(ds domain.DatasetStyle) *DatasetParamsUpdate
- func (dpu *DatasetParamsUpdate) Where(ps ...predicate.DatasetParams) *DatasetParamsUpdate
- type DatasetParamsUpdateOne
- func (dpuo *DatasetParamsUpdateOne) ClearDataset() *DatasetParamsUpdateOne
- func (dpuo *DatasetParamsUpdateOne) Exec(ctx context.Context) error
- func (dpuo *DatasetParamsUpdateOne) ExecX(ctx context.Context)
- func (dpuo *DatasetParamsUpdateOne) Mutation() *DatasetParamsMutation
- func (dpuo *DatasetParamsUpdateOne) Save(ctx context.Context) (*DatasetParams, error)
- func (dpuo *DatasetParamsUpdateOne) SaveX(ctx context.Context) *DatasetParams
- func (dpuo *DatasetParamsUpdateOne) SetAggregation(da domain.DatasetAggregation) *DatasetParamsUpdateOne
- func (dpuo *DatasetParamsUpdateOne) SetDataset(d *Dataset) *DatasetParamsUpdateOne
- func (dpuo *DatasetParamsUpdateOne) SetDatasetID(id int) *DatasetParamsUpdateOne
- func (dpuo *DatasetParamsUpdateOne) SetStyle(ds domain.DatasetStyle) *DatasetParamsUpdateOne
- type DatasetQuery
- func (dq *DatasetQuery) All(ctx context.Context) ([]*Dataset, error)
- func (dq *DatasetQuery) AllX(ctx context.Context) []*Dataset
- func (dq *DatasetQuery) Clone() *DatasetQuery
- func (dq *DatasetQuery) Count(ctx context.Context) (int, error)
- func (dq *DatasetQuery) CountX(ctx context.Context) int
- func (dq *DatasetQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DatasetQuery) ExistX(ctx context.Context) bool
- func (dq *DatasetQuery) First(ctx context.Context) (*Dataset, error)
- func (dq *DatasetQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DatasetQuery) FirstIDX(ctx context.Context) int
- func (dq *DatasetQuery) FirstX(ctx context.Context) *Dataset
- func (dq *DatasetQuery) GroupBy(field string, fields ...string) *DatasetGroupBy
- func (dq *DatasetQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DatasetQuery) IDsX(ctx context.Context) []int
- func (dq *DatasetQuery) Limit(limit int) *DatasetQuery
- func (dq *DatasetQuery) Offset(offset int) *DatasetQuery
- func (dq *DatasetQuery) Only(ctx context.Context) (*Dataset, error)
- func (dq *DatasetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DatasetQuery) OnlyIDX(ctx context.Context) int
- func (dq *DatasetQuery) OnlyX(ctx context.Context) *Dataset
- func (dq *DatasetQuery) Order(o ...OrderFunc) *DatasetQuery
- func (dq *DatasetQuery) QueryDatasetParams() *DatasetParamsQuery
- func (dq *DatasetQuery) QueryIndicator() *IndicatorQuery
- func (dq *DatasetQuery) QueryLeft() *CorrelationQuery
- func (dq *DatasetQuery) QueryObservations() *ObservationQuery
- func (dq *DatasetQuery) QueryRight() *CorrelationQuery
- func (dq *DatasetQuery) QueryUser() *UserQuery
- func (dq *DatasetQuery) Select(field string, fields ...string) *DatasetSelect
- func (dq *DatasetQuery) Where(ps ...predicate.Dataset) *DatasetQuery
- func (dq *DatasetQuery) WithDatasetParams(opts ...func(*DatasetParamsQuery)) *DatasetQuery
- func (dq *DatasetQuery) WithIndicator(opts ...func(*IndicatorQuery)) *DatasetQuery
- func (dq *DatasetQuery) WithLeft(opts ...func(*CorrelationQuery)) *DatasetQuery
- func (dq *DatasetQuery) WithObservations(opts ...func(*ObservationQuery)) *DatasetQuery
- func (dq *DatasetQuery) WithRight(opts ...func(*CorrelationQuery)) *DatasetQuery
- func (dq *DatasetQuery) WithUser(opts ...func(*UserQuery)) *DatasetQuery
- type DatasetSelect
- func (ds *DatasetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ds *DatasetSelect) BoolX(ctx context.Context) bool
- func (ds *DatasetSelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DatasetSelect) BoolsX(ctx context.Context) []bool
- func (ds *DatasetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ds *DatasetSelect) Float64X(ctx context.Context) float64
- func (ds *DatasetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DatasetSelect) Float64sX(ctx context.Context) []float64
- func (ds *DatasetSelect) Int(ctx context.Context) (_ int, err error)
- func (ds *DatasetSelect) IntX(ctx context.Context) int
- func (ds *DatasetSelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DatasetSelect) IntsX(ctx context.Context) []int
- func (ds *DatasetSelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DatasetSelect) ScanX(ctx context.Context, v interface{})
- func (ds *DatasetSelect) String(ctx context.Context) (_ string, err error)
- func (ds *DatasetSelect) StringX(ctx context.Context) string
- func (ds *DatasetSelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DatasetSelect) StringsX(ctx context.Context) []string
- type DatasetUpdate
- func (du *DatasetUpdate) AddLeft(c ...*Correlation) *DatasetUpdate
- func (du *DatasetUpdate) AddLeftIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) AddObservationIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) AddObservations(o ...*Observation) *DatasetUpdate
- func (du *DatasetUpdate) AddRight(c ...*Correlation) *DatasetUpdate
- func (du *DatasetUpdate) AddRightIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) ClearDatasetParams() *DatasetUpdate
- func (du *DatasetUpdate) ClearIndicator() *DatasetUpdate
- func (du *DatasetUpdate) ClearLeft() *DatasetUpdate
- func (du *DatasetUpdate) ClearObservations() *DatasetUpdate
- func (du *DatasetUpdate) ClearRight() *DatasetUpdate
- func (du *DatasetUpdate) ClearSource() *DatasetUpdate
- func (du *DatasetUpdate) ClearUser() *DatasetUpdate
- func (du *DatasetUpdate) Exec(ctx context.Context) error
- func (du *DatasetUpdate) ExecX(ctx context.Context)
- func (du *DatasetUpdate) Mutation() *DatasetMutation
- func (du *DatasetUpdate) RemoveLeft(c ...*Correlation) *DatasetUpdate
- func (du *DatasetUpdate) RemoveLeftIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) RemoveObservationIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) RemoveObservations(o ...*Observation) *DatasetUpdate
- func (du *DatasetUpdate) RemoveRight(c ...*Correlation) *DatasetUpdate
- func (du *DatasetUpdate) RemoveRightIDs(ids ...int) *DatasetUpdate
- func (du *DatasetUpdate) Save(ctx context.Context) (int, error)
- func (du *DatasetUpdate) SaveX(ctx context.Context) int
- func (du *DatasetUpdate) SetDatasetParams(d *DatasetParams) *DatasetUpdate
- func (du *DatasetUpdate) SetDatasetParamsID(id int) *DatasetUpdate
- func (du *DatasetUpdate) SetIndicator(i *Indicator) *DatasetUpdate
- func (du *DatasetUpdate) SetIndicatorID(id int) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableDatasetParamsID(id *int) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableShared(b *bool) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableSource(s *string) *DatasetUpdate
- func (du *DatasetUpdate) SetNillableUserID(id *int) *DatasetUpdate
- func (du *DatasetUpdate) SetShared(b bool) *DatasetUpdate
- func (du *DatasetUpdate) SetSource(s string) *DatasetUpdate
- func (du *DatasetUpdate) SetUser(u *User) *DatasetUpdate
- func (du *DatasetUpdate) SetUserID(id int) *DatasetUpdate
- func (du *DatasetUpdate) Where(ps ...predicate.Dataset) *DatasetUpdate
- type DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddLeft(c ...*Correlation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddLeftIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddObservationIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddObservations(o ...*Observation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddRight(c ...*Correlation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) AddRightIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearDatasetParams() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearIndicator() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearLeft() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearObservations() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearRight() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearSource() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) ClearUser() *DatasetUpdateOne
- func (duo *DatasetUpdateOne) Exec(ctx context.Context) error
- func (duo *DatasetUpdateOne) ExecX(ctx context.Context)
- func (duo *DatasetUpdateOne) Mutation() *DatasetMutation
- func (duo *DatasetUpdateOne) RemoveLeft(c ...*Correlation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) RemoveLeftIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) RemoveObservationIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) RemoveObservations(o ...*Observation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) RemoveRight(c ...*Correlation) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) RemoveRightIDs(ids ...int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) Save(ctx context.Context) (*Dataset, error)
- func (duo *DatasetUpdateOne) SaveX(ctx context.Context) *Dataset
- func (duo *DatasetUpdateOne) SetDatasetParams(d *DatasetParams) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetDatasetParamsID(id int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetIndicator(i *Indicator) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetIndicatorID(id int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableDatasetParamsID(id *int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableShared(b *bool) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableSource(s *string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetNillableUserID(id *int) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetShared(b bool) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetSource(s string) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetUser(u *User) *DatasetUpdateOne
- func (duo *DatasetUpdateOne) SetUserID(id int) *DatasetUpdateOne
- type Datasets
- type Dictionaries
- type Dictionary
- type DictionaryClient
- func (c *DictionaryClient) Create() *DictionaryCreate
- func (c *DictionaryClient) CreateBulk(builders ...*DictionaryCreate) *DictionaryCreateBulk
- func (c *DictionaryClient) Delete() *DictionaryDelete
- func (c *DictionaryClient) DeleteOne(d *Dictionary) *DictionaryDeleteOne
- func (c *DictionaryClient) DeleteOneID(id int) *DictionaryDeleteOne
- func (c *DictionaryClient) Get(ctx context.Context, id int) (*Dictionary, error)
- func (c *DictionaryClient) GetX(ctx context.Context, id int) *Dictionary
- func (c *DictionaryClient) Hooks() []Hook
- func (c *DictionaryClient) Query() *DictionaryQuery
- func (c *DictionaryClient) QueryEntries(d *Dictionary) *DictionaryEntryQuery
- func (c *DictionaryClient) Update() *DictionaryUpdate
- func (c *DictionaryClient) UpdateOne(d *Dictionary) *DictionaryUpdateOne
- func (c *DictionaryClient) UpdateOneID(id int) *DictionaryUpdateOne
- func (c *DictionaryClient) Use(hooks ...Hook)
- type DictionaryCreate
- func (dc *DictionaryCreate) AddEntries(d ...*DictionaryEntry) *DictionaryCreate
- func (dc *DictionaryCreate) AddEntryIDs(ids ...int) *DictionaryCreate
- func (dc *DictionaryCreate) Mutation() *DictionaryMutation
- func (dc *DictionaryCreate) Save(ctx context.Context) (*Dictionary, error)
- func (dc *DictionaryCreate) SaveX(ctx context.Context) *Dictionary
- func (dc *DictionaryCreate) SetCode(s string) *DictionaryCreate
- func (dc *DictionaryCreate) SetDescription(s string) *DictionaryCreate
- func (dc *DictionaryCreate) SetID(i int) *DictionaryCreate
- func (dc *DictionaryCreate) SetNillableDescription(s *string) *DictionaryCreate
- type DictionaryCreateBulk
- type DictionaryDelete
- type DictionaryDeleteOne
- type DictionaryEdges
- type DictionaryEntries
- type DictionaryEntry
- type DictionaryEntryClient
- func (c *DictionaryEntryClient) Create() *DictionaryEntryCreate
- func (c *DictionaryEntryClient) CreateBulk(builders ...*DictionaryEntryCreate) *DictionaryEntryCreateBulk
- func (c *DictionaryEntryClient) Delete() *DictionaryEntryDelete
- func (c *DictionaryEntryClient) DeleteOne(de *DictionaryEntry) *DictionaryEntryDeleteOne
- func (c *DictionaryEntryClient) DeleteOneID(id int) *DictionaryEntryDeleteOne
- func (c *DictionaryEntryClient) Get(ctx context.Context, id int) (*DictionaryEntry, error)
- func (c *DictionaryEntryClient) GetX(ctx context.Context, id int) *DictionaryEntry
- func (c *DictionaryEntryClient) Hooks() []Hook
- func (c *DictionaryEntryClient) Query() *DictionaryEntryQuery
- func (c *DictionaryEntryClient) QueryDictionary(de *DictionaryEntry) *DictionaryQuery
- func (c *DictionaryEntryClient) Update() *DictionaryEntryUpdate
- func (c *DictionaryEntryClient) UpdateOne(de *DictionaryEntry) *DictionaryEntryUpdateOne
- func (c *DictionaryEntryClient) UpdateOneID(id int) *DictionaryEntryUpdateOne
- func (c *DictionaryEntryClient) Use(hooks ...Hook)
- type DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) Mutation() *DictionaryEntryMutation
- func (dec *DictionaryEntryCreate) Save(ctx context.Context) (*DictionaryEntry, error)
- func (dec *DictionaryEntryCreate) SaveX(ctx context.Context) *DictionaryEntry
- func (dec *DictionaryEntryCreate) SetCode(s string) *DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) SetDescription(s string) *DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) SetDictionary(d *Dictionary) *DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) SetDictionaryID(id int) *DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) SetID(i int) *DictionaryEntryCreate
- func (dec *DictionaryEntryCreate) SetNillableDescription(s *string) *DictionaryEntryCreate
- type DictionaryEntryCreateBulk
- type DictionaryEntryDelete
- type DictionaryEntryDeleteOne
- type DictionaryEntryEdges
- type DictionaryEntryGroupBy
- func (degb *DictionaryEntryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryEntryGroupBy
- func (degb *DictionaryEntryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (degb *DictionaryEntryGroupBy) BoolX(ctx context.Context) bool
- func (degb *DictionaryEntryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (degb *DictionaryEntryGroupBy) BoolsX(ctx context.Context) []bool
- func (degb *DictionaryEntryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (degb *DictionaryEntryGroupBy) Float64X(ctx context.Context) float64
- func (degb *DictionaryEntryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (degb *DictionaryEntryGroupBy) Float64sX(ctx context.Context) []float64
- func (degb *DictionaryEntryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (degb *DictionaryEntryGroupBy) IntX(ctx context.Context) int
- func (degb *DictionaryEntryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (degb *DictionaryEntryGroupBy) IntsX(ctx context.Context) []int
- func (degb *DictionaryEntryGroupBy) Scan(ctx context.Context, v interface{}) error
- func (degb *DictionaryEntryGroupBy) ScanX(ctx context.Context, v interface{})
- func (degb *DictionaryEntryGroupBy) String(ctx context.Context) (_ string, err error)
- func (degb *DictionaryEntryGroupBy) StringX(ctx context.Context) string
- func (degb *DictionaryEntryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (degb *DictionaryEntryGroupBy) StringsX(ctx context.Context) []string
- type DictionaryEntryMutation
- func (m *DictionaryEntryMutation) AddField(name string, value ent.Value) error
- func (m *DictionaryEntryMutation) AddedEdges() []string
- func (m *DictionaryEntryMutation) AddedField(name string) (ent.Value, bool)
- func (m *DictionaryEntryMutation) AddedFields() []string
- func (m *DictionaryEntryMutation) AddedIDs(name string) []ent.Value
- func (m *DictionaryEntryMutation) ClearDescription()
- func (m *DictionaryEntryMutation) ClearDictionary()
- func (m *DictionaryEntryMutation) ClearEdge(name string) error
- func (m *DictionaryEntryMutation) ClearField(name string) error
- func (m *DictionaryEntryMutation) ClearedEdges() []string
- func (m *DictionaryEntryMutation) ClearedFields() []string
- func (m DictionaryEntryMutation) Client() *Client
- func (m *DictionaryEntryMutation) Code() (r string, exists bool)
- func (m *DictionaryEntryMutation) Description() (r string, exists bool)
- func (m *DictionaryEntryMutation) DescriptionCleared() bool
- func (m *DictionaryEntryMutation) DictionaryCleared() bool
- func (m *DictionaryEntryMutation) DictionaryID() (id int, exists bool)
- func (m *DictionaryEntryMutation) DictionaryIDs() (ids []int)
- func (m *DictionaryEntryMutation) EdgeCleared(name string) bool
- func (m *DictionaryEntryMutation) Field(name string) (ent.Value, bool)
- func (m *DictionaryEntryMutation) FieldCleared(name string) bool
- func (m *DictionaryEntryMutation) Fields() []string
- func (m *DictionaryEntryMutation) ID() (id int, exists bool)
- func (m *DictionaryEntryMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *DictionaryEntryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DictionaryEntryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DictionaryEntryMutation) Op() Op
- func (m *DictionaryEntryMutation) RemovedEdges() []string
- func (m *DictionaryEntryMutation) RemovedIDs(name string) []ent.Value
- func (m *DictionaryEntryMutation) ResetCode()
- func (m *DictionaryEntryMutation) ResetDescription()
- func (m *DictionaryEntryMutation) ResetDictionary()
- func (m *DictionaryEntryMutation) ResetEdge(name string) error
- func (m *DictionaryEntryMutation) ResetField(name string) error
- func (m *DictionaryEntryMutation) SetCode(s string)
- func (m *DictionaryEntryMutation) SetDescription(s string)
- func (m *DictionaryEntryMutation) SetDictionaryID(id int)
- func (m *DictionaryEntryMutation) SetField(name string, value ent.Value) error
- func (m *DictionaryEntryMutation) SetID(id int)
- func (m DictionaryEntryMutation) Tx() (*Tx, error)
- func (m *DictionaryEntryMutation) Type() string
- type DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) All(ctx context.Context) ([]*DictionaryEntry, error)
- func (deq *DictionaryEntryQuery) AllX(ctx context.Context) []*DictionaryEntry
- func (deq *DictionaryEntryQuery) Clone() *DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) Count(ctx context.Context) (int, error)
- func (deq *DictionaryEntryQuery) CountX(ctx context.Context) int
- func (deq *DictionaryEntryQuery) Exist(ctx context.Context) (bool, error)
- func (deq *DictionaryEntryQuery) ExistX(ctx context.Context) bool
- func (deq *DictionaryEntryQuery) First(ctx context.Context) (*DictionaryEntry, error)
- func (deq *DictionaryEntryQuery) FirstID(ctx context.Context) (id int, err error)
- func (deq *DictionaryEntryQuery) FirstIDX(ctx context.Context) int
- func (deq *DictionaryEntryQuery) FirstX(ctx context.Context) *DictionaryEntry
- func (deq *DictionaryEntryQuery) GroupBy(field string, fields ...string) *DictionaryEntryGroupBy
- func (deq *DictionaryEntryQuery) IDs(ctx context.Context) ([]int, error)
- func (deq *DictionaryEntryQuery) IDsX(ctx context.Context) []int
- func (deq *DictionaryEntryQuery) Limit(limit int) *DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) Offset(offset int) *DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) Only(ctx context.Context) (*DictionaryEntry, error)
- func (deq *DictionaryEntryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (deq *DictionaryEntryQuery) OnlyIDX(ctx context.Context) int
- func (deq *DictionaryEntryQuery) OnlyX(ctx context.Context) *DictionaryEntry
- func (deq *DictionaryEntryQuery) Order(o ...OrderFunc) *DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) QueryDictionary() *DictionaryQuery
- func (deq *DictionaryEntryQuery) Select(field string, fields ...string) *DictionaryEntrySelect
- func (deq *DictionaryEntryQuery) Where(ps ...predicate.DictionaryEntry) *DictionaryEntryQuery
- func (deq *DictionaryEntryQuery) WithDictionary(opts ...func(*DictionaryQuery)) *DictionaryEntryQuery
- type DictionaryEntrySelect
- func (des *DictionaryEntrySelect) Bool(ctx context.Context) (_ bool, err error)
- func (des *DictionaryEntrySelect) BoolX(ctx context.Context) bool
- func (des *DictionaryEntrySelect) Bools(ctx context.Context) ([]bool, error)
- func (des *DictionaryEntrySelect) BoolsX(ctx context.Context) []bool
- func (des *DictionaryEntrySelect) Float64(ctx context.Context) (_ float64, err error)
- func (des *DictionaryEntrySelect) Float64X(ctx context.Context) float64
- func (des *DictionaryEntrySelect) Float64s(ctx context.Context) ([]float64, error)
- func (des *DictionaryEntrySelect) Float64sX(ctx context.Context) []float64
- func (des *DictionaryEntrySelect) Int(ctx context.Context) (_ int, err error)
- func (des *DictionaryEntrySelect) IntX(ctx context.Context) int
- func (des *DictionaryEntrySelect) Ints(ctx context.Context) ([]int, error)
- func (des *DictionaryEntrySelect) IntsX(ctx context.Context) []int
- func (des *DictionaryEntrySelect) Scan(ctx context.Context, v interface{}) error
- func (des *DictionaryEntrySelect) ScanX(ctx context.Context, v interface{})
- func (des *DictionaryEntrySelect) String(ctx context.Context) (_ string, err error)
- func (des *DictionaryEntrySelect) StringX(ctx context.Context) string
- func (des *DictionaryEntrySelect) Strings(ctx context.Context) ([]string, error)
- func (des *DictionaryEntrySelect) StringsX(ctx context.Context) []string
- type DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) ClearDescription() *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) ClearDictionary() *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) Exec(ctx context.Context) error
- func (deu *DictionaryEntryUpdate) ExecX(ctx context.Context)
- func (deu *DictionaryEntryUpdate) Mutation() *DictionaryEntryMutation
- func (deu *DictionaryEntryUpdate) Save(ctx context.Context) (int, error)
- func (deu *DictionaryEntryUpdate) SaveX(ctx context.Context) int
- func (deu *DictionaryEntryUpdate) SetCode(s string) *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) SetDescription(s string) *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) SetDictionary(d *Dictionary) *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) SetDictionaryID(id int) *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) SetNillableDescription(s *string) *DictionaryEntryUpdate
- func (deu *DictionaryEntryUpdate) Where(ps ...predicate.DictionaryEntry) *DictionaryEntryUpdate
- type DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) ClearDescription() *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) ClearDictionary() *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) Exec(ctx context.Context) error
- func (deuo *DictionaryEntryUpdateOne) ExecX(ctx context.Context)
- func (deuo *DictionaryEntryUpdateOne) Mutation() *DictionaryEntryMutation
- func (deuo *DictionaryEntryUpdateOne) Save(ctx context.Context) (*DictionaryEntry, error)
- func (deuo *DictionaryEntryUpdateOne) SaveX(ctx context.Context) *DictionaryEntry
- func (deuo *DictionaryEntryUpdateOne) SetCode(s string) *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) SetDescription(s string) *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) SetDictionary(d *Dictionary) *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) SetDictionaryID(id int) *DictionaryEntryUpdateOne
- func (deuo *DictionaryEntryUpdateOne) SetNillableDescription(s *string) *DictionaryEntryUpdateOne
- type DictionaryGroupBy
- func (dgb *DictionaryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryGroupBy
- func (dgb *DictionaryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dgb *DictionaryGroupBy) BoolX(ctx context.Context) bool
- func (dgb *DictionaryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DictionaryGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DictionaryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dgb *DictionaryGroupBy) Float64X(ctx context.Context) float64
- func (dgb *DictionaryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DictionaryGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DictionaryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dgb *DictionaryGroupBy) IntX(ctx context.Context) int
- func (dgb *DictionaryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DictionaryGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DictionaryGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DictionaryGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DictionaryGroupBy) String(ctx context.Context) (_ string, err error)
- func (dgb *DictionaryGroupBy) StringX(ctx context.Context) string
- func (dgb *DictionaryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DictionaryGroupBy) StringsX(ctx context.Context) []string
- type DictionaryMutation
- func (m *DictionaryMutation) AddEntryIDs(ids ...int)
- func (m *DictionaryMutation) AddField(name string, value ent.Value) error
- func (m *DictionaryMutation) AddedEdges() []string
- func (m *DictionaryMutation) AddedField(name string) (ent.Value, bool)
- func (m *DictionaryMutation) AddedFields() []string
- func (m *DictionaryMutation) AddedIDs(name string) []ent.Value
- func (m *DictionaryMutation) ClearDescription()
- func (m *DictionaryMutation) ClearEdge(name string) error
- func (m *DictionaryMutation) ClearEntries()
- func (m *DictionaryMutation) ClearField(name string) error
- func (m *DictionaryMutation) ClearedEdges() []string
- func (m *DictionaryMutation) ClearedFields() []string
- func (m DictionaryMutation) Client() *Client
- func (m *DictionaryMutation) Code() (r string, exists bool)
- func (m *DictionaryMutation) Description() (r string, exists bool)
- func (m *DictionaryMutation) DescriptionCleared() bool
- func (m *DictionaryMutation) EdgeCleared(name string) bool
- func (m *DictionaryMutation) EntriesCleared() bool
- func (m *DictionaryMutation) EntriesIDs() (ids []int)
- func (m *DictionaryMutation) Field(name string) (ent.Value, bool)
- func (m *DictionaryMutation) FieldCleared(name string) bool
- func (m *DictionaryMutation) Fields() []string
- func (m *DictionaryMutation) ID() (id int, exists bool)
- func (m *DictionaryMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *DictionaryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DictionaryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DictionaryMutation) Op() Op
- func (m *DictionaryMutation) RemoveEntryIDs(ids ...int)
- func (m *DictionaryMutation) RemovedEdges() []string
- func (m *DictionaryMutation) RemovedEntriesIDs() (ids []int)
- func (m *DictionaryMutation) RemovedIDs(name string) []ent.Value
- func (m *DictionaryMutation) ResetCode()
- func (m *DictionaryMutation) ResetDescription()
- func (m *DictionaryMutation) ResetEdge(name string) error
- func (m *DictionaryMutation) ResetEntries()
- func (m *DictionaryMutation) ResetField(name string) error
- func (m *DictionaryMutation) SetCode(s string)
- func (m *DictionaryMutation) SetDescription(s string)
- func (m *DictionaryMutation) SetField(name string, value ent.Value) error
- func (m *DictionaryMutation) SetID(id int)
- func (m DictionaryMutation) Tx() (*Tx, error)
- func (m *DictionaryMutation) Type() string
- type DictionaryQuery
- func (dq *DictionaryQuery) All(ctx context.Context) ([]*Dictionary, error)
- func (dq *DictionaryQuery) AllX(ctx context.Context) []*Dictionary
- func (dq *DictionaryQuery) Clone() *DictionaryQuery
- func (dq *DictionaryQuery) Count(ctx context.Context) (int, error)
- func (dq *DictionaryQuery) CountX(ctx context.Context) int
- func (dq *DictionaryQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DictionaryQuery) ExistX(ctx context.Context) bool
- func (dq *DictionaryQuery) First(ctx context.Context) (*Dictionary, error)
- func (dq *DictionaryQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DictionaryQuery) FirstIDX(ctx context.Context) int
- func (dq *DictionaryQuery) FirstX(ctx context.Context) *Dictionary
- func (dq *DictionaryQuery) GroupBy(field string, fields ...string) *DictionaryGroupBy
- func (dq *DictionaryQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DictionaryQuery) IDsX(ctx context.Context) []int
- func (dq *DictionaryQuery) Limit(limit int) *DictionaryQuery
- func (dq *DictionaryQuery) Offset(offset int) *DictionaryQuery
- func (dq *DictionaryQuery) Only(ctx context.Context) (*Dictionary, error)
- func (dq *DictionaryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DictionaryQuery) OnlyIDX(ctx context.Context) int
- func (dq *DictionaryQuery) OnlyX(ctx context.Context) *Dictionary
- func (dq *DictionaryQuery) Order(o ...OrderFunc) *DictionaryQuery
- func (dq *DictionaryQuery) QueryEntries() *DictionaryEntryQuery
- func (dq *DictionaryQuery) Select(field string, fields ...string) *DictionarySelect
- func (dq *DictionaryQuery) Where(ps ...predicate.Dictionary) *DictionaryQuery
- func (dq *DictionaryQuery) WithEntries(opts ...func(*DictionaryEntryQuery)) *DictionaryQuery
- type DictionarySelect
- func (ds *DictionarySelect) Bool(ctx context.Context) (_ bool, err error)
- func (ds *DictionarySelect) BoolX(ctx context.Context) bool
- func (ds *DictionarySelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DictionarySelect) BoolsX(ctx context.Context) []bool
- func (ds *DictionarySelect) Float64(ctx context.Context) (_ float64, err error)
- func (ds *DictionarySelect) Float64X(ctx context.Context) float64
- func (ds *DictionarySelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DictionarySelect) Float64sX(ctx context.Context) []float64
- func (ds *DictionarySelect) Int(ctx context.Context) (_ int, err error)
- func (ds *DictionarySelect) IntX(ctx context.Context) int
- func (ds *DictionarySelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DictionarySelect) IntsX(ctx context.Context) []int
- func (ds *DictionarySelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DictionarySelect) ScanX(ctx context.Context, v interface{})
- func (ds *DictionarySelect) String(ctx context.Context) (_ string, err error)
- func (ds *DictionarySelect) StringX(ctx context.Context) string
- func (ds *DictionarySelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DictionarySelect) StringsX(ctx context.Context) []string
- type DictionaryUpdate
- func (du *DictionaryUpdate) AddEntries(d ...*DictionaryEntry) *DictionaryUpdate
- func (du *DictionaryUpdate) AddEntryIDs(ids ...int) *DictionaryUpdate
- func (du *DictionaryUpdate) ClearDescription() *DictionaryUpdate
- func (du *DictionaryUpdate) ClearEntries() *DictionaryUpdate
- func (du *DictionaryUpdate) Exec(ctx context.Context) error
- func (du *DictionaryUpdate) ExecX(ctx context.Context)
- func (du *DictionaryUpdate) Mutation() *DictionaryMutation
- func (du *DictionaryUpdate) RemoveEntries(d ...*DictionaryEntry) *DictionaryUpdate
- func (du *DictionaryUpdate) RemoveEntryIDs(ids ...int) *DictionaryUpdate
- func (du *DictionaryUpdate) Save(ctx context.Context) (int, error)
- func (du *DictionaryUpdate) SaveX(ctx context.Context) int
- func (du *DictionaryUpdate) SetCode(s string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetDescription(s string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetNillableDescription(s *string) *DictionaryUpdate
- func (du *DictionaryUpdate) Where(ps ...predicate.Dictionary) *DictionaryUpdate
- type DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) AddEntries(d ...*DictionaryEntry) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) AddEntryIDs(ids ...int) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) ClearDescription() *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) ClearEntries() *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) Exec(ctx context.Context) error
- func (duo *DictionaryUpdateOne) ExecX(ctx context.Context)
- func (duo *DictionaryUpdateOne) Mutation() *DictionaryMutation
- func (duo *DictionaryUpdateOne) RemoveEntries(d ...*DictionaryEntry) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) RemoveEntryIDs(ids ...int) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) Save(ctx context.Context) (*Dictionary, error)
- func (duo *DictionaryUpdateOne) SaveX(ctx context.Context) *Dictionary
- func (duo *DictionaryUpdateOne) SetCode(s string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetDescription(s string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetNillableDescription(s *string) *DictionaryUpdateOne
- type Hook
- type Indicator
- func (i *Indicator) QueryAuthor() *UserQuery
- func (i *Indicator) QueryDatasets() *DatasetQuery
- func (i *Indicator) QueryIndicatorParams() *IndicatorParamsQuery
- func (i *Indicator) QueryScale() *ScaleQuery
- func (i *Indicator) String() string
- func (i *Indicator) Unwrap() *Indicator
- func (i *Indicator) Update() *IndicatorUpdateOne
- type IndicatorClient
- func (c *IndicatorClient) Create() *IndicatorCreate
- func (c *IndicatorClient) CreateBulk(builders ...*IndicatorCreate) *IndicatorCreateBulk
- func (c *IndicatorClient) Delete() *IndicatorDelete
- func (c *IndicatorClient) DeleteOne(i *Indicator) *IndicatorDeleteOne
- func (c *IndicatorClient) DeleteOneID(id int) *IndicatorDeleteOne
- func (c *IndicatorClient) Get(ctx context.Context, id int) (*Indicator, error)
- func (c *IndicatorClient) GetX(ctx context.Context, id int) *Indicator
- func (c *IndicatorClient) Hooks() []Hook
- func (c *IndicatorClient) Query() *IndicatorQuery
- func (c *IndicatorClient) QueryAuthor(i *Indicator) *UserQuery
- func (c *IndicatorClient) QueryDatasets(i *Indicator) *DatasetQuery
- func (c *IndicatorClient) QueryIndicatorParams(i *Indicator) *IndicatorParamsQuery
- func (c *IndicatorClient) QueryScale(i *Indicator) *ScaleQuery
- func (c *IndicatorClient) Update() *IndicatorUpdate
- func (c *IndicatorClient) UpdateOne(i *Indicator) *IndicatorUpdateOne
- func (c *IndicatorClient) UpdateOneID(id int) *IndicatorUpdateOne
- func (c *IndicatorClient) Use(hooks ...Hook)
- type IndicatorCreate
- func (ic *IndicatorCreate) AddDatasetIDs(ids ...int) *IndicatorCreate
- func (ic *IndicatorCreate) AddDatasets(d ...*Dataset) *IndicatorCreate
- func (ic *IndicatorCreate) Mutation() *IndicatorMutation
- func (ic *IndicatorCreate) Save(ctx context.Context) (*Indicator, error)
- func (ic *IndicatorCreate) SaveX(ctx context.Context) *Indicator
- func (ic *IndicatorCreate) SetActive(b bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetAuthor(u *User) *IndicatorCreate
- func (ic *IndicatorCreate) SetAuthorID(id int) *IndicatorCreate
- func (ic *IndicatorCreate) SetBuiltIn(b bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetCode(s string) *IndicatorCreate
- func (ic *IndicatorCreate) SetCreateTime(t time.Time) *IndicatorCreate
- func (ic *IndicatorCreate) SetDescription(s string) *IndicatorCreate
- func (ic *IndicatorCreate) SetExternal(b bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetIndicatorParams(i *IndicatorParams) *IndicatorCreate
- func (ic *IndicatorCreate) SetIndicatorParamsID(id int) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableActive(b *bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableAuthorID(id *int) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableBuiltIn(b *bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableCreateTime(t *time.Time) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableDescription(s *string) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableExternal(b *bool) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableIndicatorParamsID(id *int) *IndicatorCreate
- func (ic *IndicatorCreate) SetNillableUpdateTime(t *time.Time) *IndicatorCreate
- func (ic *IndicatorCreate) SetScale(s *Scale) *IndicatorCreate
- func (ic *IndicatorCreate) SetScaleID(id int) *IndicatorCreate
- func (ic *IndicatorCreate) SetTitle(s string) *IndicatorCreate
- func (ic *IndicatorCreate) SetUpdateTime(t time.Time) *IndicatorCreate
- type IndicatorCreateBulk
- type IndicatorDelete
- type IndicatorDeleteOne
- type IndicatorEdges
- type IndicatorGroupBy
- func (igb *IndicatorGroupBy) Aggregate(fns ...AggregateFunc) *IndicatorGroupBy
- func (igb *IndicatorGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (igb *IndicatorGroupBy) BoolX(ctx context.Context) bool
- func (igb *IndicatorGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (igb *IndicatorGroupBy) BoolsX(ctx context.Context) []bool
- func (igb *IndicatorGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (igb *IndicatorGroupBy) Float64X(ctx context.Context) float64
- func (igb *IndicatorGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (igb *IndicatorGroupBy) Float64sX(ctx context.Context) []float64
- func (igb *IndicatorGroupBy) Int(ctx context.Context) (_ int, err error)
- func (igb *IndicatorGroupBy) IntX(ctx context.Context) int
- func (igb *IndicatorGroupBy) Ints(ctx context.Context) ([]int, error)
- func (igb *IndicatorGroupBy) IntsX(ctx context.Context) []int
- func (igb *IndicatorGroupBy) Scan(ctx context.Context, v interface{}) error
- func (igb *IndicatorGroupBy) ScanX(ctx context.Context, v interface{})
- func (igb *IndicatorGroupBy) String(ctx context.Context) (_ string, err error)
- func (igb *IndicatorGroupBy) StringX(ctx context.Context) string
- func (igb *IndicatorGroupBy) Strings(ctx context.Context) ([]string, error)
- func (igb *IndicatorGroupBy) StringsX(ctx context.Context) []string
- type IndicatorMutation
- func (m *IndicatorMutation) Active() (r bool, exists bool)
- func (m *IndicatorMutation) AddDatasetIDs(ids ...int)
- func (m *IndicatorMutation) AddField(name string, value ent.Value) error
- func (m *IndicatorMutation) AddedEdges() []string
- func (m *IndicatorMutation) AddedField(name string) (ent.Value, bool)
- func (m *IndicatorMutation) AddedFields() []string
- func (m *IndicatorMutation) AddedIDs(name string) []ent.Value
- func (m *IndicatorMutation) AuthorCleared() bool
- func (m *IndicatorMutation) AuthorID() (id int, exists bool)
- func (m *IndicatorMutation) AuthorIDs() (ids []int)
- func (m *IndicatorMutation) BuiltIn() (r bool, exists bool)
- func (m *IndicatorMutation) ClearAuthor()
- func (m *IndicatorMutation) ClearDatasets()
- func (m *IndicatorMutation) ClearDescription()
- func (m *IndicatorMutation) ClearEdge(name string) error
- func (m *IndicatorMutation) ClearField(name string) error
- func (m *IndicatorMutation) ClearIndicatorParams()
- func (m *IndicatorMutation) ClearScale()
- func (m *IndicatorMutation) ClearedEdges() []string
- func (m *IndicatorMutation) ClearedFields() []string
- func (m IndicatorMutation) Client() *Client
- func (m *IndicatorMutation) Code() (r string, exists bool)
- func (m *IndicatorMutation) CreateTime() (r time.Time, exists bool)
- func (m *IndicatorMutation) DatasetsCleared() bool
- func (m *IndicatorMutation) DatasetsIDs() (ids []int)
- func (m *IndicatorMutation) Description() (r string, exists bool)
- func (m *IndicatorMutation) DescriptionCleared() bool
- func (m *IndicatorMutation) EdgeCleared(name string) bool
- func (m *IndicatorMutation) External() (r bool, exists bool)
- func (m *IndicatorMutation) Field(name string) (ent.Value, bool)
- func (m *IndicatorMutation) FieldCleared(name string) bool
- func (m *IndicatorMutation) Fields() []string
- func (m *IndicatorMutation) ID() (id int, exists bool)
- func (m *IndicatorMutation) IndicatorParamsCleared() bool
- func (m *IndicatorMutation) IndicatorParamsID() (id int, exists bool)
- func (m *IndicatorMutation) IndicatorParamsIDs() (ids []int)
- func (m *IndicatorMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *IndicatorMutation) OldBuiltIn(ctx context.Context) (v bool, err error)
- func (m *IndicatorMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *IndicatorMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *IndicatorMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *IndicatorMutation) OldExternal(ctx context.Context) (v bool, err error)
- func (m *IndicatorMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IndicatorMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *IndicatorMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *IndicatorMutation) Op() Op
- func (m *IndicatorMutation) RemoveDatasetIDs(ids ...int)
- func (m *IndicatorMutation) RemovedDatasetsIDs() (ids []int)
- func (m *IndicatorMutation) RemovedEdges() []string
- func (m *IndicatorMutation) RemovedIDs(name string) []ent.Value
- func (m *IndicatorMutation) ResetActive()
- func (m *IndicatorMutation) ResetAuthor()
- func (m *IndicatorMutation) ResetBuiltIn()
- func (m *IndicatorMutation) ResetCode()
- func (m *IndicatorMutation) ResetCreateTime()
- func (m *IndicatorMutation) ResetDatasets()
- func (m *IndicatorMutation) ResetDescription()
- func (m *IndicatorMutation) ResetEdge(name string) error
- func (m *IndicatorMutation) ResetExternal()
- func (m *IndicatorMutation) ResetField(name string) error
- func (m *IndicatorMutation) ResetIndicatorParams()
- func (m *IndicatorMutation) ResetScale()
- func (m *IndicatorMutation) ResetTitle()
- func (m *IndicatorMutation) ResetUpdateTime()
- func (m *IndicatorMutation) ScaleCleared() bool
- func (m *IndicatorMutation) ScaleID() (id int, exists bool)
- func (m *IndicatorMutation) ScaleIDs() (ids []int)
- func (m *IndicatorMutation) SetActive(b bool)
- func (m *IndicatorMutation) SetAuthorID(id int)
- func (m *IndicatorMutation) SetBuiltIn(b bool)
- func (m *IndicatorMutation) SetCode(s string)
- func (m *IndicatorMutation) SetCreateTime(t time.Time)
- func (m *IndicatorMutation) SetDescription(s string)
- func (m *IndicatorMutation) SetExternal(b bool)
- func (m *IndicatorMutation) SetField(name string, value ent.Value) error
- func (m *IndicatorMutation) SetIndicatorParamsID(id int)
- func (m *IndicatorMutation) SetScaleID(id int)
- func (m *IndicatorMutation) SetTitle(s string)
- func (m *IndicatorMutation) SetUpdateTime(t time.Time)
- func (m *IndicatorMutation) Title() (r string, exists bool)
- func (m IndicatorMutation) Tx() (*Tx, error)
- func (m *IndicatorMutation) Type() string
- func (m *IndicatorMutation) UpdateTime() (r time.Time, exists bool)
- type IndicatorParams
- type IndicatorParamsClient
- func (c *IndicatorParamsClient) Create() *IndicatorParamsCreate
- func (c *IndicatorParamsClient) CreateBulk(builders ...*IndicatorParamsCreate) *IndicatorParamsCreateBulk
- func (c *IndicatorParamsClient) Delete() *IndicatorParamsDelete
- func (c *IndicatorParamsClient) DeleteOne(ip *IndicatorParams) *IndicatorParamsDeleteOne
- func (c *IndicatorParamsClient) DeleteOneID(id int) *IndicatorParamsDeleteOne
- func (c *IndicatorParamsClient) Get(ctx context.Context, id int) (*IndicatorParams, error)
- func (c *IndicatorParamsClient) GetX(ctx context.Context, id int) *IndicatorParams
- func (c *IndicatorParamsClient) Hooks() []Hook
- func (c *IndicatorParamsClient) Query() *IndicatorParamsQuery
- func (c *IndicatorParamsClient) QueryIndicator(ip *IndicatorParams) *IndicatorQuery
- func (c *IndicatorParamsClient) Update() *IndicatorParamsUpdate
- func (c *IndicatorParamsClient) UpdateOne(ip *IndicatorParams) *IndicatorParamsUpdateOne
- func (c *IndicatorParamsClient) UpdateOneID(id int) *IndicatorParamsUpdateOne
- func (c *IndicatorParamsClient) Use(hooks ...Hook)
- type IndicatorParamsCreate
- func (ipc *IndicatorParamsCreate) Mutation() *IndicatorParamsMutation
- func (ipc *IndicatorParamsCreate) Save(ctx context.Context) (*IndicatorParams, error)
- func (ipc *IndicatorParamsCreate) SaveX(ctx context.Context) *IndicatorParams
- func (ipc *IndicatorParamsCreate) SetIndicator(i *Indicator) *IndicatorParamsCreate
- func (ipc *IndicatorParamsCreate) SetIndicatorID(id int) *IndicatorParamsCreate
- func (ipc *IndicatorParamsCreate) SetValueMapping(m map[string]string) *IndicatorParamsCreate
- func (ipc *IndicatorParamsCreate) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsCreate
- type IndicatorParamsCreateBulk
- type IndicatorParamsDelete
- type IndicatorParamsDeleteOne
- type IndicatorParamsEdges
- type IndicatorParamsGroupBy
- func (ipgb *IndicatorParamsGroupBy) Aggregate(fns ...AggregateFunc) *IndicatorParamsGroupBy
- func (ipgb *IndicatorParamsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ipgb *IndicatorParamsGroupBy) BoolX(ctx context.Context) bool
- func (ipgb *IndicatorParamsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ipgb *IndicatorParamsGroupBy) BoolsX(ctx context.Context) []bool
- func (ipgb *IndicatorParamsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ipgb *IndicatorParamsGroupBy) Float64X(ctx context.Context) float64
- func (ipgb *IndicatorParamsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ipgb *IndicatorParamsGroupBy) Float64sX(ctx context.Context) []float64
- func (ipgb *IndicatorParamsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ipgb *IndicatorParamsGroupBy) IntX(ctx context.Context) int
- func (ipgb *IndicatorParamsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ipgb *IndicatorParamsGroupBy) IntsX(ctx context.Context) []int
- func (ipgb *IndicatorParamsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ipgb *IndicatorParamsGroupBy) ScanX(ctx context.Context, v interface{})
- func (ipgb *IndicatorParamsGroupBy) String(ctx context.Context) (_ string, err error)
- func (ipgb *IndicatorParamsGroupBy) StringX(ctx context.Context) string
- func (ipgb *IndicatorParamsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ipgb *IndicatorParamsGroupBy) StringsX(ctx context.Context) []string
- type IndicatorParamsMutation
- func (m *IndicatorParamsMutation) AddField(name string, value ent.Value) error
- func (m *IndicatorParamsMutation) AddedEdges() []string
- func (m *IndicatorParamsMutation) AddedField(name string) (ent.Value, bool)
- func (m *IndicatorParamsMutation) AddedFields() []string
- func (m *IndicatorParamsMutation) AddedIDs(name string) []ent.Value
- func (m *IndicatorParamsMutation) ClearEdge(name string) error
- func (m *IndicatorParamsMutation) ClearField(name string) error
- func (m *IndicatorParamsMutation) ClearIndicator()
- func (m *IndicatorParamsMutation) ClearValueMapping()
- func (m *IndicatorParamsMutation) ClearedEdges() []string
- func (m *IndicatorParamsMutation) ClearedFields() []string
- func (m IndicatorParamsMutation) Client() *Client
- func (m *IndicatorParamsMutation) EdgeCleared(name string) bool
- func (m *IndicatorParamsMutation) Field(name string) (ent.Value, bool)
- func (m *IndicatorParamsMutation) FieldCleared(name string) bool
- func (m *IndicatorParamsMutation) Fields() []string
- func (m *IndicatorParamsMutation) ID() (id int, exists bool)
- func (m *IndicatorParamsMutation) IndicatorCleared() bool
- func (m *IndicatorParamsMutation) IndicatorID() (id int, exists bool)
- func (m *IndicatorParamsMutation) IndicatorIDs() (ids []int)
- func (m *IndicatorParamsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IndicatorParamsMutation) OldValueMapping(ctx context.Context) (v map[string]string, err error)
- func (m *IndicatorParamsMutation) OldValueParams(ctx context.Context) (v domain.IndicatorValueParams, err error)
- func (m *IndicatorParamsMutation) Op() Op
- func (m *IndicatorParamsMutation) RemovedEdges() []string
- func (m *IndicatorParamsMutation) RemovedIDs(name string) []ent.Value
- func (m *IndicatorParamsMutation) ResetEdge(name string) error
- func (m *IndicatorParamsMutation) ResetField(name string) error
- func (m *IndicatorParamsMutation) ResetIndicator()
- func (m *IndicatorParamsMutation) ResetValueMapping()
- func (m *IndicatorParamsMutation) ResetValueParams()
- func (m *IndicatorParamsMutation) SetField(name string, value ent.Value) error
- func (m *IndicatorParamsMutation) SetIndicatorID(id int)
- func (m *IndicatorParamsMutation) SetValueMapping(value map[string]string)
- func (m *IndicatorParamsMutation) SetValueParams(dvp domain.IndicatorValueParams)
- func (m IndicatorParamsMutation) Tx() (*Tx, error)
- func (m *IndicatorParamsMutation) Type() string
- func (m *IndicatorParamsMutation) ValueMapping() (r map[string]string, exists bool)
- func (m *IndicatorParamsMutation) ValueMappingCleared() bool
- func (m *IndicatorParamsMutation) ValueParams() (r domain.IndicatorValueParams, exists bool)
- type IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) All(ctx context.Context) ([]*IndicatorParams, error)
- func (ipq *IndicatorParamsQuery) AllX(ctx context.Context) []*IndicatorParams
- func (ipq *IndicatorParamsQuery) Clone() *IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) Count(ctx context.Context) (int, error)
- func (ipq *IndicatorParamsQuery) CountX(ctx context.Context) int
- func (ipq *IndicatorParamsQuery) Exist(ctx context.Context) (bool, error)
- func (ipq *IndicatorParamsQuery) ExistX(ctx context.Context) bool
- func (ipq *IndicatorParamsQuery) First(ctx context.Context) (*IndicatorParams, error)
- func (ipq *IndicatorParamsQuery) FirstID(ctx context.Context) (id int, err error)
- func (ipq *IndicatorParamsQuery) FirstIDX(ctx context.Context) int
- func (ipq *IndicatorParamsQuery) FirstX(ctx context.Context) *IndicatorParams
- func (ipq *IndicatorParamsQuery) GroupBy(field string, fields ...string) *IndicatorParamsGroupBy
- func (ipq *IndicatorParamsQuery) IDs(ctx context.Context) ([]int, error)
- func (ipq *IndicatorParamsQuery) IDsX(ctx context.Context) []int
- func (ipq *IndicatorParamsQuery) Limit(limit int) *IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) Offset(offset int) *IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) Only(ctx context.Context) (*IndicatorParams, error)
- func (ipq *IndicatorParamsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ipq *IndicatorParamsQuery) OnlyIDX(ctx context.Context) int
- func (ipq *IndicatorParamsQuery) OnlyX(ctx context.Context) *IndicatorParams
- func (ipq *IndicatorParamsQuery) Order(o ...OrderFunc) *IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) QueryIndicator() *IndicatorQuery
- func (ipq *IndicatorParamsQuery) Select(field string, fields ...string) *IndicatorParamsSelect
- func (ipq *IndicatorParamsQuery) Where(ps ...predicate.IndicatorParams) *IndicatorParamsQuery
- func (ipq *IndicatorParamsQuery) WithIndicator(opts ...func(*IndicatorQuery)) *IndicatorParamsQuery
- type IndicatorParamsSelect
- func (ips *IndicatorParamsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ips *IndicatorParamsSelect) BoolX(ctx context.Context) bool
- func (ips *IndicatorParamsSelect) Bools(ctx context.Context) ([]bool, error)
- func (ips *IndicatorParamsSelect) BoolsX(ctx context.Context) []bool
- func (ips *IndicatorParamsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ips *IndicatorParamsSelect) Float64X(ctx context.Context) float64
- func (ips *IndicatorParamsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ips *IndicatorParamsSelect) Float64sX(ctx context.Context) []float64
- func (ips *IndicatorParamsSelect) Int(ctx context.Context) (_ int, err error)
- func (ips *IndicatorParamsSelect) IntX(ctx context.Context) int
- func (ips *IndicatorParamsSelect) Ints(ctx context.Context) ([]int, error)
- func (ips *IndicatorParamsSelect) IntsX(ctx context.Context) []int
- func (ips *IndicatorParamsSelect) Scan(ctx context.Context, v interface{}) error
- func (ips *IndicatorParamsSelect) ScanX(ctx context.Context, v interface{})
- func (ips *IndicatorParamsSelect) String(ctx context.Context) (_ string, err error)
- func (ips *IndicatorParamsSelect) StringX(ctx context.Context) string
- func (ips *IndicatorParamsSelect) Strings(ctx context.Context) ([]string, error)
- func (ips *IndicatorParamsSelect) StringsX(ctx context.Context) []string
- type IndicatorParamsSlice
- type IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) ClearIndicator() *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) ClearValueMapping() *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) Exec(ctx context.Context) error
- func (ipu *IndicatorParamsUpdate) ExecX(ctx context.Context)
- func (ipu *IndicatorParamsUpdate) Mutation() *IndicatorParamsMutation
- func (ipu *IndicatorParamsUpdate) Save(ctx context.Context) (int, error)
- func (ipu *IndicatorParamsUpdate) SaveX(ctx context.Context) int
- func (ipu *IndicatorParamsUpdate) SetIndicator(i *Indicator) *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) SetIndicatorID(id int) *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) SetValueMapping(m map[string]string) *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsUpdate
- func (ipu *IndicatorParamsUpdate) Where(ps ...predicate.IndicatorParams) *IndicatorParamsUpdate
- type IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) ClearIndicator() *IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) ClearValueMapping() *IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) Exec(ctx context.Context) error
- func (ipuo *IndicatorParamsUpdateOne) ExecX(ctx context.Context)
- func (ipuo *IndicatorParamsUpdateOne) Mutation() *IndicatorParamsMutation
- func (ipuo *IndicatorParamsUpdateOne) Save(ctx context.Context) (*IndicatorParams, error)
- func (ipuo *IndicatorParamsUpdateOne) SaveX(ctx context.Context) *IndicatorParams
- func (ipuo *IndicatorParamsUpdateOne) SetIndicator(i *Indicator) *IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) SetIndicatorID(id int) *IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) SetValueMapping(m map[string]string) *IndicatorParamsUpdateOne
- func (ipuo *IndicatorParamsUpdateOne) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsUpdateOne
- type IndicatorQuery
- func (iq *IndicatorQuery) All(ctx context.Context) ([]*Indicator, error)
- func (iq *IndicatorQuery) AllX(ctx context.Context) []*Indicator
- func (iq *IndicatorQuery) Clone() *IndicatorQuery
- func (iq *IndicatorQuery) Count(ctx context.Context) (int, error)
- func (iq *IndicatorQuery) CountX(ctx context.Context) int
- func (iq *IndicatorQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IndicatorQuery) ExistX(ctx context.Context) bool
- func (iq *IndicatorQuery) First(ctx context.Context) (*Indicator, error)
- func (iq *IndicatorQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *IndicatorQuery) FirstIDX(ctx context.Context) int
- func (iq *IndicatorQuery) FirstX(ctx context.Context) *Indicator
- func (iq *IndicatorQuery) GroupBy(field string, fields ...string) *IndicatorGroupBy
- func (iq *IndicatorQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *IndicatorQuery) IDsX(ctx context.Context) []int
- func (iq *IndicatorQuery) Limit(limit int) *IndicatorQuery
- func (iq *IndicatorQuery) Offset(offset int) *IndicatorQuery
- func (iq *IndicatorQuery) Only(ctx context.Context) (*Indicator, error)
- func (iq *IndicatorQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *IndicatorQuery) OnlyIDX(ctx context.Context) int
- func (iq *IndicatorQuery) OnlyX(ctx context.Context) *Indicator
- func (iq *IndicatorQuery) Order(o ...OrderFunc) *IndicatorQuery
- func (iq *IndicatorQuery) QueryAuthor() *UserQuery
- func (iq *IndicatorQuery) QueryDatasets() *DatasetQuery
- func (iq *IndicatorQuery) QueryIndicatorParams() *IndicatorParamsQuery
- func (iq *IndicatorQuery) QueryScale() *ScaleQuery
- func (iq *IndicatorQuery) Select(field string, fields ...string) *IndicatorSelect
- func (iq *IndicatorQuery) Where(ps ...predicate.Indicator) *IndicatorQuery
- func (iq *IndicatorQuery) WithAuthor(opts ...func(*UserQuery)) *IndicatorQuery
- func (iq *IndicatorQuery) WithDatasets(opts ...func(*DatasetQuery)) *IndicatorQuery
- func (iq *IndicatorQuery) WithIndicatorParams(opts ...func(*IndicatorParamsQuery)) *IndicatorQuery
- func (iq *IndicatorQuery) WithScale(opts ...func(*ScaleQuery)) *IndicatorQuery
- type IndicatorSelect
- func (is *IndicatorSelect) Bool(ctx context.Context) (_ bool, err error)
- func (is *IndicatorSelect) BoolX(ctx context.Context) bool
- func (is *IndicatorSelect) Bools(ctx context.Context) ([]bool, error)
- func (is *IndicatorSelect) BoolsX(ctx context.Context) []bool
- func (is *IndicatorSelect) Float64(ctx context.Context) (_ float64, err error)
- func (is *IndicatorSelect) Float64X(ctx context.Context) float64
- func (is *IndicatorSelect) Float64s(ctx context.Context) ([]float64, error)
- func (is *IndicatorSelect) Float64sX(ctx context.Context) []float64
- func (is *IndicatorSelect) Int(ctx context.Context) (_ int, err error)
- func (is *IndicatorSelect) IntX(ctx context.Context) int
- func (is *IndicatorSelect) Ints(ctx context.Context) ([]int, error)
- func (is *IndicatorSelect) IntsX(ctx context.Context) []int
- func (is *IndicatorSelect) Scan(ctx context.Context, v interface{}) error
- func (is *IndicatorSelect) ScanX(ctx context.Context, v interface{})
- func (is *IndicatorSelect) String(ctx context.Context) (_ string, err error)
- func (is *IndicatorSelect) StringX(ctx context.Context) string
- func (is *IndicatorSelect) Strings(ctx context.Context) ([]string, error)
- func (is *IndicatorSelect) StringsX(ctx context.Context) []string
- type IndicatorUpdate
- func (iu *IndicatorUpdate) AddDatasetIDs(ids ...int) *IndicatorUpdate
- func (iu *IndicatorUpdate) AddDatasets(d ...*Dataset) *IndicatorUpdate
- func (iu *IndicatorUpdate) ClearAuthor() *IndicatorUpdate
- func (iu *IndicatorUpdate) ClearDatasets() *IndicatorUpdate
- func (iu *IndicatorUpdate) ClearDescription() *IndicatorUpdate
- func (iu *IndicatorUpdate) ClearIndicatorParams() *IndicatorUpdate
- func (iu *IndicatorUpdate) ClearScale() *IndicatorUpdate
- func (iu *IndicatorUpdate) Exec(ctx context.Context) error
- func (iu *IndicatorUpdate) ExecX(ctx context.Context)
- func (iu *IndicatorUpdate) Mutation() *IndicatorMutation
- func (iu *IndicatorUpdate) RemoveDatasetIDs(ids ...int) *IndicatorUpdate
- func (iu *IndicatorUpdate) RemoveDatasets(d ...*Dataset) *IndicatorUpdate
- func (iu *IndicatorUpdate) Save(ctx context.Context) (int, error)
- func (iu *IndicatorUpdate) SaveX(ctx context.Context) int
- func (iu *IndicatorUpdate) SetActive(b bool) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetAuthor(u *User) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetAuthorID(id int) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetDescription(s string) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetExternal(b bool) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetIndicatorParams(i *IndicatorParams) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetIndicatorParamsID(id int) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetNillableActive(b *bool) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetNillableAuthorID(id *int) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetNillableDescription(s *string) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetNillableExternal(b *bool) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetNillableIndicatorParamsID(id *int) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetScale(s *Scale) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetScaleID(id int) *IndicatorUpdate
- func (iu *IndicatorUpdate) SetTitle(s string) *IndicatorUpdate
- func (iu *IndicatorUpdate) Where(ps ...predicate.Indicator) *IndicatorUpdate
- type IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) AddDatasetIDs(ids ...int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) AddDatasets(d ...*Dataset) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) ClearAuthor() *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) ClearDatasets() *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) ClearDescription() *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) ClearIndicatorParams() *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) ClearScale() *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) Exec(ctx context.Context) error
- func (iuo *IndicatorUpdateOne) ExecX(ctx context.Context)
- func (iuo *IndicatorUpdateOne) Mutation() *IndicatorMutation
- func (iuo *IndicatorUpdateOne) RemoveDatasetIDs(ids ...int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) RemoveDatasets(d ...*Dataset) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) Save(ctx context.Context) (*Indicator, error)
- func (iuo *IndicatorUpdateOne) SaveX(ctx context.Context) *Indicator
- func (iuo *IndicatorUpdateOne) SetActive(b bool) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetAuthor(u *User) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetAuthorID(id int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetDescription(s string) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetExternal(b bool) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetIndicatorParams(i *IndicatorParams) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetIndicatorParamsID(id int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetNillableActive(b *bool) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetNillableAuthorID(id *int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetNillableDescription(s *string) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetNillableExternal(b *bool) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetNillableIndicatorParamsID(id *int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetScale(s *Scale) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetScaleID(id int) *IndicatorUpdateOne
- func (iuo *IndicatorUpdateOne) SetTitle(s string) *IndicatorUpdateOne
- type Indicators
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Observation
- type ObservationClient
- func (c *ObservationClient) Create() *ObservationCreate
- func (c *ObservationClient) CreateBulk(builders ...*ObservationCreate) *ObservationCreateBulk
- func (c *ObservationClient) Delete() *ObservationDelete
- func (c *ObservationClient) DeleteOne(o *Observation) *ObservationDeleteOne
- func (c *ObservationClient) DeleteOneID(id int) *ObservationDeleteOne
- func (c *ObservationClient) Get(ctx context.Context, id int) (*Observation, error)
- func (c *ObservationClient) GetX(ctx context.Context, id int) *Observation
- func (c *ObservationClient) Hooks() []Hook
- func (c *ObservationClient) Query() *ObservationQuery
- func (c *ObservationClient) QueryDataset(o *Observation) *DatasetQuery
- func (c *ObservationClient) Update() *ObservationUpdate
- func (c *ObservationClient) UpdateOne(o *Observation) *ObservationUpdateOne
- func (c *ObservationClient) UpdateOneID(id int) *ObservationUpdateOne
- func (c *ObservationClient) Use(hooks ...Hook)
- type ObservationCreate
- func (oc *ObservationCreate) Mutation() *ObservationMutation
- func (oc *ObservationCreate) Save(ctx context.Context) (*Observation, error)
- func (oc *ObservationCreate) SaveX(ctx context.Context) *Observation
- func (oc *ObservationCreate) SetCreateTime(t time.Time) *ObservationCreate
- func (oc *ObservationCreate) SetDataset(d *Dataset) *ObservationCreate
- func (oc *ObservationCreate) SetDatasetID(id int) *ObservationCreate
- func (oc *ObservationCreate) SetDate(t time.Time) *ObservationCreate
- func (oc *ObservationCreate) SetGranularity(o observation.Granularity) *ObservationCreate
- func (oc *ObservationCreate) SetNillableCreateTime(t *time.Time) *ObservationCreate
- func (oc *ObservationCreate) SetNillableGranularity(o *observation.Granularity) *ObservationCreate
- func (oc *ObservationCreate) SetNillableUpdateTime(t *time.Time) *ObservationCreate
- func (oc *ObservationCreate) SetUpdateTime(t time.Time) *ObservationCreate
- func (oc *ObservationCreate) SetValue(f float64) *ObservationCreate
- type ObservationCreateBulk
- type ObservationDelete
- type ObservationDeleteOne
- type ObservationEdges
- type ObservationGroupBy
- func (ogb *ObservationGroupBy) Aggregate(fns ...AggregateFunc) *ObservationGroupBy
- func (ogb *ObservationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ogb *ObservationGroupBy) BoolX(ctx context.Context) bool
- func (ogb *ObservationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ogb *ObservationGroupBy) BoolsX(ctx context.Context) []bool
- func (ogb *ObservationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ogb *ObservationGroupBy) Float64X(ctx context.Context) float64
- func (ogb *ObservationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ogb *ObservationGroupBy) Float64sX(ctx context.Context) []float64
- func (ogb *ObservationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ogb *ObservationGroupBy) IntX(ctx context.Context) int
- func (ogb *ObservationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ogb *ObservationGroupBy) IntsX(ctx context.Context) []int
- func (ogb *ObservationGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ogb *ObservationGroupBy) ScanX(ctx context.Context, v interface{})
- func (ogb *ObservationGroupBy) String(ctx context.Context) (_ string, err error)
- func (ogb *ObservationGroupBy) StringX(ctx context.Context) string
- func (ogb *ObservationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ogb *ObservationGroupBy) StringsX(ctx context.Context) []string
- type ObservationMutation
- func (m *ObservationMutation) AddField(name string, value ent.Value) error
- func (m *ObservationMutation) AddValue(f float64)
- func (m *ObservationMutation) AddedEdges() []string
- func (m *ObservationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ObservationMutation) AddedFields() []string
- func (m *ObservationMutation) AddedIDs(name string) []ent.Value
- func (m *ObservationMutation) AddedValue() (r float64, exists bool)
- func (m *ObservationMutation) ClearDataset()
- func (m *ObservationMutation) ClearEdge(name string) error
- func (m *ObservationMutation) ClearField(name string) error
- func (m *ObservationMutation) ClearedEdges() []string
- func (m *ObservationMutation) ClearedFields() []string
- func (m ObservationMutation) Client() *Client
- func (m *ObservationMutation) CreateTime() (r time.Time, exists bool)
- func (m *ObservationMutation) DatasetCleared() bool
- func (m *ObservationMutation) DatasetID() (id int, exists bool)
- func (m *ObservationMutation) DatasetIDs() (ids []int)
- func (m *ObservationMutation) Date() (r time.Time, exists bool)
- func (m *ObservationMutation) EdgeCleared(name string) bool
- func (m *ObservationMutation) Field(name string) (ent.Value, bool)
- func (m *ObservationMutation) FieldCleared(name string) bool
- func (m *ObservationMutation) Fields() []string
- func (m *ObservationMutation) Granularity() (r observation.Granularity, exists bool)
- func (m *ObservationMutation) ID() (id int, exists bool)
- func (m *ObservationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ObservationMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *ObservationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ObservationMutation) OldGranularity(ctx context.Context) (v observation.Granularity, err error)
- func (m *ObservationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ObservationMutation) OldValue(ctx context.Context) (v float64, err error)
- func (m *ObservationMutation) Op() Op
- func (m *ObservationMutation) RemovedEdges() []string
- func (m *ObservationMutation) RemovedIDs(name string) []ent.Value
- func (m *ObservationMutation) ResetCreateTime()
- func (m *ObservationMutation) ResetDataset()
- func (m *ObservationMutation) ResetDate()
- func (m *ObservationMutation) ResetEdge(name string) error
- func (m *ObservationMutation) ResetField(name string) error
- func (m *ObservationMutation) ResetGranularity()
- func (m *ObservationMutation) ResetUpdateTime()
- func (m *ObservationMutation) ResetValue()
- func (m *ObservationMutation) SetCreateTime(t time.Time)
- func (m *ObservationMutation) SetDatasetID(id int)
- func (m *ObservationMutation) SetDate(t time.Time)
- func (m *ObservationMutation) SetField(name string, value ent.Value) error
- func (m *ObservationMutation) SetGranularity(o observation.Granularity)
- func (m *ObservationMutation) SetUpdateTime(t time.Time)
- func (m *ObservationMutation) SetValue(f float64)
- func (m ObservationMutation) Tx() (*Tx, error)
- func (m *ObservationMutation) Type() string
- func (m *ObservationMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ObservationMutation) Value() (r float64, exists bool)
- type ObservationQuery
- func (oq *ObservationQuery) All(ctx context.Context) ([]*Observation, error)
- func (oq *ObservationQuery) AllX(ctx context.Context) []*Observation
- func (oq *ObservationQuery) Clone() *ObservationQuery
- func (oq *ObservationQuery) Count(ctx context.Context) (int, error)
- func (oq *ObservationQuery) CountX(ctx context.Context) int
- func (oq *ObservationQuery) Exist(ctx context.Context) (bool, error)
- func (oq *ObservationQuery) ExistX(ctx context.Context) bool
- func (oq *ObservationQuery) First(ctx context.Context) (*Observation, error)
- func (oq *ObservationQuery) FirstID(ctx context.Context) (id int, err error)
- func (oq *ObservationQuery) FirstIDX(ctx context.Context) int
- func (oq *ObservationQuery) FirstX(ctx context.Context) *Observation
- func (oq *ObservationQuery) GroupBy(field string, fields ...string) *ObservationGroupBy
- func (oq *ObservationQuery) IDs(ctx context.Context) ([]int, error)
- func (oq *ObservationQuery) IDsX(ctx context.Context) []int
- func (oq *ObservationQuery) Limit(limit int) *ObservationQuery
- func (oq *ObservationQuery) Offset(offset int) *ObservationQuery
- func (oq *ObservationQuery) Only(ctx context.Context) (*Observation, error)
- func (oq *ObservationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oq *ObservationQuery) OnlyIDX(ctx context.Context) int
- func (oq *ObservationQuery) OnlyX(ctx context.Context) *Observation
- func (oq *ObservationQuery) Order(o ...OrderFunc) *ObservationQuery
- func (oq *ObservationQuery) QueryDataset() *DatasetQuery
- func (oq *ObservationQuery) Select(field string, fields ...string) *ObservationSelect
- func (oq *ObservationQuery) Where(ps ...predicate.Observation) *ObservationQuery
- func (oq *ObservationQuery) WithDataset(opts ...func(*DatasetQuery)) *ObservationQuery
- type ObservationSelect
- func (os *ObservationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (os *ObservationSelect) BoolX(ctx context.Context) bool
- func (os *ObservationSelect) Bools(ctx context.Context) ([]bool, error)
- func (os *ObservationSelect) BoolsX(ctx context.Context) []bool
- func (os *ObservationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (os *ObservationSelect) Float64X(ctx context.Context) float64
- func (os *ObservationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (os *ObservationSelect) Float64sX(ctx context.Context) []float64
- func (os *ObservationSelect) Int(ctx context.Context) (_ int, err error)
- func (os *ObservationSelect) IntX(ctx context.Context) int
- func (os *ObservationSelect) Ints(ctx context.Context) ([]int, error)
- func (os *ObservationSelect) IntsX(ctx context.Context) []int
- func (os *ObservationSelect) Scan(ctx context.Context, v interface{}) error
- func (os *ObservationSelect) ScanX(ctx context.Context, v interface{})
- func (os *ObservationSelect) String(ctx context.Context) (_ string, err error)
- func (os *ObservationSelect) StringX(ctx context.Context) string
- func (os *ObservationSelect) Strings(ctx context.Context) ([]string, error)
- func (os *ObservationSelect) StringsX(ctx context.Context) []string
- type ObservationUpdate
- func (ou *ObservationUpdate) AddValue(f float64) *ObservationUpdate
- func (ou *ObservationUpdate) ClearDataset() *ObservationUpdate
- func (ou *ObservationUpdate) Exec(ctx context.Context) error
- func (ou *ObservationUpdate) ExecX(ctx context.Context)
- func (ou *ObservationUpdate) Mutation() *ObservationMutation
- func (ou *ObservationUpdate) Save(ctx context.Context) (int, error)
- func (ou *ObservationUpdate) SaveX(ctx context.Context) int
- func (ou *ObservationUpdate) SetDataset(d *Dataset) *ObservationUpdate
- func (ou *ObservationUpdate) SetDatasetID(id int) *ObservationUpdate
- func (ou *ObservationUpdate) SetDate(t time.Time) *ObservationUpdate
- func (ou *ObservationUpdate) SetValue(f float64) *ObservationUpdate
- func (ou *ObservationUpdate) Where(ps ...predicate.Observation) *ObservationUpdate
- type ObservationUpdateOne
- func (ouo *ObservationUpdateOne) AddValue(f float64) *ObservationUpdateOne
- func (ouo *ObservationUpdateOne) ClearDataset() *ObservationUpdateOne
- func (ouo *ObservationUpdateOne) Exec(ctx context.Context) error
- func (ouo *ObservationUpdateOne) ExecX(ctx context.Context)
- func (ouo *ObservationUpdateOne) Mutation() *ObservationMutation
- func (ouo *ObservationUpdateOne) Save(ctx context.Context) (*Observation, error)
- func (ouo *ObservationUpdateOne) SaveX(ctx context.Context) *Observation
- func (ouo *ObservationUpdateOne) SetDataset(d *Dataset) *ObservationUpdateOne
- func (ouo *ObservationUpdateOne) SetDatasetID(id int) *ObservationUpdateOne
- func (ouo *ObservationUpdateOne) SetDate(t time.Time) *ObservationUpdateOne
- func (ouo *ObservationUpdateOne) SetValue(f float64) *ObservationUpdateOne
- type Observations
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Scale
- type ScaleClient
- func (c *ScaleClient) Create() *ScaleCreate
- func (c *ScaleClient) CreateBulk(builders ...*ScaleCreate) *ScaleCreateBulk
- func (c *ScaleClient) Delete() *ScaleDelete
- func (c *ScaleClient) DeleteOne(s *Scale) *ScaleDeleteOne
- func (c *ScaleClient) DeleteOneID(id int) *ScaleDeleteOne
- func (c *ScaleClient) Get(ctx context.Context, id int) (*Scale, error)
- func (c *ScaleClient) GetX(ctx context.Context, id int) *Scale
- func (c *ScaleClient) Hooks() []Hook
- func (c *ScaleClient) Query() *ScaleQuery
- func (c *ScaleClient) QueryIndicators(s *Scale) *IndicatorQuery
- func (c *ScaleClient) Update() *ScaleUpdate
- func (c *ScaleClient) UpdateOne(s *Scale) *ScaleUpdateOne
- func (c *ScaleClient) UpdateOneID(id int) *ScaleUpdateOne
- func (c *ScaleClient) Use(hooks ...Hook)
- type ScaleCreate
- func (sc *ScaleCreate) AddIndicatorIDs(ids ...int) *ScaleCreate
- func (sc *ScaleCreate) AddIndicators(i ...*Indicator) *ScaleCreate
- func (sc *ScaleCreate) Mutation() *ScaleMutation
- func (sc *ScaleCreate) Save(ctx context.Context) (*Scale, error)
- func (sc *ScaleCreate) SaveX(ctx context.Context) *Scale
- func (sc *ScaleCreate) SetDescription(s string) *ScaleCreate
- func (sc *ScaleCreate) SetTitle(s string) *ScaleCreate
- func (sc *ScaleCreate) SetType(s string) *ScaleCreate
- type ScaleCreateBulk
- type ScaleDelete
- type ScaleDeleteOne
- type ScaleEdges
- type ScaleGroupBy
- func (sgb *ScaleGroupBy) Aggregate(fns ...AggregateFunc) *ScaleGroupBy
- func (sgb *ScaleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *ScaleGroupBy) BoolX(ctx context.Context) bool
- func (sgb *ScaleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *ScaleGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *ScaleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *ScaleGroupBy) Float64X(ctx context.Context) float64
- func (sgb *ScaleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *ScaleGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *ScaleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *ScaleGroupBy) IntX(ctx context.Context) int
- func (sgb *ScaleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *ScaleGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ScaleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *ScaleGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *ScaleGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *ScaleGroupBy) StringX(ctx context.Context) string
- func (sgb *ScaleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *ScaleGroupBy) StringsX(ctx context.Context) []string
- type ScaleMutation
- func (m *ScaleMutation) AddField(name string, value ent.Value) error
- func (m *ScaleMutation) AddIndicatorIDs(ids ...int)
- func (m *ScaleMutation) AddedEdges() []string
- func (m *ScaleMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScaleMutation) AddedFields() []string
- func (m *ScaleMutation) AddedIDs(name string) []ent.Value
- func (m *ScaleMutation) ClearEdge(name string) error
- func (m *ScaleMutation) ClearField(name string) error
- func (m *ScaleMutation) ClearIndicators()
- func (m *ScaleMutation) ClearedEdges() []string
- func (m *ScaleMutation) ClearedFields() []string
- func (m ScaleMutation) Client() *Client
- func (m *ScaleMutation) Description() (r string, exists bool)
- func (m *ScaleMutation) EdgeCleared(name string) bool
- func (m *ScaleMutation) Field(name string) (ent.Value, bool)
- func (m *ScaleMutation) FieldCleared(name string) bool
- func (m *ScaleMutation) Fields() []string
- func (m *ScaleMutation) GetType() (r string, exists bool)
- func (m *ScaleMutation) ID() (id int, exists bool)
- func (m *ScaleMutation) IndicatorsCleared() bool
- func (m *ScaleMutation) IndicatorsIDs() (ids []int)
- func (m *ScaleMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ScaleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScaleMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ScaleMutation) OldType(ctx context.Context) (v string, err error)
- func (m *ScaleMutation) Op() Op
- func (m *ScaleMutation) RemoveIndicatorIDs(ids ...int)
- func (m *ScaleMutation) RemovedEdges() []string
- func (m *ScaleMutation) RemovedIDs(name string) []ent.Value
- func (m *ScaleMutation) RemovedIndicatorsIDs() (ids []int)
- func (m *ScaleMutation) ResetDescription()
- func (m *ScaleMutation) ResetEdge(name string) error
- func (m *ScaleMutation) ResetField(name string) error
- func (m *ScaleMutation) ResetIndicators()
- func (m *ScaleMutation) ResetTitle()
- func (m *ScaleMutation) ResetType()
- func (m *ScaleMutation) SetDescription(s string)
- func (m *ScaleMutation) SetField(name string, value ent.Value) error
- func (m *ScaleMutation) SetTitle(s string)
- func (m *ScaleMutation) SetType(s string)
- func (m *ScaleMutation) Title() (r string, exists bool)
- func (m ScaleMutation) Tx() (*Tx, error)
- func (m *ScaleMutation) Type() string
- type ScaleQuery
- func (sq *ScaleQuery) All(ctx context.Context) ([]*Scale, error)
- func (sq *ScaleQuery) AllX(ctx context.Context) []*Scale
- func (sq *ScaleQuery) Clone() *ScaleQuery
- func (sq *ScaleQuery) Count(ctx context.Context) (int, error)
- func (sq *ScaleQuery) CountX(ctx context.Context) int
- func (sq *ScaleQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ScaleQuery) ExistX(ctx context.Context) bool
- func (sq *ScaleQuery) First(ctx context.Context) (*Scale, error)
- func (sq *ScaleQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ScaleQuery) FirstIDX(ctx context.Context) int
- func (sq *ScaleQuery) FirstX(ctx context.Context) *Scale
- func (sq *ScaleQuery) GroupBy(field string, fields ...string) *ScaleGroupBy
- func (sq *ScaleQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *ScaleQuery) IDsX(ctx context.Context) []int
- func (sq *ScaleQuery) Limit(limit int) *ScaleQuery
- func (sq *ScaleQuery) Offset(offset int) *ScaleQuery
- func (sq *ScaleQuery) Only(ctx context.Context) (*Scale, error)
- func (sq *ScaleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ScaleQuery) OnlyIDX(ctx context.Context) int
- func (sq *ScaleQuery) OnlyX(ctx context.Context) *Scale
- func (sq *ScaleQuery) Order(o ...OrderFunc) *ScaleQuery
- func (sq *ScaleQuery) QueryIndicators() *IndicatorQuery
- func (sq *ScaleQuery) Select(field string, fields ...string) *ScaleSelect
- func (sq *ScaleQuery) Where(ps ...predicate.Scale) *ScaleQuery
- func (sq *ScaleQuery) WithIndicators(opts ...func(*IndicatorQuery)) *ScaleQuery
- type ScaleSelect
- func (ss *ScaleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *ScaleSelect) BoolX(ctx context.Context) bool
- func (ss *ScaleSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *ScaleSelect) BoolsX(ctx context.Context) []bool
- func (ss *ScaleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *ScaleSelect) Float64X(ctx context.Context) float64
- func (ss *ScaleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *ScaleSelect) Float64sX(ctx context.Context) []float64
- func (ss *ScaleSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *ScaleSelect) IntX(ctx context.Context) int
- func (ss *ScaleSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *ScaleSelect) IntsX(ctx context.Context) []int
- func (ss *ScaleSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *ScaleSelect) ScanX(ctx context.Context, v interface{})
- func (ss *ScaleSelect) String(ctx context.Context) (_ string, err error)
- func (ss *ScaleSelect) StringX(ctx context.Context) string
- func (ss *ScaleSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *ScaleSelect) StringsX(ctx context.Context) []string
- type ScaleUpdate
- func (su *ScaleUpdate) AddIndicatorIDs(ids ...int) *ScaleUpdate
- func (su *ScaleUpdate) AddIndicators(i ...*Indicator) *ScaleUpdate
- func (su *ScaleUpdate) ClearIndicators() *ScaleUpdate
- func (su *ScaleUpdate) Exec(ctx context.Context) error
- func (su *ScaleUpdate) ExecX(ctx context.Context)
- func (su *ScaleUpdate) Mutation() *ScaleMutation
- func (su *ScaleUpdate) RemoveIndicatorIDs(ids ...int) *ScaleUpdate
- func (su *ScaleUpdate) RemoveIndicators(i ...*Indicator) *ScaleUpdate
- func (su *ScaleUpdate) Save(ctx context.Context) (int, error)
- func (su *ScaleUpdate) SaveX(ctx context.Context) int
- func (su *ScaleUpdate) SetDescription(s string) *ScaleUpdate
- func (su *ScaleUpdate) Where(ps ...predicate.Scale) *ScaleUpdate
- type ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddIndicatorIDs(ids ...int) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) AddIndicators(i ...*Indicator) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) ClearIndicators() *ScaleUpdateOne
- func (suo *ScaleUpdateOne) Exec(ctx context.Context) error
- func (suo *ScaleUpdateOne) ExecX(ctx context.Context)
- func (suo *ScaleUpdateOne) Mutation() *ScaleMutation
- func (suo *ScaleUpdateOne) RemoveIndicatorIDs(ids ...int) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) RemoveIndicators(i ...*Indicator) *ScaleUpdateOne
- func (suo *ScaleUpdateOne) Save(ctx context.Context) (*Scale, error)
- func (suo *ScaleUpdateOne) SaveX(ctx context.Context) *Scale
- func (suo *ScaleUpdateOne) SetDescription(s string) *ScaleUpdateOne
- type Scales
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryDatasets(u *User) *DatasetQuery
- func (c *UserClient) QueryIndicators(u *User) *IndicatorQuery
- func (c *UserClient) QuerySettings(u *User) *UserSettingsQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddDatasetIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddDatasets(d ...*Dataset) *UserCreate
- func (uc *UserCreate) AddIndicatorIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddIndicators(i ...*Indicator) *UserCreate
- func (uc *UserCreate) AddSettingIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddSettings(u ...*UserSettings) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableService(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
- func (uc *UserCreate) SetService(b bool) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddDatasetIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddIndicatorIDs(ids ...int)
- func (m *UserMutation) AddSettingIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearDatasets()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearIndicators()
- func (m *UserMutation) ClearSettings()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) DatasetsCleared() bool
- func (m *UserMutation) DatasetsIDs() (ids []int)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IndicatorsCleared() bool
- func (m *UserMutation) IndicatorsIDs() (ids []int)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldService(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PasswordHash() (r string, exists bool)
- func (m *UserMutation) RemoveDatasetIDs(ids ...int)
- func (m *UserMutation) RemoveIndicatorIDs(ids ...int)
- func (m *UserMutation) RemoveSettingIDs(ids ...int)
- func (m *UserMutation) RemovedDatasetsIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedIndicatorsIDs() (ids []int)
- func (m *UserMutation) RemovedSettingsIDs() (ids []int)
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetDatasets()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIndicators()
- func (m *UserMutation) ResetPasswordHash()
- func (m *UserMutation) ResetService()
- func (m *UserMutation) ResetSettings()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) Service() (r bool, exists bool)
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetPasswordHash(s string)
- func (m *UserMutation) SetService(b bool)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) SettingsCleared() bool
- func (m *UserMutation) SettingsIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryDatasets() *DatasetQuery
- func (uq *UserQuery) QueryIndicators() *IndicatorQuery
- func (uq *UserQuery) QuerySettings() *UserSettingsQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithDatasets(opts ...func(*DatasetQuery)) *UserQuery
- func (uq *UserQuery) WithIndicators(opts ...func(*IndicatorQuery)) *UserQuery
- func (uq *UserQuery) WithSettings(opts ...func(*UserSettingsQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserSettings
- type UserSettingsClient
- func (c *UserSettingsClient) Create() *UserSettingsCreate
- func (c *UserSettingsClient) CreateBulk(builders ...*UserSettingsCreate) *UserSettingsCreateBulk
- func (c *UserSettingsClient) Delete() *UserSettingsDelete
- func (c *UserSettingsClient) DeleteOne(us *UserSettings) *UserSettingsDeleteOne
- func (c *UserSettingsClient) DeleteOneID(id int) *UserSettingsDeleteOne
- func (c *UserSettingsClient) Get(ctx context.Context, id int) (*UserSettings, error)
- func (c *UserSettingsClient) GetX(ctx context.Context, id int) *UserSettings
- func (c *UserSettingsClient) Hooks() []Hook
- func (c *UserSettingsClient) Query() *UserSettingsQuery
- func (c *UserSettingsClient) QueryUser(us *UserSettings) *UserQuery
- func (c *UserSettingsClient) Update() *UserSettingsUpdate
- func (c *UserSettingsClient) UpdateOne(us *UserSettings) *UserSettingsUpdateOne
- func (c *UserSettingsClient) UpdateOneID(id int) *UserSettingsUpdateOne
- func (c *UserSettingsClient) Use(hooks ...Hook)
- type UserSettingsCreate
- func (usc *UserSettingsCreate) Mutation() *UserSettingsMutation
- func (usc *UserSettingsCreate) Save(ctx context.Context) (*UserSettings, error)
- func (usc *UserSettingsCreate) SaveX(ctx context.Context) *UserSettings
- func (usc *UserSettingsCreate) SetUser(u *User) *UserSettingsCreate
- func (usc *UserSettingsCreate) SetUserID(id int) *UserSettingsCreate
- type UserSettingsCreateBulk
- type UserSettingsDelete
- type UserSettingsDeleteOne
- type UserSettingsEdges
- type UserSettingsGroupBy
- func (usgb *UserSettingsGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingsGroupBy
- func (usgb *UserSettingsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (usgb *UserSettingsGroupBy) BoolX(ctx context.Context) bool
- func (usgb *UserSettingsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (usgb *UserSettingsGroupBy) BoolsX(ctx context.Context) []bool
- func (usgb *UserSettingsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (usgb *UserSettingsGroupBy) Float64X(ctx context.Context) float64
- func (usgb *UserSettingsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (usgb *UserSettingsGroupBy) Float64sX(ctx context.Context) []float64
- func (usgb *UserSettingsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (usgb *UserSettingsGroupBy) IntX(ctx context.Context) int
- func (usgb *UserSettingsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (usgb *UserSettingsGroupBy) IntsX(ctx context.Context) []int
- func (usgb *UserSettingsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (usgb *UserSettingsGroupBy) ScanX(ctx context.Context, v interface{})
- func (usgb *UserSettingsGroupBy) String(ctx context.Context) (_ string, err error)
- func (usgb *UserSettingsGroupBy) StringX(ctx context.Context) string
- func (usgb *UserSettingsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (usgb *UserSettingsGroupBy) StringsX(ctx context.Context) []string
- type UserSettingsMutation
- func (m *UserSettingsMutation) AddField(name string, value ent.Value) error
- func (m *UserSettingsMutation) AddedEdges() []string
- func (m *UserSettingsMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSettingsMutation) AddedFields() []string
- func (m *UserSettingsMutation) AddedIDs(name string) []ent.Value
- func (m *UserSettingsMutation) ClearEdge(name string) error
- func (m *UserSettingsMutation) ClearField(name string) error
- func (m *UserSettingsMutation) ClearUser()
- func (m *UserSettingsMutation) ClearedEdges() []string
- func (m *UserSettingsMutation) ClearedFields() []string
- func (m UserSettingsMutation) Client() *Client
- func (m *UserSettingsMutation) EdgeCleared(name string) bool
- func (m *UserSettingsMutation) Field(name string) (ent.Value, bool)
- func (m *UserSettingsMutation) FieldCleared(name string) bool
- func (m *UserSettingsMutation) Fields() []string
- func (m *UserSettingsMutation) ID() (id int, exists bool)
- func (m *UserSettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSettingsMutation) Op() Op
- func (m *UserSettingsMutation) RemovedEdges() []string
- func (m *UserSettingsMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSettingsMutation) ResetEdge(name string) error
- func (m *UserSettingsMutation) ResetField(name string) error
- func (m *UserSettingsMutation) ResetUser()
- func (m *UserSettingsMutation) SetField(name string, value ent.Value) error
- func (m *UserSettingsMutation) SetUserID(id int)
- func (m UserSettingsMutation) Tx() (*Tx, error)
- func (m *UserSettingsMutation) Type() string
- func (m *UserSettingsMutation) UserCleared() bool
- func (m *UserSettingsMutation) UserID() (id int, exists bool)
- func (m *UserSettingsMutation) UserIDs() (ids []int)
- type UserSettingsQuery
- func (usq *UserSettingsQuery) All(ctx context.Context) ([]*UserSettings, error)
- func (usq *UserSettingsQuery) AllX(ctx context.Context) []*UserSettings
- func (usq *UserSettingsQuery) Clone() *UserSettingsQuery
- func (usq *UserSettingsQuery) Count(ctx context.Context) (int, error)
- func (usq *UserSettingsQuery) CountX(ctx context.Context) int
- func (usq *UserSettingsQuery) Exist(ctx context.Context) (bool, error)
- func (usq *UserSettingsQuery) ExistX(ctx context.Context) bool
- func (usq *UserSettingsQuery) First(ctx context.Context) (*UserSettings, error)
- func (usq *UserSettingsQuery) FirstID(ctx context.Context) (id int, err error)
- func (usq *UserSettingsQuery) FirstIDX(ctx context.Context) int
- func (usq *UserSettingsQuery) FirstX(ctx context.Context) *UserSettings
- func (usq *UserSettingsQuery) GroupBy(field string, fields ...string) *UserSettingsGroupBy
- func (usq *UserSettingsQuery) IDs(ctx context.Context) ([]int, error)
- func (usq *UserSettingsQuery) IDsX(ctx context.Context) []int
- func (usq *UserSettingsQuery) Limit(limit int) *UserSettingsQuery
- func (usq *UserSettingsQuery) Offset(offset int) *UserSettingsQuery
- func (usq *UserSettingsQuery) Only(ctx context.Context) (*UserSettings, error)
- func (usq *UserSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (usq *UserSettingsQuery) OnlyIDX(ctx context.Context) int
- func (usq *UserSettingsQuery) OnlyX(ctx context.Context) *UserSettings
- func (usq *UserSettingsQuery) Order(o ...OrderFunc) *UserSettingsQuery
- func (usq *UserSettingsQuery) QueryUser() *UserQuery
- func (usq *UserSettingsQuery) Select(field string, fields ...string) *UserSettingsSelect
- func (usq *UserSettingsQuery) Where(ps ...predicate.UserSettings) *UserSettingsQuery
- func (usq *UserSettingsQuery) WithUser(opts ...func(*UserQuery)) *UserSettingsQuery
- type UserSettingsSelect
- func (uss *UserSettingsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uss *UserSettingsSelect) BoolX(ctx context.Context) bool
- func (uss *UserSettingsSelect) Bools(ctx context.Context) ([]bool, error)
- func (uss *UserSettingsSelect) BoolsX(ctx context.Context) []bool
- func (uss *UserSettingsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uss *UserSettingsSelect) Float64X(ctx context.Context) float64
- func (uss *UserSettingsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uss *UserSettingsSelect) Float64sX(ctx context.Context) []float64
- func (uss *UserSettingsSelect) Int(ctx context.Context) (_ int, err error)
- func (uss *UserSettingsSelect) IntX(ctx context.Context) int
- func (uss *UserSettingsSelect) Ints(ctx context.Context) ([]int, error)
- func (uss *UserSettingsSelect) IntsX(ctx context.Context) []int
- func (uss *UserSettingsSelect) Scan(ctx context.Context, v interface{}) error
- func (uss *UserSettingsSelect) ScanX(ctx context.Context, v interface{})
- func (uss *UserSettingsSelect) String(ctx context.Context) (_ string, err error)
- func (uss *UserSettingsSelect) StringX(ctx context.Context) string
- func (uss *UserSettingsSelect) Strings(ctx context.Context) ([]string, error)
- func (uss *UserSettingsSelect) StringsX(ctx context.Context) []string
- type UserSettingsSlice
- type UserSettingsUpdate
- func (usu *UserSettingsUpdate) ClearUser() *UserSettingsUpdate
- func (usu *UserSettingsUpdate) Exec(ctx context.Context) error
- func (usu *UserSettingsUpdate) ExecX(ctx context.Context)
- func (usu *UserSettingsUpdate) Mutation() *UserSettingsMutation
- func (usu *UserSettingsUpdate) Save(ctx context.Context) (int, error)
- func (usu *UserSettingsUpdate) SaveX(ctx context.Context) int
- func (usu *UserSettingsUpdate) SetUser(u *User) *UserSettingsUpdate
- func (usu *UserSettingsUpdate) SetUserID(id int) *UserSettingsUpdate
- func (usu *UserSettingsUpdate) Where(ps ...predicate.UserSettings) *UserSettingsUpdate
- type UserSettingsUpdateOne
- func (usuo *UserSettingsUpdateOne) ClearUser() *UserSettingsUpdateOne
- func (usuo *UserSettingsUpdateOne) Exec(ctx context.Context) error
- func (usuo *UserSettingsUpdateOne) ExecX(ctx context.Context)
- func (usuo *UserSettingsUpdateOne) Mutation() *UserSettingsMutation
- func (usuo *UserSettingsUpdateOne) Save(ctx context.Context) (*UserSettings, error)
- func (usuo *UserSettingsUpdateOne) SaveX(ctx context.Context) *UserSettings
- func (usuo *UserSettingsUpdateOne) SetUser(u *User) *UserSettingsUpdateOne
- func (usuo *UserSettingsUpdateOne) SetUserID(id int) *UserSettingsUpdateOne
- type UserUpdate
- func (uu *UserUpdate) AddDatasetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddDatasets(d ...*Dataset) *UserUpdate
- func (uu *UserUpdate) AddIndicatorIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddIndicators(i ...*Indicator) *UserUpdate
- func (uu *UserUpdate) AddSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddSettings(u ...*UserSettings) *UserUpdate
- func (uu *UserUpdate) ClearDatasets() *UserUpdate
- func (uu *UserUpdate) ClearIndicators() *UserUpdate
- func (uu *UserUpdate) ClearSettings() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveDatasetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveDatasets(d ...*Dataset) *UserUpdate
- func (uu *UserUpdate) RemoveIndicatorIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveIndicators(i ...*Indicator) *UserUpdate
- func (uu *UserUpdate) RemoveSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveSettings(u ...*UserSettings) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableService(b *bool) *UserUpdate
- func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
- func (uu *UserUpdate) SetService(b bool) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddDatasetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDatasets(d ...*Dataset) *UserUpdateOne
- func (uuo *UserUpdateOne) AddIndicatorIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddIndicators(i ...*Indicator) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSettings(u ...*UserSettings) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDatasets() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIndicators() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSettings() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveDatasetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDatasets(d ...*Dataset) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveIndicatorIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveIndicators(i ...*Indicator) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveSettings(u ...*UserSettings) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableService(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetService(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- type Users
- 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. TypeCorrelation = "Correlation" TypeDataset = "Dataset" TypeDatasetParams = "DatasetParams" TypeDictionary = "Dictionary" TypeDictionaryEntry = "DictionaryEntry" TypeIndicator = "Indicator" TypeIndicatorParams = "IndicatorParams" TypeObservation = "Observation" TypeScale = "Scale" TypeUser = "User" TypeUserSettings = "UserSettings" )
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 Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Correlation is the client for interacting with the Correlation builders.
Correlation *CorrelationClient
// Dataset is the client for interacting with the Dataset builders.
Dataset *DatasetClient
// DatasetParams is the client for interacting with the DatasetParams builders.
DatasetParams *DatasetParamsClient
// Dictionary is the client for interacting with the Dictionary builders.
Dictionary *DictionaryClient
// DictionaryEntry is the client for interacting with the DictionaryEntry builders.
DictionaryEntry *DictionaryEntryClient
// Indicator is the client for interacting with the Indicator builders.
Indicator *IndicatorClient
// IndicatorParams is the client for interacting with the IndicatorParams builders.
IndicatorParams *IndicatorParamsClient
// Observation is the client for interacting with the Observation builders.
Observation *ObservationClient
// Scale is the client for interacting with the Scale builders.
Scale *ScaleClient
// User is the client for interacting with the User builders.
User *UserClient
// UserSettings is the client for interacting with the UserSettings builders.
UserSettings *UserSettingsClient
// 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(). Correlation. 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 Correlation ¶
type Correlation 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"`
// Coef holds the value of the "coef" field.
Coef float64 `json:"coef,omitempty"`
// P holds the value of the "p" field.
P float64 `json:"p,omitempty"`
// R2 holds the value of the "r2" field.
R2 float64 `json:"r2,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Granularity holds the value of the "granularity" field.
Granularity correlation.Granularity `json:"granularity,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the CorrelationQuery when eager-loading is set.
Edges CorrelationEdges `json:"edges"`
// contains filtered or unexported fields
}
Correlation is the model entity for the Correlation schema.
func (*Correlation) QueryLeft ¶
func (c *Correlation) QueryLeft() *DatasetQuery
QueryLeft queries the "left" edge of the Correlation entity.
func (*Correlation) QueryRight ¶
func (c *Correlation) QueryRight() *DatasetQuery
QueryRight queries the "right" edge of the Correlation entity.
func (*Correlation) String ¶
func (c *Correlation) String() string
String implements the fmt.Stringer.
func (*Correlation) Unwrap ¶
func (c *Correlation) Unwrap() *Correlation
Unwrap unwraps the Correlation 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 (*Correlation) Update ¶
func (c *Correlation) Update() *CorrelationUpdateOne
Update returns a builder for updating this Correlation. Note that you need to call Correlation.Unwrap() before calling this method if this Correlation was returned from a transaction, and the transaction was committed or rolled back.
type CorrelationClient ¶
type CorrelationClient struct {
// contains filtered or unexported fields
}
CorrelationClient is a client for the Correlation schema.
func NewCorrelationClient ¶
func NewCorrelationClient(c config) *CorrelationClient
NewCorrelationClient returns a client for the Correlation from the given config.
func (*CorrelationClient) Create ¶
func (c *CorrelationClient) Create() *CorrelationCreate
Create returns a create builder for Correlation.
func (*CorrelationClient) CreateBulk ¶
func (c *CorrelationClient) CreateBulk(builders ...*CorrelationCreate) *CorrelationCreateBulk
CreateBulk returns a builder for creating a bulk of Correlation entities.
func (*CorrelationClient) Delete ¶
func (c *CorrelationClient) Delete() *CorrelationDelete
Delete returns a delete builder for Correlation.
func (*CorrelationClient) DeleteOne ¶
func (c *CorrelationClient) DeleteOne(co *Correlation) *CorrelationDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*CorrelationClient) DeleteOneID ¶
func (c *CorrelationClient) DeleteOneID(id int) *CorrelationDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*CorrelationClient) Get ¶
func (c *CorrelationClient) Get(ctx context.Context, id int) (*Correlation, error)
Get returns a Correlation entity by its id.
func (*CorrelationClient) GetX ¶
func (c *CorrelationClient) GetX(ctx context.Context, id int) *Correlation
GetX is like Get, but panics if an error occurs.
func (*CorrelationClient) Hooks ¶
func (c *CorrelationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CorrelationClient) Query ¶
func (c *CorrelationClient) Query() *CorrelationQuery
Query returns a query builder for Correlation.
func (*CorrelationClient) QueryLeft ¶
func (c *CorrelationClient) QueryLeft(co *Correlation) *DatasetQuery
QueryLeft queries the left edge of a Correlation.
func (*CorrelationClient) QueryRight ¶
func (c *CorrelationClient) QueryRight(co *Correlation) *DatasetQuery
QueryRight queries the right edge of a Correlation.
func (*CorrelationClient) Update ¶
func (c *CorrelationClient) Update() *CorrelationUpdate
Update returns an update builder for Correlation.
func (*CorrelationClient) UpdateOne ¶
func (c *CorrelationClient) UpdateOne(co *Correlation) *CorrelationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CorrelationClient) UpdateOneID ¶
func (c *CorrelationClient) UpdateOneID(id int) *CorrelationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CorrelationClient) Use ¶
func (c *CorrelationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `correlation.Hooks(f(g(h())))`.
type CorrelationCreate ¶
type CorrelationCreate struct {
// contains filtered or unexported fields
}
CorrelationCreate is the builder for creating a Correlation entity.
func (*CorrelationCreate) Mutation ¶
func (cc *CorrelationCreate) Mutation() *CorrelationMutation
Mutation returns the CorrelationMutation object of the builder.
func (*CorrelationCreate) Save ¶
func (cc *CorrelationCreate) Save(ctx context.Context) (*Correlation, error)
Save creates the Correlation in the database.
func (*CorrelationCreate) SaveX ¶
func (cc *CorrelationCreate) SaveX(ctx context.Context) *Correlation
SaveX calls Save and panics if Save returns an error.
func (*CorrelationCreate) SetCoef ¶
func (cc *CorrelationCreate) SetCoef(f float64) *CorrelationCreate
SetCoef sets the "coef" field.
func (*CorrelationCreate) SetCreateTime ¶
func (cc *CorrelationCreate) SetCreateTime(t time.Time) *CorrelationCreate
SetCreateTime sets the "create_time" field.
func (*CorrelationCreate) SetGranularity ¶
func (cc *CorrelationCreate) SetGranularity(c correlation.Granularity) *CorrelationCreate
SetGranularity sets the "granularity" field.
func (*CorrelationCreate) SetLeft ¶
func (cc *CorrelationCreate) SetLeft(d *Dataset) *CorrelationCreate
SetLeft sets the "left" edge to the Dataset entity.
func (*CorrelationCreate) SetLeftID ¶
func (cc *CorrelationCreate) SetLeftID(id int) *CorrelationCreate
SetLeftID sets the "left" edge to the Dataset entity by ID.
func (*CorrelationCreate) SetNillableCreateTime ¶
func (cc *CorrelationCreate) SetNillableCreateTime(t *time.Time) *CorrelationCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*CorrelationCreate) SetNillableGranularity ¶
func (cc *CorrelationCreate) SetNillableGranularity(c *correlation.Granularity) *CorrelationCreate
SetNillableGranularity sets the "granularity" field if the given value is not nil.
func (*CorrelationCreate) SetNillableUpdateTime ¶
func (cc *CorrelationCreate) SetNillableUpdateTime(t *time.Time) *CorrelationCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*CorrelationCreate) SetP ¶
func (cc *CorrelationCreate) SetP(f float64) *CorrelationCreate
SetP sets the "p" field.
func (*CorrelationCreate) SetR2 ¶
func (cc *CorrelationCreate) SetR2(f float64) *CorrelationCreate
SetR2 sets the "r2" field.
func (*CorrelationCreate) SetRight ¶
func (cc *CorrelationCreate) SetRight(d *Dataset) *CorrelationCreate
SetRight sets the "right" edge to the Dataset entity.
func (*CorrelationCreate) SetRightID ¶
func (cc *CorrelationCreate) SetRightID(id int) *CorrelationCreate
SetRightID sets the "right" edge to the Dataset entity by ID.
func (*CorrelationCreate) SetType ¶
func (cc *CorrelationCreate) SetType(s string) *CorrelationCreate
SetType sets the "type" field.
func (*CorrelationCreate) SetUpdateTime ¶
func (cc *CorrelationCreate) SetUpdateTime(t time.Time) *CorrelationCreate
SetUpdateTime sets the "update_time" field.
type CorrelationCreateBulk ¶
type CorrelationCreateBulk struct {
// contains filtered or unexported fields
}
CorrelationCreateBulk is the builder for creating many Correlation entities in bulk.
func (*CorrelationCreateBulk) Save ¶
func (ccb *CorrelationCreateBulk) Save(ctx context.Context) ([]*Correlation, error)
Save creates the Correlation entities in the database.
func (*CorrelationCreateBulk) SaveX ¶
func (ccb *CorrelationCreateBulk) SaveX(ctx context.Context) []*Correlation
SaveX is like Save, but panics if an error occurs.
type CorrelationDelete ¶
type CorrelationDelete struct {
// contains filtered or unexported fields
}
CorrelationDelete is the builder for deleting a Correlation entity.
func (*CorrelationDelete) Exec ¶
func (cd *CorrelationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CorrelationDelete) ExecX ¶
func (cd *CorrelationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CorrelationDelete) Where ¶
func (cd *CorrelationDelete) Where(ps ...predicate.Correlation) *CorrelationDelete
Where adds a new predicate to the CorrelationDelete builder.
type CorrelationDeleteOne ¶
type CorrelationDeleteOne struct {
// contains filtered or unexported fields
}
CorrelationDeleteOne is the builder for deleting a single Correlation entity.
func (*CorrelationDeleteOne) Exec ¶
func (cdo *CorrelationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CorrelationDeleteOne) ExecX ¶
func (cdo *CorrelationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CorrelationEdges ¶
type CorrelationEdges struct {
// Left holds the value of the left edge.
Left *Dataset `json:"left,omitempty"`
// Right holds the value of the right edge.
Right *Dataset `json:"right,omitempty"`
// contains filtered or unexported fields
}
CorrelationEdges holds the relations/edges for other nodes in the graph.
func (CorrelationEdges) LeftOrErr ¶
func (e CorrelationEdges) LeftOrErr() (*Dataset, error)
LeftOrErr returns the Left value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CorrelationEdges) RightOrErr ¶
func (e CorrelationEdges) RightOrErr() (*Dataset, error)
RightOrErr returns the Right value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CorrelationGroupBy ¶
type CorrelationGroupBy struct {
// contains filtered or unexported fields
}
CorrelationGroupBy is the group-by builder for Correlation entities.
func (*CorrelationGroupBy) Aggregate ¶
func (cgb *CorrelationGroupBy) Aggregate(fns ...AggregateFunc) *CorrelationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CorrelationGroupBy) Bool ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) BoolX ¶
func (cgb *CorrelationGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CorrelationGroupBy) Bools ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) BoolsX ¶
func (cgb *CorrelationGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CorrelationGroupBy) Float64 ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) Float64X ¶
func (cgb *CorrelationGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CorrelationGroupBy) Float64s ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) Float64sX ¶
func (cgb *CorrelationGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CorrelationGroupBy) Int ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) IntX ¶
func (cgb *CorrelationGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CorrelationGroupBy) Ints ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) IntsX ¶
func (cgb *CorrelationGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CorrelationGroupBy) Scan ¶
func (cgb *CorrelationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*CorrelationGroupBy) ScanX ¶
func (cgb *CorrelationGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CorrelationGroupBy) String ¶
func (cgb *CorrelationGroupBy) 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 (*CorrelationGroupBy) StringX ¶
func (cgb *CorrelationGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CorrelationMutation ¶
type CorrelationMutation struct {
// contains filtered or unexported fields
}
CorrelationMutation represents an operation that mutates the Correlation nodes in the graph.
func (*CorrelationMutation) AddCoef ¶
func (m *CorrelationMutation) AddCoef(f float64)
AddCoef adds f to the "coef" field.
func (*CorrelationMutation) AddField ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) AddP ¶
func (m *CorrelationMutation) AddP(f float64)
AddP adds f to the "p" field.
func (*CorrelationMutation) AddR2 ¶
func (m *CorrelationMutation) AddR2(f float64)
AddR2 adds f to the "r2" field.
func (*CorrelationMutation) AddedCoef ¶
func (m *CorrelationMutation) AddedCoef() (r float64, exists bool)
AddedCoef returns the value that was added to the "coef" field in this mutation.
func (*CorrelationMutation) AddedEdges ¶
func (m *CorrelationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CorrelationMutation) AddedField ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) AddedFields ¶
func (m *CorrelationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CorrelationMutation) AddedIDs ¶
func (m *CorrelationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CorrelationMutation) AddedP ¶
func (m *CorrelationMutation) AddedP() (r float64, exists bool)
AddedP returns the value that was added to the "p" field in this mutation.
func (*CorrelationMutation) AddedR2 ¶
func (m *CorrelationMutation) AddedR2() (r float64, exists bool)
AddedR2 returns the value that was added to the "r2" field in this mutation.
func (*CorrelationMutation) ClearEdge ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) ClearField ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) ClearLeft ¶
func (m *CorrelationMutation) ClearLeft()
ClearLeft clears the "left" edge to the Dataset entity.
func (*CorrelationMutation) ClearRight ¶
func (m *CorrelationMutation) ClearRight()
ClearRight clears the "right" edge to the Dataset entity.
func (*CorrelationMutation) ClearedEdges ¶
func (m *CorrelationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CorrelationMutation) ClearedFields ¶
func (m *CorrelationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CorrelationMutation) Client ¶
func (m CorrelationMutation) 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 (*CorrelationMutation) Coef ¶
func (m *CorrelationMutation) Coef() (r float64, exists bool)
Coef returns the value of the "coef" field in the mutation.
func (*CorrelationMutation) CreateTime ¶
func (m *CorrelationMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*CorrelationMutation) EdgeCleared ¶
func (m *CorrelationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CorrelationMutation) Field ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) FieldCleared ¶
func (m *CorrelationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CorrelationMutation) Fields ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) GetType ¶
func (m *CorrelationMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*CorrelationMutation) Granularity ¶
func (m *CorrelationMutation) Granularity() (r correlation.Granularity, exists bool)
Granularity returns the value of the "granularity" field in the mutation.
func (*CorrelationMutation) ID ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) LeftCleared ¶
func (m *CorrelationMutation) LeftCleared() bool
LeftCleared returns if the "left" edge to the Dataset entity was cleared.
func (*CorrelationMutation) LeftID ¶
func (m *CorrelationMutation) LeftID() (id int, exists bool)
LeftID returns the "left" edge ID in the mutation.
func (*CorrelationMutation) LeftIDs ¶
func (m *CorrelationMutation) LeftIDs() (ids []int)
LeftIDs returns the "left" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LeftID instead. It exists only for internal usage by the builders.
func (*CorrelationMutation) OldCoef ¶
func (m *CorrelationMutation) OldCoef(ctx context.Context) (v float64, err error)
OldCoef returns the old "coef" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) 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 (*CorrelationMutation) OldGranularity ¶
func (m *CorrelationMutation) OldGranularity(ctx context.Context) (v correlation.Granularity, err error)
OldGranularity returns the old "granularity" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) OldP ¶
func (m *CorrelationMutation) OldP(ctx context.Context) (v float64, err error)
OldP returns the old "p" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) OldR2 ¶
func (m *CorrelationMutation) OldR2(ctx context.Context) (v float64, err error)
OldR2 returns the old "r2" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) OldType ¶
func (m *CorrelationMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Correlation entity. If the Correlation 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 (*CorrelationMutation) Op ¶
func (m *CorrelationMutation) Op() Op
Op returns the operation name.
func (*CorrelationMutation) P ¶
func (m *CorrelationMutation) P() (r float64, exists bool)
P returns the value of the "p" field in the mutation.
func (*CorrelationMutation) R2 ¶
func (m *CorrelationMutation) R2() (r float64, exists bool)
R2 returns the value of the "r2" field in the mutation.
func (*CorrelationMutation) RemovedEdges ¶
func (m *CorrelationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CorrelationMutation) RemovedIDs ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) ResetCoef ¶
func (m *CorrelationMutation) ResetCoef()
ResetCoef resets all changes to the "coef" field.
func (*CorrelationMutation) ResetCreateTime ¶
func (m *CorrelationMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*CorrelationMutation) ResetEdge ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) ResetField ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) ResetGranularity ¶
func (m *CorrelationMutation) ResetGranularity()
ResetGranularity resets all changes to the "granularity" field.
func (*CorrelationMutation) ResetLeft ¶
func (m *CorrelationMutation) ResetLeft()
ResetLeft resets all changes to the "left" edge.
func (*CorrelationMutation) ResetP ¶
func (m *CorrelationMutation) ResetP()
ResetP resets all changes to the "p" field.
func (*CorrelationMutation) ResetR2 ¶
func (m *CorrelationMutation) ResetR2()
ResetR2 resets all changes to the "r2" field.
func (*CorrelationMutation) ResetRight ¶
func (m *CorrelationMutation) ResetRight()
ResetRight resets all changes to the "right" edge.
func (*CorrelationMutation) ResetType ¶
func (m *CorrelationMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*CorrelationMutation) ResetUpdateTime ¶
func (m *CorrelationMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*CorrelationMutation) RightCleared ¶
func (m *CorrelationMutation) RightCleared() bool
RightCleared returns if the "right" edge to the Dataset entity was cleared.
func (*CorrelationMutation) RightID ¶
func (m *CorrelationMutation) RightID() (id int, exists bool)
RightID returns the "right" edge ID in the mutation.
func (*CorrelationMutation) RightIDs ¶
func (m *CorrelationMutation) RightIDs() (ids []int)
RightIDs returns the "right" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RightID instead. It exists only for internal usage by the builders.
func (*CorrelationMutation) SetCoef ¶
func (m *CorrelationMutation) SetCoef(f float64)
SetCoef sets the "coef" field.
func (*CorrelationMutation) SetCreateTime ¶
func (m *CorrelationMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*CorrelationMutation) SetField ¶
func (m *CorrelationMutation) 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 (*CorrelationMutation) SetGranularity ¶
func (m *CorrelationMutation) SetGranularity(c correlation.Granularity)
SetGranularity sets the "granularity" field.
func (*CorrelationMutation) SetLeftID ¶
func (m *CorrelationMutation) SetLeftID(id int)
SetLeftID sets the "left" edge to the Dataset entity by id.
func (*CorrelationMutation) SetP ¶
func (m *CorrelationMutation) SetP(f float64)
SetP sets the "p" field.
func (*CorrelationMutation) SetR2 ¶
func (m *CorrelationMutation) SetR2(f float64)
SetR2 sets the "r2" field.
func (*CorrelationMutation) SetRightID ¶
func (m *CorrelationMutation) SetRightID(id int)
SetRightID sets the "right" edge to the Dataset entity by id.
func (*CorrelationMutation) SetType ¶
func (m *CorrelationMutation) SetType(s string)
SetType sets the "type" field.
func (*CorrelationMutation) SetUpdateTime ¶
func (m *CorrelationMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (CorrelationMutation) Tx ¶
func (m CorrelationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CorrelationMutation) Type ¶
func (m *CorrelationMutation) Type() string
Type returns the node type of this mutation (Correlation).
func (*CorrelationMutation) UpdateTime ¶
func (m *CorrelationMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type CorrelationQuery ¶
type CorrelationQuery struct {
// contains filtered or unexported fields
}
CorrelationQuery is the builder for querying Correlation entities.
func (*CorrelationQuery) All ¶
func (cq *CorrelationQuery) All(ctx context.Context) ([]*Correlation, error)
All executes the query and returns a list of Correlations.
func (*CorrelationQuery) AllX ¶
func (cq *CorrelationQuery) AllX(ctx context.Context) []*Correlation
AllX is like All, but panics if an error occurs.
func (*CorrelationQuery) Clone ¶
func (cq *CorrelationQuery) Clone() *CorrelationQuery
Clone returns a duplicate of the CorrelationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CorrelationQuery) Count ¶
func (cq *CorrelationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CorrelationQuery) CountX ¶
func (cq *CorrelationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CorrelationQuery) Exist ¶
func (cq *CorrelationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CorrelationQuery) ExistX ¶
func (cq *CorrelationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CorrelationQuery) First ¶
func (cq *CorrelationQuery) First(ctx context.Context) (*Correlation, error)
First returns the first Correlation entity from the query. Returns a *NotFoundError when no Correlation was found.
func (*CorrelationQuery) FirstID ¶
func (cq *CorrelationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Correlation ID from the query. Returns a *NotFoundError when no Correlation ID was found.
func (*CorrelationQuery) FirstIDX ¶
func (cq *CorrelationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CorrelationQuery) FirstX ¶
func (cq *CorrelationQuery) FirstX(ctx context.Context) *Correlation
FirstX is like First, but panics if an error occurs.
func (*CorrelationQuery) GroupBy ¶
func (cq *CorrelationQuery) GroupBy(field string, fields ...string) *CorrelationGroupBy
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.Correlation.Query().
GroupBy(correlation.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CorrelationQuery) IDs ¶
func (cq *CorrelationQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Correlation IDs.
func (*CorrelationQuery) IDsX ¶
func (cq *CorrelationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CorrelationQuery) Limit ¶
func (cq *CorrelationQuery) Limit(limit int) *CorrelationQuery
Limit adds a limit step to the query.
func (*CorrelationQuery) Offset ¶
func (cq *CorrelationQuery) Offset(offset int) *CorrelationQuery
Offset adds an offset step to the query.
func (*CorrelationQuery) Only ¶
func (cq *CorrelationQuery) Only(ctx context.Context) (*Correlation, error)
Only returns a single Correlation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Correlation entity is not found. Returns a *NotFoundError when no Correlation entities are found.
func (*CorrelationQuery) OnlyID ¶
func (cq *CorrelationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Correlation ID in the query. Returns a *NotSingularError when exactly one Correlation ID is not found. Returns a *NotFoundError when no entities are found.
func (*CorrelationQuery) OnlyIDX ¶
func (cq *CorrelationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CorrelationQuery) OnlyX ¶
func (cq *CorrelationQuery) OnlyX(ctx context.Context) *Correlation
OnlyX is like Only, but panics if an error occurs.
func (*CorrelationQuery) Order ¶
func (cq *CorrelationQuery) Order(o ...OrderFunc) *CorrelationQuery
Order adds an order step to the query.
func (*CorrelationQuery) QueryLeft ¶
func (cq *CorrelationQuery) QueryLeft() *DatasetQuery
QueryLeft chains the current query on the "left" edge.
func (*CorrelationQuery) QueryRight ¶
func (cq *CorrelationQuery) QueryRight() *DatasetQuery
QueryRight chains the current query on the "right" edge.
func (*CorrelationQuery) Select ¶
func (cq *CorrelationQuery) Select(field string, fields ...string) *CorrelationSelect
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.Correlation.Query().
Select(correlation.FieldCreateTime).
Scan(ctx, &v)
func (*CorrelationQuery) Where ¶
func (cq *CorrelationQuery) Where(ps ...predicate.Correlation) *CorrelationQuery
Where adds a new predicate for the CorrelationQuery builder.
func (*CorrelationQuery) WithLeft ¶
func (cq *CorrelationQuery) WithLeft(opts ...func(*DatasetQuery)) *CorrelationQuery
WithLeft tells the query-builder to eager-load the nodes that are connected to the "left" edge. The optional arguments are used to configure the query builder of the edge.
func (*CorrelationQuery) WithRight ¶
func (cq *CorrelationQuery) WithRight(opts ...func(*DatasetQuery)) *CorrelationQuery
WithRight tells the query-builder to eager-load the nodes that are connected to the "right" edge. The optional arguments are used to configure the query builder of the edge.
type CorrelationSelect ¶
type CorrelationSelect struct {
*CorrelationQuery
// contains filtered or unexported fields
}
CorrelationSelect is the builder for selecting fields of Correlation entities.
func (*CorrelationSelect) Bool ¶
func (cs *CorrelationSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) BoolX ¶
func (cs *CorrelationSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*CorrelationSelect) Bools ¶
func (cs *CorrelationSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) BoolsX ¶
func (cs *CorrelationSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CorrelationSelect) Float64 ¶
func (cs *CorrelationSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) Float64X ¶
func (cs *CorrelationSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*CorrelationSelect) Float64s ¶
func (cs *CorrelationSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) Float64sX ¶
func (cs *CorrelationSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CorrelationSelect) Int ¶
func (cs *CorrelationSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) IntX ¶
func (cs *CorrelationSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*CorrelationSelect) Ints ¶
func (cs *CorrelationSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) IntsX ¶
func (cs *CorrelationSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CorrelationSelect) Scan ¶
func (cs *CorrelationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*CorrelationSelect) ScanX ¶
func (cs *CorrelationSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*CorrelationSelect) String ¶
func (cs *CorrelationSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*CorrelationSelect) StringX ¶
func (cs *CorrelationSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type CorrelationUpdate ¶
type CorrelationUpdate struct {
// contains filtered or unexported fields
}
CorrelationUpdate is the builder for updating Correlation entities.
func (*CorrelationUpdate) AddCoef ¶
func (cu *CorrelationUpdate) AddCoef(f float64) *CorrelationUpdate
AddCoef adds f to the "coef" field.
func (*CorrelationUpdate) AddP ¶
func (cu *CorrelationUpdate) AddP(f float64) *CorrelationUpdate
AddP adds f to the "p" field.
func (*CorrelationUpdate) AddR2 ¶
func (cu *CorrelationUpdate) AddR2(f float64) *CorrelationUpdate
AddR2 adds f to the "r2" field.
func (*CorrelationUpdate) ClearLeft ¶
func (cu *CorrelationUpdate) ClearLeft() *CorrelationUpdate
ClearLeft clears the "left" edge to the Dataset entity.
func (*CorrelationUpdate) ClearRight ¶
func (cu *CorrelationUpdate) ClearRight() *CorrelationUpdate
ClearRight clears the "right" edge to the Dataset entity.
func (*CorrelationUpdate) Exec ¶
func (cu *CorrelationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CorrelationUpdate) ExecX ¶
func (cu *CorrelationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CorrelationUpdate) Mutation ¶
func (cu *CorrelationUpdate) Mutation() *CorrelationMutation
Mutation returns the CorrelationMutation object of the builder.
func (*CorrelationUpdate) Save ¶
func (cu *CorrelationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CorrelationUpdate) SaveX ¶
func (cu *CorrelationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CorrelationUpdate) SetCoef ¶
func (cu *CorrelationUpdate) SetCoef(f float64) *CorrelationUpdate
SetCoef sets the "coef" field.
func (*CorrelationUpdate) SetGranularity ¶
func (cu *CorrelationUpdate) SetGranularity(c correlation.Granularity) *CorrelationUpdate
SetGranularity sets the "granularity" field.
func (*CorrelationUpdate) SetLeft ¶
func (cu *CorrelationUpdate) SetLeft(d *Dataset) *CorrelationUpdate
SetLeft sets the "left" edge to the Dataset entity.
func (*CorrelationUpdate) SetLeftID ¶
func (cu *CorrelationUpdate) SetLeftID(id int) *CorrelationUpdate
SetLeftID sets the "left" edge to the Dataset entity by ID.
func (*CorrelationUpdate) SetNillableGranularity ¶
func (cu *CorrelationUpdate) SetNillableGranularity(c *correlation.Granularity) *CorrelationUpdate
SetNillableGranularity sets the "granularity" field if the given value is not nil.
func (*CorrelationUpdate) SetP ¶
func (cu *CorrelationUpdate) SetP(f float64) *CorrelationUpdate
SetP sets the "p" field.
func (*CorrelationUpdate) SetR2 ¶
func (cu *CorrelationUpdate) SetR2(f float64) *CorrelationUpdate
SetR2 sets the "r2" field.
func (*CorrelationUpdate) SetRight ¶
func (cu *CorrelationUpdate) SetRight(d *Dataset) *CorrelationUpdate
SetRight sets the "right" edge to the Dataset entity.
func (*CorrelationUpdate) SetRightID ¶
func (cu *CorrelationUpdate) SetRightID(id int) *CorrelationUpdate
SetRightID sets the "right" edge to the Dataset entity by ID.
func (*CorrelationUpdate) Where ¶
func (cu *CorrelationUpdate) Where(ps ...predicate.Correlation) *CorrelationUpdate
Where adds a new predicate for the CorrelationUpdate builder.
type CorrelationUpdateOne ¶
type CorrelationUpdateOne struct {
// contains filtered or unexported fields
}
CorrelationUpdateOne is the builder for updating a single Correlation entity.
func (*CorrelationUpdateOne) AddCoef ¶
func (cuo *CorrelationUpdateOne) AddCoef(f float64) *CorrelationUpdateOne
AddCoef adds f to the "coef" field.
func (*CorrelationUpdateOne) AddP ¶
func (cuo *CorrelationUpdateOne) AddP(f float64) *CorrelationUpdateOne
AddP adds f to the "p" field.
func (*CorrelationUpdateOne) AddR2 ¶
func (cuo *CorrelationUpdateOne) AddR2(f float64) *CorrelationUpdateOne
AddR2 adds f to the "r2" field.
func (*CorrelationUpdateOne) ClearLeft ¶
func (cuo *CorrelationUpdateOne) ClearLeft() *CorrelationUpdateOne
ClearLeft clears the "left" edge to the Dataset entity.
func (*CorrelationUpdateOne) ClearRight ¶
func (cuo *CorrelationUpdateOne) ClearRight() *CorrelationUpdateOne
ClearRight clears the "right" edge to the Dataset entity.
func (*CorrelationUpdateOne) Exec ¶
func (cuo *CorrelationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CorrelationUpdateOne) ExecX ¶
func (cuo *CorrelationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CorrelationUpdateOne) Mutation ¶
func (cuo *CorrelationUpdateOne) Mutation() *CorrelationMutation
Mutation returns the CorrelationMutation object of the builder.
func (*CorrelationUpdateOne) Save ¶
func (cuo *CorrelationUpdateOne) Save(ctx context.Context) (*Correlation, error)
Save executes the query and returns the updated Correlation entity.
func (*CorrelationUpdateOne) SaveX ¶
func (cuo *CorrelationUpdateOne) SaveX(ctx context.Context) *Correlation
SaveX is like Save, but panics if an error occurs.
func (*CorrelationUpdateOne) SetCoef ¶
func (cuo *CorrelationUpdateOne) SetCoef(f float64) *CorrelationUpdateOne
SetCoef sets the "coef" field.
func (*CorrelationUpdateOne) SetGranularity ¶
func (cuo *CorrelationUpdateOne) SetGranularity(c correlation.Granularity) *CorrelationUpdateOne
SetGranularity sets the "granularity" field.
func (*CorrelationUpdateOne) SetLeft ¶
func (cuo *CorrelationUpdateOne) SetLeft(d *Dataset) *CorrelationUpdateOne
SetLeft sets the "left" edge to the Dataset entity.
func (*CorrelationUpdateOne) SetLeftID ¶
func (cuo *CorrelationUpdateOne) SetLeftID(id int) *CorrelationUpdateOne
SetLeftID sets the "left" edge to the Dataset entity by ID.
func (*CorrelationUpdateOne) SetNillableGranularity ¶
func (cuo *CorrelationUpdateOne) SetNillableGranularity(c *correlation.Granularity) *CorrelationUpdateOne
SetNillableGranularity sets the "granularity" field if the given value is not nil.
func (*CorrelationUpdateOne) SetP ¶
func (cuo *CorrelationUpdateOne) SetP(f float64) *CorrelationUpdateOne
SetP sets the "p" field.
func (*CorrelationUpdateOne) SetR2 ¶
func (cuo *CorrelationUpdateOne) SetR2(f float64) *CorrelationUpdateOne
SetR2 sets the "r2" field.
func (*CorrelationUpdateOne) SetRight ¶
func (cuo *CorrelationUpdateOne) SetRight(d *Dataset) *CorrelationUpdateOne
SetRight sets the "right" edge to the Dataset entity.
func (*CorrelationUpdateOne) SetRightID ¶
func (cuo *CorrelationUpdateOne) SetRightID(id int) *CorrelationUpdateOne
SetRightID sets the "right" edge to the Dataset entity by ID.
type Correlations ¶
type Correlations []*Correlation
Correlations is a parsable slice of Correlation.
type Dataset ¶
type Dataset 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"`
Shared bool `json:"shared,omitempty"`
// Source holds the value of the "source" field.
Source *string `json:"source,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DatasetQuery when eager-loading is set.
Edges DatasetEdges `json:"edges"`
// contains filtered or unexported fields
}
Dataset is the model entity for the Dataset schema.
func (*Dataset) QueryDatasetParams ¶
func (d *Dataset) QueryDatasetParams() *DatasetParamsQuery
QueryDatasetParams queries the "dataset_params" edge of the Dataset entity.
func (*Dataset) QueryIndicator ¶
func (d *Dataset) QueryIndicator() *IndicatorQuery
QueryIndicator queries the "indicator" edge of the Dataset entity.
func (*Dataset) QueryLeft ¶
func (d *Dataset) QueryLeft() *CorrelationQuery
QueryLeft queries the "left" edge of the Dataset entity.
func (*Dataset) QueryObservations ¶
func (d *Dataset) QueryObservations() *ObservationQuery
QueryObservations queries the "observations" edge of the Dataset entity.
func (*Dataset) QueryRight ¶
func (d *Dataset) QueryRight() *CorrelationQuery
QueryRight queries the "right" edge of the Dataset entity.
func (*Dataset) Unwrap ¶
Unwrap unwraps the Dataset 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 (*Dataset) Update ¶
func (d *Dataset) Update() *DatasetUpdateOne
Update returns a builder for updating this Dataset. Note that you need to call Dataset.Unwrap() before calling this method if this Dataset was returned from a transaction, and the transaction was committed or rolled back.
type DatasetClient ¶
type DatasetClient struct {
// contains filtered or unexported fields
}
DatasetClient is a client for the Dataset schema.
func NewDatasetClient ¶
func NewDatasetClient(c config) *DatasetClient
NewDatasetClient returns a client for the Dataset from the given config.
func (*DatasetClient) Create ¶
func (c *DatasetClient) Create() *DatasetCreate
Create returns a create builder for Dataset.
func (*DatasetClient) CreateBulk ¶
func (c *DatasetClient) CreateBulk(builders ...*DatasetCreate) *DatasetCreateBulk
CreateBulk returns a builder for creating a bulk of Dataset entities.
func (*DatasetClient) Delete ¶
func (c *DatasetClient) Delete() *DatasetDelete
Delete returns a delete builder for Dataset.
func (*DatasetClient) DeleteOne ¶
func (c *DatasetClient) DeleteOne(d *Dataset) *DatasetDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DatasetClient) DeleteOneID ¶
func (c *DatasetClient) DeleteOneID(id int) *DatasetDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DatasetClient) GetX ¶
func (c *DatasetClient) GetX(ctx context.Context, id int) *Dataset
GetX is like Get, but panics if an error occurs.
func (*DatasetClient) Hooks ¶
func (c *DatasetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DatasetClient) Query ¶
func (c *DatasetClient) Query() *DatasetQuery
Query returns a query builder for Dataset.
func (*DatasetClient) QueryDatasetParams ¶
func (c *DatasetClient) QueryDatasetParams(d *Dataset) *DatasetParamsQuery
QueryDatasetParams queries the dataset_params edge of a Dataset.
func (*DatasetClient) QueryIndicator ¶
func (c *DatasetClient) QueryIndicator(d *Dataset) *IndicatorQuery
QueryIndicator queries the indicator edge of a Dataset.
func (*DatasetClient) QueryLeft ¶
func (c *DatasetClient) QueryLeft(d *Dataset) *CorrelationQuery
QueryLeft queries the left edge of a Dataset.
func (*DatasetClient) QueryObservations ¶
func (c *DatasetClient) QueryObservations(d *Dataset) *ObservationQuery
QueryObservations queries the observations edge of a Dataset.
func (*DatasetClient) QueryRight ¶
func (c *DatasetClient) QueryRight(d *Dataset) *CorrelationQuery
QueryRight queries the right edge of a Dataset.
func (*DatasetClient) QueryUser ¶
func (c *DatasetClient) QueryUser(d *Dataset) *UserQuery
QueryUser queries the user edge of a Dataset.
func (*DatasetClient) Update ¶
func (c *DatasetClient) Update() *DatasetUpdate
Update returns an update builder for Dataset.
func (*DatasetClient) UpdateOne ¶
func (c *DatasetClient) UpdateOne(d *Dataset) *DatasetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DatasetClient) UpdateOneID ¶
func (c *DatasetClient) UpdateOneID(id int) *DatasetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DatasetClient) Use ¶
func (c *DatasetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dataset.Hooks(f(g(h())))`.
type DatasetCreate ¶
type DatasetCreate struct {
// contains filtered or unexported fields
}
DatasetCreate is the builder for creating a Dataset entity.
func (*DatasetCreate) AddLeft ¶
func (dc *DatasetCreate) AddLeft(c ...*Correlation) *DatasetCreate
AddLeft adds the "left" edges to the Correlation entity.
func (*DatasetCreate) AddLeftIDs ¶
func (dc *DatasetCreate) AddLeftIDs(ids ...int) *DatasetCreate
AddLeftIDs adds the "left" edge to the Correlation entity by IDs.
func (*DatasetCreate) AddObservationIDs ¶
func (dc *DatasetCreate) AddObservationIDs(ids ...int) *DatasetCreate
AddObservationIDs adds the "observations" edge to the Observation entity by IDs.
func (*DatasetCreate) AddObservations ¶
func (dc *DatasetCreate) AddObservations(o ...*Observation) *DatasetCreate
AddObservations adds the "observations" edges to the Observation entity.
func (*DatasetCreate) AddRight ¶
func (dc *DatasetCreate) AddRight(c ...*Correlation) *DatasetCreate
AddRight adds the "right" edges to the Correlation entity.
func (*DatasetCreate) AddRightIDs ¶
func (dc *DatasetCreate) AddRightIDs(ids ...int) *DatasetCreate
AddRightIDs adds the "right" edge to the Correlation entity by IDs.
func (*DatasetCreate) Mutation ¶
func (dc *DatasetCreate) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetCreate) Save ¶
func (dc *DatasetCreate) Save(ctx context.Context) (*Dataset, error)
Save creates the Dataset in the database.
func (*DatasetCreate) SaveX ¶
func (dc *DatasetCreate) SaveX(ctx context.Context) *Dataset
SaveX calls Save and panics if Save returns an error.
func (*DatasetCreate) SetCreateTime ¶
func (dc *DatasetCreate) SetCreateTime(t time.Time) *DatasetCreate
SetCreateTime sets the "create_time" field.
func (*DatasetCreate) SetDatasetParams ¶
func (dc *DatasetCreate) SetDatasetParams(d *DatasetParams) *DatasetCreate
SetDatasetParams sets the "dataset_params" edge to the DatasetParams entity.
func (*DatasetCreate) SetDatasetParamsID ¶
func (dc *DatasetCreate) SetDatasetParamsID(id int) *DatasetCreate
SetDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID.
func (*DatasetCreate) SetIndicator ¶
func (dc *DatasetCreate) SetIndicator(i *Indicator) *DatasetCreate
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*DatasetCreate) SetIndicatorID ¶
func (dc *DatasetCreate) SetIndicatorID(id int) *DatasetCreate
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*DatasetCreate) SetNillableCreateTime ¶
func (dc *DatasetCreate) SetNillableCreateTime(t *time.Time) *DatasetCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DatasetCreate) SetNillableDatasetParamsID ¶
func (dc *DatasetCreate) SetNillableDatasetParamsID(id *int) *DatasetCreate
SetNillableDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID if the given value is not nil.
func (*DatasetCreate) SetNillableShared ¶
func (dc *DatasetCreate) SetNillableShared(b *bool) *DatasetCreate
SetNillableShared sets the "shared" field if the given value is not nil.
func (*DatasetCreate) SetNillableSource ¶
func (dc *DatasetCreate) SetNillableSource(s *string) *DatasetCreate
SetNillableSource sets the "source" field if the given value is not nil.
func (*DatasetCreate) SetNillableUpdateTime ¶
func (dc *DatasetCreate) SetNillableUpdateTime(t *time.Time) *DatasetCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*DatasetCreate) SetNillableUserID ¶
func (dc *DatasetCreate) SetNillableUserID(id *int) *DatasetCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DatasetCreate) SetShared ¶
func (dc *DatasetCreate) SetShared(b bool) *DatasetCreate
SetShared sets the "shared" field.
func (*DatasetCreate) SetSource ¶
func (dc *DatasetCreate) SetSource(s string) *DatasetCreate
SetSource sets the "source" field.
func (*DatasetCreate) SetUpdateTime ¶
func (dc *DatasetCreate) SetUpdateTime(t time.Time) *DatasetCreate
SetUpdateTime sets the "update_time" field.
func (*DatasetCreate) SetUser ¶
func (dc *DatasetCreate) SetUser(u *User) *DatasetCreate
SetUser sets the "user" edge to the User entity.
func (*DatasetCreate) SetUserID ¶
func (dc *DatasetCreate) SetUserID(id int) *DatasetCreate
SetUserID sets the "user" edge to the User entity by ID.
type DatasetCreateBulk ¶
type DatasetCreateBulk struct {
// contains filtered or unexported fields
}
DatasetCreateBulk is the builder for creating many Dataset entities in bulk.
type DatasetDelete ¶
type DatasetDelete struct {
// contains filtered or unexported fields
}
DatasetDelete is the builder for deleting a Dataset entity.
func (*DatasetDelete) Exec ¶
func (dd *DatasetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DatasetDelete) ExecX ¶
func (dd *DatasetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DatasetDelete) Where ¶
func (dd *DatasetDelete) Where(ps ...predicate.Dataset) *DatasetDelete
Where adds a new predicate to the DatasetDelete builder.
type DatasetDeleteOne ¶
type DatasetDeleteOne struct {
// contains filtered or unexported fields
}
DatasetDeleteOne is the builder for deleting a single Dataset entity.
func (*DatasetDeleteOne) Exec ¶
func (ddo *DatasetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DatasetDeleteOne) ExecX ¶
func (ddo *DatasetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DatasetEdges ¶
type DatasetEdges struct {
// Left holds the value of the left edge.
Left []*Correlation `json:"left,omitempty"`
// Right holds the value of the right edge.
Right []*Correlation `json:"right,omitempty"`
// Observations holds the value of the observations edge.
Observations []*Observation `json:"observations,omitempty"`
// DatasetParams holds the value of the dataset_params edge.
DatasetParams *DatasetParams `json:"dataset_params,omitempty"`
// Indicator holds the value of the indicator edge.
Indicator *Indicator `json:"indicator,omitempty"`
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
DatasetEdges holds the relations/edges for other nodes in the graph.
func (DatasetEdges) DatasetParamsOrErr ¶
func (e DatasetEdges) DatasetParamsOrErr() (*DatasetParams, error)
DatasetParamsOrErr returns the DatasetParams value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DatasetEdges) IndicatorOrErr ¶
func (e DatasetEdges) IndicatorOrErr() (*Indicator, error)
IndicatorOrErr returns the Indicator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DatasetEdges) LeftOrErr ¶
func (e DatasetEdges) LeftOrErr() ([]*Correlation, error)
LeftOrErr returns the Left value or an error if the edge was not loaded in eager-loading.
func (DatasetEdges) ObservationsOrErr ¶
func (e DatasetEdges) ObservationsOrErr() ([]*Observation, error)
ObservationsOrErr returns the Observations value or an error if the edge was not loaded in eager-loading.
func (DatasetEdges) RightOrErr ¶
func (e DatasetEdges) RightOrErr() ([]*Correlation, error)
RightOrErr returns the Right value or an error if the edge was not loaded in eager-loading.
func (DatasetEdges) UserOrErr ¶
func (e DatasetEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DatasetGroupBy ¶
type DatasetGroupBy struct {
// contains filtered or unexported fields
}
DatasetGroupBy is the group-by builder for Dataset entities.
func (*DatasetGroupBy) Aggregate ¶
func (dgb *DatasetGroupBy) Aggregate(fns ...AggregateFunc) *DatasetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DatasetGroupBy) Bool ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) BoolX ¶
func (dgb *DatasetGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DatasetGroupBy) Bools ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) BoolsX ¶
func (dgb *DatasetGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DatasetGroupBy) Float64 ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) Float64X ¶
func (dgb *DatasetGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DatasetGroupBy) Float64s ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) Float64sX ¶
func (dgb *DatasetGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetGroupBy) Int ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) IntX ¶
func (dgb *DatasetGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DatasetGroupBy) Ints ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) IntsX ¶
func (dgb *DatasetGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DatasetGroupBy) Scan ¶
func (dgb *DatasetGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DatasetGroupBy) ScanX ¶
func (dgb *DatasetGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DatasetGroupBy) String ¶
func (dgb *DatasetGroupBy) 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 (*DatasetGroupBy) StringX ¶
func (dgb *DatasetGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DatasetMutation ¶
type DatasetMutation struct {
// contains filtered or unexported fields
}
DatasetMutation represents an operation that mutates the Dataset nodes in the graph.
func (*DatasetMutation) AddField ¶
func (m *DatasetMutation) 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 (*DatasetMutation) AddLeftIDs ¶
func (m *DatasetMutation) AddLeftIDs(ids ...int)
AddLeftIDs adds the "left" edge to the Correlation entity by ids.
func (*DatasetMutation) AddObservationIDs ¶
func (m *DatasetMutation) AddObservationIDs(ids ...int)
AddObservationIDs adds the "observations" edge to the Observation entity by ids.
func (*DatasetMutation) AddRightIDs ¶
func (m *DatasetMutation) AddRightIDs(ids ...int)
AddRightIDs adds the "right" edge to the Correlation entity by ids.
func (*DatasetMutation) AddedEdges ¶
func (m *DatasetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DatasetMutation) AddedField ¶
func (m *DatasetMutation) 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 (*DatasetMutation) AddedFields ¶
func (m *DatasetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DatasetMutation) AddedIDs ¶
func (m *DatasetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DatasetMutation) ClearDatasetParams ¶
func (m *DatasetMutation) ClearDatasetParams()
ClearDatasetParams clears the "dataset_params" edge to the DatasetParams entity.
func (*DatasetMutation) ClearEdge ¶
func (m *DatasetMutation) 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 (*DatasetMutation) ClearField ¶
func (m *DatasetMutation) 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 (*DatasetMutation) ClearIndicator ¶
func (m *DatasetMutation) ClearIndicator()
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*DatasetMutation) ClearLeft ¶
func (m *DatasetMutation) ClearLeft()
ClearLeft clears the "left" edge to the Correlation entity.
func (*DatasetMutation) ClearObservations ¶
func (m *DatasetMutation) ClearObservations()
ClearObservations clears the "observations" edge to the Observation entity.
func (*DatasetMutation) ClearRight ¶
func (m *DatasetMutation) ClearRight()
ClearRight clears the "right" edge to the Correlation entity.
func (*DatasetMutation) ClearSource ¶
func (m *DatasetMutation) ClearSource()
ClearSource clears the value of the "source" field.
func (*DatasetMutation) ClearUser ¶
func (m *DatasetMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*DatasetMutation) ClearedEdges ¶
func (m *DatasetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DatasetMutation) ClearedFields ¶
func (m *DatasetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DatasetMutation) Client ¶
func (m DatasetMutation) 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 (*DatasetMutation) CreateTime ¶
func (m *DatasetMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DatasetMutation) DatasetParamsCleared ¶
func (m *DatasetMutation) DatasetParamsCleared() bool
DatasetParamsCleared returns if the "dataset_params" edge to the DatasetParams entity was cleared.
func (*DatasetMutation) DatasetParamsID ¶
func (m *DatasetMutation) DatasetParamsID() (id int, exists bool)
DatasetParamsID returns the "dataset_params" edge ID in the mutation.
func (*DatasetMutation) DatasetParamsIDs ¶
func (m *DatasetMutation) DatasetParamsIDs() (ids []int)
DatasetParamsIDs returns the "dataset_params" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DatasetParamsID instead. It exists only for internal usage by the builders.
func (*DatasetMutation) EdgeCleared ¶
func (m *DatasetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DatasetMutation) Field ¶
func (m *DatasetMutation) 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 (*DatasetMutation) FieldCleared ¶
func (m *DatasetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DatasetMutation) Fields ¶
func (m *DatasetMutation) 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 (*DatasetMutation) ID ¶
func (m *DatasetMutation) 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 (*DatasetMutation) IndicatorCleared ¶
func (m *DatasetMutation) IndicatorCleared() bool
IndicatorCleared returns if the "indicator" edge to the Indicator entity was cleared.
func (*DatasetMutation) IndicatorID ¶
func (m *DatasetMutation) IndicatorID() (id int, exists bool)
IndicatorID returns the "indicator" edge ID in the mutation.
func (*DatasetMutation) IndicatorIDs ¶
func (m *DatasetMutation) IndicatorIDs() (ids []int)
IndicatorIDs returns the "indicator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IndicatorID instead. It exists only for internal usage by the builders.
func (*DatasetMutation) LeftCleared ¶
func (m *DatasetMutation) LeftCleared() bool
LeftCleared returns if the "left" edge to the Correlation entity was cleared.
func (*DatasetMutation) LeftIDs ¶
func (m *DatasetMutation) LeftIDs() (ids []int)
LeftIDs returns the "left" edge IDs in the mutation.
func (*DatasetMutation) ObservationsCleared ¶
func (m *DatasetMutation) ObservationsCleared() bool
ObservationsCleared returns if the "observations" edge to the Observation entity was cleared.
func (*DatasetMutation) ObservationsIDs ¶
func (m *DatasetMutation) ObservationsIDs() (ids []int)
ObservationsIDs returns the "observations" edge IDs in the mutation.
func (*DatasetMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Dataset entity. If the Dataset 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 (*DatasetMutation) 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 (*DatasetMutation) OldShared ¶
func (m *DatasetMutation) OldShared(ctx context.Context) (v bool, err error)
OldShared returns the old "shared" field's value of the Dataset entity. If the Dataset 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 (*DatasetMutation) OldSource ¶
func (m *DatasetMutation) OldSource(ctx context.Context) (v *string, err error)
OldSource returns the old "source" field's value of the Dataset entity. If the Dataset 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 (*DatasetMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Dataset entity. If the Dataset 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 (*DatasetMutation) RemoveLeftIDs ¶
func (m *DatasetMutation) RemoveLeftIDs(ids ...int)
RemoveLeftIDs removes the "left" edge to the Correlation entity by IDs.
func (*DatasetMutation) RemoveObservationIDs ¶
func (m *DatasetMutation) RemoveObservationIDs(ids ...int)
RemoveObservationIDs removes the "observations" edge to the Observation entity by IDs.
func (*DatasetMutation) RemoveRightIDs ¶
func (m *DatasetMutation) RemoveRightIDs(ids ...int)
RemoveRightIDs removes the "right" edge to the Correlation entity by IDs.
func (*DatasetMutation) RemovedEdges ¶
func (m *DatasetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DatasetMutation) RemovedIDs ¶
func (m *DatasetMutation) 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 (*DatasetMutation) RemovedLeftIDs ¶
func (m *DatasetMutation) RemovedLeftIDs() (ids []int)
RemovedLeft returns the removed IDs of the "left" edge to the Correlation entity.
func (*DatasetMutation) RemovedObservationsIDs ¶
func (m *DatasetMutation) RemovedObservationsIDs() (ids []int)
RemovedObservations returns the removed IDs of the "observations" edge to the Observation entity.
func (*DatasetMutation) RemovedRightIDs ¶
func (m *DatasetMutation) RemovedRightIDs() (ids []int)
RemovedRight returns the removed IDs of the "right" edge to the Correlation entity.
func (*DatasetMutation) ResetCreateTime ¶
func (m *DatasetMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DatasetMutation) ResetDatasetParams ¶
func (m *DatasetMutation) ResetDatasetParams()
ResetDatasetParams resets all changes to the "dataset_params" edge.
func (*DatasetMutation) ResetEdge ¶
func (m *DatasetMutation) 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 (*DatasetMutation) ResetField ¶
func (m *DatasetMutation) 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 (*DatasetMutation) ResetIndicator ¶
func (m *DatasetMutation) ResetIndicator()
ResetIndicator resets all changes to the "indicator" edge.
func (*DatasetMutation) ResetLeft ¶
func (m *DatasetMutation) ResetLeft()
ResetLeft resets all changes to the "left" edge.
func (*DatasetMutation) ResetObservations ¶
func (m *DatasetMutation) ResetObservations()
ResetObservations resets all changes to the "observations" edge.
func (*DatasetMutation) ResetRight ¶
func (m *DatasetMutation) ResetRight()
ResetRight resets all changes to the "right" edge.
func (*DatasetMutation) ResetShared ¶
func (m *DatasetMutation) ResetShared()
ResetShared resets all changes to the "shared" field.
func (*DatasetMutation) ResetSource ¶
func (m *DatasetMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*DatasetMutation) ResetUpdateTime ¶
func (m *DatasetMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*DatasetMutation) ResetUser ¶
func (m *DatasetMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*DatasetMutation) RightCleared ¶
func (m *DatasetMutation) RightCleared() bool
RightCleared returns if the "right" edge to the Correlation entity was cleared.
func (*DatasetMutation) RightIDs ¶
func (m *DatasetMutation) RightIDs() (ids []int)
RightIDs returns the "right" edge IDs in the mutation.
func (*DatasetMutation) SetCreateTime ¶
func (m *DatasetMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DatasetMutation) SetDatasetParamsID ¶
func (m *DatasetMutation) SetDatasetParamsID(id int)
SetDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by id.
func (*DatasetMutation) SetField ¶
func (m *DatasetMutation) 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 (*DatasetMutation) SetIndicatorID ¶
func (m *DatasetMutation) SetIndicatorID(id int)
SetIndicatorID sets the "indicator" edge to the Indicator entity by id.
func (*DatasetMutation) SetShared ¶
func (m *DatasetMutation) SetShared(b bool)
SetShared sets the "shared" field.
func (*DatasetMutation) SetSource ¶
func (m *DatasetMutation) SetSource(s string)
SetSource sets the "source" field.
func (*DatasetMutation) SetUpdateTime ¶
func (m *DatasetMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*DatasetMutation) SetUserID ¶
func (m *DatasetMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*DatasetMutation) Shared ¶
func (m *DatasetMutation) Shared() (r bool, exists bool)
Shared returns the value of the "shared" field in the mutation.
func (*DatasetMutation) Source ¶
func (m *DatasetMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*DatasetMutation) SourceCleared ¶
func (m *DatasetMutation) SourceCleared() bool
SourceCleared returns if the "source" field was cleared in this mutation.
func (DatasetMutation) Tx ¶
func (m DatasetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DatasetMutation) Type ¶
func (m *DatasetMutation) Type() string
Type returns the node type of this mutation (Dataset).
func (*DatasetMutation) UpdateTime ¶
func (m *DatasetMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*DatasetMutation) UserCleared ¶
func (m *DatasetMutation) UserCleared() bool
UserCleared returns if the "user" edge to the User entity was cleared.
func (*DatasetMutation) UserID ¶
func (m *DatasetMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*DatasetMutation) UserIDs ¶
func (m *DatasetMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
type DatasetParams ¶
type DatasetParams struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Style holds the value of the "style" field.
Style domain.DatasetStyle `json:"style,omitempty"`
// Aggregation holds the value of the "aggregation" field.
Aggregation domain.DatasetAggregation `json:"aggregation,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DatasetParamsQuery when eager-loading is set.
Edges DatasetParamsEdges `json:"edges"`
// contains filtered or unexported fields
}
DatasetParams is the model entity for the DatasetParams schema.
func (*DatasetParams) QueryDataset ¶
func (dp *DatasetParams) QueryDataset() *DatasetQuery
QueryDataset queries the "dataset" edge of the DatasetParams entity.
func (*DatasetParams) String ¶
func (dp *DatasetParams) String() string
String implements the fmt.Stringer.
func (*DatasetParams) Unwrap ¶
func (dp *DatasetParams) Unwrap() *DatasetParams
Unwrap unwraps the DatasetParams 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 (*DatasetParams) Update ¶
func (dp *DatasetParams) Update() *DatasetParamsUpdateOne
Update returns a builder for updating this DatasetParams. Note that you need to call DatasetParams.Unwrap() before calling this method if this DatasetParams was returned from a transaction, and the transaction was committed or rolled back.
type DatasetParamsClient ¶
type DatasetParamsClient struct {
// contains filtered or unexported fields
}
DatasetParamsClient is a client for the DatasetParams schema.
func NewDatasetParamsClient ¶
func NewDatasetParamsClient(c config) *DatasetParamsClient
NewDatasetParamsClient returns a client for the DatasetParams from the given config.
func (*DatasetParamsClient) Create ¶
func (c *DatasetParamsClient) Create() *DatasetParamsCreate
Create returns a create builder for DatasetParams.
func (*DatasetParamsClient) CreateBulk ¶
func (c *DatasetParamsClient) CreateBulk(builders ...*DatasetParamsCreate) *DatasetParamsCreateBulk
CreateBulk returns a builder for creating a bulk of DatasetParams entities.
func (*DatasetParamsClient) Delete ¶
func (c *DatasetParamsClient) Delete() *DatasetParamsDelete
Delete returns a delete builder for DatasetParams.
func (*DatasetParamsClient) DeleteOne ¶
func (c *DatasetParamsClient) DeleteOne(dp *DatasetParams) *DatasetParamsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DatasetParamsClient) DeleteOneID ¶
func (c *DatasetParamsClient) DeleteOneID(id int) *DatasetParamsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DatasetParamsClient) Get ¶
func (c *DatasetParamsClient) Get(ctx context.Context, id int) (*DatasetParams, error)
Get returns a DatasetParams entity by its id.
func (*DatasetParamsClient) GetX ¶
func (c *DatasetParamsClient) GetX(ctx context.Context, id int) *DatasetParams
GetX is like Get, but panics if an error occurs.
func (*DatasetParamsClient) Hooks ¶
func (c *DatasetParamsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DatasetParamsClient) Query ¶
func (c *DatasetParamsClient) Query() *DatasetParamsQuery
Query returns a query builder for DatasetParams.
func (*DatasetParamsClient) QueryDataset ¶
func (c *DatasetParamsClient) QueryDataset(dp *DatasetParams) *DatasetQuery
QueryDataset queries the dataset edge of a DatasetParams.
func (*DatasetParamsClient) Update ¶
func (c *DatasetParamsClient) Update() *DatasetParamsUpdate
Update returns an update builder for DatasetParams.
func (*DatasetParamsClient) UpdateOne ¶
func (c *DatasetParamsClient) UpdateOne(dp *DatasetParams) *DatasetParamsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DatasetParamsClient) UpdateOneID ¶
func (c *DatasetParamsClient) UpdateOneID(id int) *DatasetParamsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DatasetParamsClient) Use ¶
func (c *DatasetParamsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `datasetparams.Hooks(f(g(h())))`.
type DatasetParamsCreate ¶
type DatasetParamsCreate struct {
// contains filtered or unexported fields
}
DatasetParamsCreate is the builder for creating a DatasetParams entity.
func (*DatasetParamsCreate) Mutation ¶
func (dpc *DatasetParamsCreate) Mutation() *DatasetParamsMutation
Mutation returns the DatasetParamsMutation object of the builder.
func (*DatasetParamsCreate) Save ¶
func (dpc *DatasetParamsCreate) Save(ctx context.Context) (*DatasetParams, error)
Save creates the DatasetParams in the database.
func (*DatasetParamsCreate) SaveX ¶
func (dpc *DatasetParamsCreate) SaveX(ctx context.Context) *DatasetParams
SaveX calls Save and panics if Save returns an error.
func (*DatasetParamsCreate) SetAggregation ¶
func (dpc *DatasetParamsCreate) SetAggregation(da domain.DatasetAggregation) *DatasetParamsCreate
SetAggregation sets the "aggregation" field.
func (*DatasetParamsCreate) SetDataset ¶
func (dpc *DatasetParamsCreate) SetDataset(d *Dataset) *DatasetParamsCreate
SetDataset sets the "dataset" edge to the Dataset entity.
func (*DatasetParamsCreate) SetDatasetID ¶
func (dpc *DatasetParamsCreate) SetDatasetID(id int) *DatasetParamsCreate
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*DatasetParamsCreate) SetStyle ¶
func (dpc *DatasetParamsCreate) SetStyle(ds domain.DatasetStyle) *DatasetParamsCreate
SetStyle sets the "style" field.
type DatasetParamsCreateBulk ¶
type DatasetParamsCreateBulk struct {
// contains filtered or unexported fields
}
DatasetParamsCreateBulk is the builder for creating many DatasetParams entities in bulk.
func (*DatasetParamsCreateBulk) Save ¶
func (dpcb *DatasetParamsCreateBulk) Save(ctx context.Context) ([]*DatasetParams, error)
Save creates the DatasetParams entities in the database.
func (*DatasetParamsCreateBulk) SaveX ¶
func (dpcb *DatasetParamsCreateBulk) SaveX(ctx context.Context) []*DatasetParams
SaveX is like Save, but panics if an error occurs.
type DatasetParamsDelete ¶
type DatasetParamsDelete struct {
// contains filtered or unexported fields
}
DatasetParamsDelete is the builder for deleting a DatasetParams entity.
func (*DatasetParamsDelete) Exec ¶
func (dpd *DatasetParamsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DatasetParamsDelete) ExecX ¶
func (dpd *DatasetParamsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DatasetParamsDelete) Where ¶
func (dpd *DatasetParamsDelete) Where(ps ...predicate.DatasetParams) *DatasetParamsDelete
Where adds a new predicate to the DatasetParamsDelete builder.
type DatasetParamsDeleteOne ¶
type DatasetParamsDeleteOne struct {
// contains filtered or unexported fields
}
DatasetParamsDeleteOne is the builder for deleting a single DatasetParams entity.
func (*DatasetParamsDeleteOne) Exec ¶
func (dpdo *DatasetParamsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DatasetParamsDeleteOne) ExecX ¶
func (dpdo *DatasetParamsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DatasetParamsEdges ¶
type DatasetParamsEdges struct {
// Dataset holds the value of the dataset edge.
Dataset *Dataset `json:"dataset,omitempty"`
// contains filtered or unexported fields
}
DatasetParamsEdges holds the relations/edges for other nodes in the graph.
func (DatasetParamsEdges) DatasetOrErr ¶
func (e DatasetParamsEdges) DatasetOrErr() (*Dataset, error)
DatasetOrErr returns the Dataset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DatasetParamsGroupBy ¶
type DatasetParamsGroupBy struct {
// contains filtered or unexported fields
}
DatasetParamsGroupBy is the group-by builder for DatasetParams entities.
func (*DatasetParamsGroupBy) Aggregate ¶
func (dpgb *DatasetParamsGroupBy) Aggregate(fns ...AggregateFunc) *DatasetParamsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DatasetParamsGroupBy) Bool ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) BoolX ¶
func (dpgb *DatasetParamsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DatasetParamsGroupBy) Bools ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) BoolsX ¶
func (dpgb *DatasetParamsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DatasetParamsGroupBy) Float64 ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) Float64X ¶
func (dpgb *DatasetParamsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DatasetParamsGroupBy) Float64s ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) Float64sX ¶
func (dpgb *DatasetParamsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetParamsGroupBy) Int ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) IntX ¶
func (dpgb *DatasetParamsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DatasetParamsGroupBy) Ints ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) IntsX ¶
func (dpgb *DatasetParamsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DatasetParamsGroupBy) Scan ¶
func (dpgb *DatasetParamsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DatasetParamsGroupBy) ScanX ¶
func (dpgb *DatasetParamsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DatasetParamsGroupBy) String ¶
func (dpgb *DatasetParamsGroupBy) 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 (*DatasetParamsGroupBy) StringX ¶
func (dpgb *DatasetParamsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DatasetParamsMutation ¶
type DatasetParamsMutation struct {
// contains filtered or unexported fields
}
DatasetParamsMutation represents an operation that mutates the DatasetParams nodes in the graph.
func (*DatasetParamsMutation) AddField ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) AddedEdges ¶
func (m *DatasetParamsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DatasetParamsMutation) AddedField ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) AddedFields ¶
func (m *DatasetParamsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DatasetParamsMutation) AddedIDs ¶
func (m *DatasetParamsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DatasetParamsMutation) Aggregation ¶
func (m *DatasetParamsMutation) Aggregation() (r domain.DatasetAggregation, exists bool)
Aggregation returns the value of the "aggregation" field in the mutation.
func (*DatasetParamsMutation) ClearDataset ¶
func (m *DatasetParamsMutation) ClearDataset()
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*DatasetParamsMutation) ClearEdge ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ClearField ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ClearedEdges ¶
func (m *DatasetParamsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DatasetParamsMutation) ClearedFields ¶
func (m *DatasetParamsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DatasetParamsMutation) Client ¶
func (m DatasetParamsMutation) 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 (*DatasetParamsMutation) DatasetCleared ¶
func (m *DatasetParamsMutation) DatasetCleared() bool
DatasetCleared returns if the "dataset" edge to the Dataset entity was cleared.
func (*DatasetParamsMutation) DatasetID ¶
func (m *DatasetParamsMutation) DatasetID() (id int, exists bool)
DatasetID returns the "dataset" edge ID in the mutation.
func (*DatasetParamsMutation) DatasetIDs ¶
func (m *DatasetParamsMutation) DatasetIDs() (ids []int)
DatasetIDs returns the "dataset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DatasetID instead. It exists only for internal usage by the builders.
func (*DatasetParamsMutation) EdgeCleared ¶
func (m *DatasetParamsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DatasetParamsMutation) Field ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) FieldCleared ¶
func (m *DatasetParamsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DatasetParamsMutation) Fields ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ID ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) OldAggregation ¶
func (m *DatasetParamsMutation) OldAggregation(ctx context.Context) (v domain.DatasetAggregation, err error)
OldAggregation returns the old "aggregation" field's value of the DatasetParams entity. If the DatasetParams 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 (*DatasetParamsMutation) 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 (*DatasetParamsMutation) OldStyle ¶
func (m *DatasetParamsMutation) OldStyle(ctx context.Context) (v domain.DatasetStyle, err error)
OldStyle returns the old "style" field's value of the DatasetParams entity. If the DatasetParams 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 (*DatasetParamsMutation) Op ¶
func (m *DatasetParamsMutation) Op() Op
Op returns the operation name.
func (*DatasetParamsMutation) RemovedEdges ¶
func (m *DatasetParamsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DatasetParamsMutation) RemovedIDs ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ResetAggregation ¶
func (m *DatasetParamsMutation) ResetAggregation()
ResetAggregation resets all changes to the "aggregation" field.
func (*DatasetParamsMutation) ResetDataset ¶
func (m *DatasetParamsMutation) ResetDataset()
ResetDataset resets all changes to the "dataset" edge.
func (*DatasetParamsMutation) ResetEdge ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ResetField ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) ResetStyle ¶
func (m *DatasetParamsMutation) ResetStyle()
ResetStyle resets all changes to the "style" field.
func (*DatasetParamsMutation) SetAggregation ¶
func (m *DatasetParamsMutation) SetAggregation(da domain.DatasetAggregation)
SetAggregation sets the "aggregation" field.
func (*DatasetParamsMutation) SetDatasetID ¶
func (m *DatasetParamsMutation) SetDatasetID(id int)
SetDatasetID sets the "dataset" edge to the Dataset entity by id.
func (*DatasetParamsMutation) SetField ¶
func (m *DatasetParamsMutation) 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 (*DatasetParamsMutation) SetStyle ¶
func (m *DatasetParamsMutation) SetStyle(ds domain.DatasetStyle)
SetStyle sets the "style" field.
func (*DatasetParamsMutation) Style ¶
func (m *DatasetParamsMutation) Style() (r domain.DatasetStyle, exists bool)
Style returns the value of the "style" field in the mutation.
func (DatasetParamsMutation) Tx ¶
func (m DatasetParamsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DatasetParamsMutation) Type ¶
func (m *DatasetParamsMutation) Type() string
Type returns the node type of this mutation (DatasetParams).
type DatasetParamsQuery ¶
type DatasetParamsQuery struct {
// contains filtered or unexported fields
}
DatasetParamsQuery is the builder for querying DatasetParams entities.
func (*DatasetParamsQuery) All ¶
func (dpq *DatasetParamsQuery) All(ctx context.Context) ([]*DatasetParams, error)
All executes the query and returns a list of DatasetParamsSlice.
func (*DatasetParamsQuery) AllX ¶
func (dpq *DatasetParamsQuery) AllX(ctx context.Context) []*DatasetParams
AllX is like All, but panics if an error occurs.
func (*DatasetParamsQuery) Clone ¶
func (dpq *DatasetParamsQuery) Clone() *DatasetParamsQuery
Clone returns a duplicate of the DatasetParamsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DatasetParamsQuery) Count ¶
func (dpq *DatasetParamsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DatasetParamsQuery) CountX ¶
func (dpq *DatasetParamsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DatasetParamsQuery) Exist ¶
func (dpq *DatasetParamsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DatasetParamsQuery) ExistX ¶
func (dpq *DatasetParamsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DatasetParamsQuery) First ¶
func (dpq *DatasetParamsQuery) First(ctx context.Context) (*DatasetParams, error)
First returns the first DatasetParams entity from the query. Returns a *NotFoundError when no DatasetParams was found.
func (*DatasetParamsQuery) FirstID ¶
func (dpq *DatasetParamsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DatasetParams ID from the query. Returns a *NotFoundError when no DatasetParams ID was found.
func (*DatasetParamsQuery) FirstIDX ¶
func (dpq *DatasetParamsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DatasetParamsQuery) FirstX ¶
func (dpq *DatasetParamsQuery) FirstX(ctx context.Context) *DatasetParams
FirstX is like First, but panics if an error occurs.
func (*DatasetParamsQuery) GroupBy ¶
func (dpq *DatasetParamsQuery) GroupBy(field string, fields ...string) *DatasetParamsGroupBy
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 {
Style domain.DatasetStyle `json:"style,omitempty"`
Count int `json:"count,omitempty"`
}
client.DatasetParams.Query().
GroupBy(datasetparams.FieldStyle).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DatasetParamsQuery) IDs ¶
func (dpq *DatasetParamsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DatasetParams IDs.
func (*DatasetParamsQuery) IDsX ¶
func (dpq *DatasetParamsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DatasetParamsQuery) Limit ¶
func (dpq *DatasetParamsQuery) Limit(limit int) *DatasetParamsQuery
Limit adds a limit step to the query.
func (*DatasetParamsQuery) Offset ¶
func (dpq *DatasetParamsQuery) Offset(offset int) *DatasetParamsQuery
Offset adds an offset step to the query.
func (*DatasetParamsQuery) Only ¶
func (dpq *DatasetParamsQuery) Only(ctx context.Context) (*DatasetParams, error)
Only returns a single DatasetParams entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DatasetParams entity is not found. Returns a *NotFoundError when no DatasetParams entities are found.
func (*DatasetParamsQuery) OnlyID ¶
func (dpq *DatasetParamsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DatasetParams ID in the query. Returns a *NotSingularError when exactly one DatasetParams ID is not found. Returns a *NotFoundError when no entities are found.
func (*DatasetParamsQuery) OnlyIDX ¶
func (dpq *DatasetParamsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DatasetParamsQuery) OnlyX ¶
func (dpq *DatasetParamsQuery) OnlyX(ctx context.Context) *DatasetParams
OnlyX is like Only, but panics if an error occurs.
func (*DatasetParamsQuery) Order ¶
func (dpq *DatasetParamsQuery) Order(o ...OrderFunc) *DatasetParamsQuery
Order adds an order step to the query.
func (*DatasetParamsQuery) QueryDataset ¶
func (dpq *DatasetParamsQuery) QueryDataset() *DatasetQuery
QueryDataset chains the current query on the "dataset" edge.
func (*DatasetParamsQuery) Select ¶
func (dpq *DatasetParamsQuery) Select(field string, fields ...string) *DatasetParamsSelect
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 {
Style domain.DatasetStyle `json:"style,omitempty"`
}
client.DatasetParams.Query().
Select(datasetparams.FieldStyle).
Scan(ctx, &v)
func (*DatasetParamsQuery) Where ¶
func (dpq *DatasetParamsQuery) Where(ps ...predicate.DatasetParams) *DatasetParamsQuery
Where adds a new predicate for the DatasetParamsQuery builder.
func (*DatasetParamsQuery) WithDataset ¶
func (dpq *DatasetParamsQuery) WithDataset(opts ...func(*DatasetQuery)) *DatasetParamsQuery
WithDataset tells the query-builder to eager-load the nodes that are connected to the "dataset" edge. The optional arguments are used to configure the query builder of the edge.
type DatasetParamsSelect ¶
type DatasetParamsSelect struct {
*DatasetParamsQuery
// contains filtered or unexported fields
}
DatasetParamsSelect is the builder for selecting fields of DatasetParams entities.
func (*DatasetParamsSelect) Bool ¶
func (dps *DatasetParamsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) BoolX ¶
func (dps *DatasetParamsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DatasetParamsSelect) Bools ¶
func (dps *DatasetParamsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) BoolsX ¶
func (dps *DatasetParamsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DatasetParamsSelect) Float64 ¶
func (dps *DatasetParamsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) Float64X ¶
func (dps *DatasetParamsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DatasetParamsSelect) Float64s ¶
func (dps *DatasetParamsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) Float64sX ¶
func (dps *DatasetParamsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetParamsSelect) Int ¶
func (dps *DatasetParamsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) IntX ¶
func (dps *DatasetParamsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DatasetParamsSelect) Ints ¶
func (dps *DatasetParamsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) IntsX ¶
func (dps *DatasetParamsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DatasetParamsSelect) Scan ¶
func (dps *DatasetParamsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DatasetParamsSelect) ScanX ¶
func (dps *DatasetParamsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DatasetParamsSelect) String ¶
func (dps *DatasetParamsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DatasetParamsSelect) StringX ¶
func (dps *DatasetParamsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DatasetParamsSlice ¶
type DatasetParamsSlice []*DatasetParams
DatasetParamsSlice is a parsable slice of DatasetParams.
type DatasetParamsUpdate ¶
type DatasetParamsUpdate struct {
// contains filtered or unexported fields
}
DatasetParamsUpdate is the builder for updating DatasetParams entities.
func (*DatasetParamsUpdate) ClearDataset ¶
func (dpu *DatasetParamsUpdate) ClearDataset() *DatasetParamsUpdate
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*DatasetParamsUpdate) Exec ¶
func (dpu *DatasetParamsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetParamsUpdate) ExecX ¶
func (dpu *DatasetParamsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetParamsUpdate) Mutation ¶
func (dpu *DatasetParamsUpdate) Mutation() *DatasetParamsMutation
Mutation returns the DatasetParamsMutation object of the builder.
func (*DatasetParamsUpdate) Save ¶
func (dpu *DatasetParamsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DatasetParamsUpdate) SaveX ¶
func (dpu *DatasetParamsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DatasetParamsUpdate) SetAggregation ¶
func (dpu *DatasetParamsUpdate) SetAggregation(da domain.DatasetAggregation) *DatasetParamsUpdate
SetAggregation sets the "aggregation" field.
func (*DatasetParamsUpdate) SetDataset ¶
func (dpu *DatasetParamsUpdate) SetDataset(d *Dataset) *DatasetParamsUpdate
SetDataset sets the "dataset" edge to the Dataset entity.
func (*DatasetParamsUpdate) SetDatasetID ¶
func (dpu *DatasetParamsUpdate) SetDatasetID(id int) *DatasetParamsUpdate
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*DatasetParamsUpdate) SetStyle ¶
func (dpu *DatasetParamsUpdate) SetStyle(ds domain.DatasetStyle) *DatasetParamsUpdate
SetStyle sets the "style" field.
func (*DatasetParamsUpdate) Where ¶
func (dpu *DatasetParamsUpdate) Where(ps ...predicate.DatasetParams) *DatasetParamsUpdate
Where adds a new predicate for the DatasetParamsUpdate builder.
type DatasetParamsUpdateOne ¶
type DatasetParamsUpdateOne struct {
// contains filtered or unexported fields
}
DatasetParamsUpdateOne is the builder for updating a single DatasetParams entity.
func (*DatasetParamsUpdateOne) ClearDataset ¶
func (dpuo *DatasetParamsUpdateOne) ClearDataset() *DatasetParamsUpdateOne
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*DatasetParamsUpdateOne) Exec ¶
func (dpuo *DatasetParamsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DatasetParamsUpdateOne) ExecX ¶
func (dpuo *DatasetParamsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetParamsUpdateOne) Mutation ¶
func (dpuo *DatasetParamsUpdateOne) Mutation() *DatasetParamsMutation
Mutation returns the DatasetParamsMutation object of the builder.
func (*DatasetParamsUpdateOne) Save ¶
func (dpuo *DatasetParamsUpdateOne) Save(ctx context.Context) (*DatasetParams, error)
Save executes the query and returns the updated DatasetParams entity.
func (*DatasetParamsUpdateOne) SaveX ¶
func (dpuo *DatasetParamsUpdateOne) SaveX(ctx context.Context) *DatasetParams
SaveX is like Save, but panics if an error occurs.
func (*DatasetParamsUpdateOne) SetAggregation ¶
func (dpuo *DatasetParamsUpdateOne) SetAggregation(da domain.DatasetAggregation) *DatasetParamsUpdateOne
SetAggregation sets the "aggregation" field.
func (*DatasetParamsUpdateOne) SetDataset ¶
func (dpuo *DatasetParamsUpdateOne) SetDataset(d *Dataset) *DatasetParamsUpdateOne
SetDataset sets the "dataset" edge to the Dataset entity.
func (*DatasetParamsUpdateOne) SetDatasetID ¶
func (dpuo *DatasetParamsUpdateOne) SetDatasetID(id int) *DatasetParamsUpdateOne
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*DatasetParamsUpdateOne) SetStyle ¶
func (dpuo *DatasetParamsUpdateOne) SetStyle(ds domain.DatasetStyle) *DatasetParamsUpdateOne
SetStyle sets the "style" field.
type DatasetQuery ¶
type DatasetQuery struct {
// contains filtered or unexported fields
}
DatasetQuery is the builder for querying Dataset entities.
func (*DatasetQuery) All ¶
func (dq *DatasetQuery) All(ctx context.Context) ([]*Dataset, error)
All executes the query and returns a list of Datasets.
func (*DatasetQuery) AllX ¶
func (dq *DatasetQuery) AllX(ctx context.Context) []*Dataset
AllX is like All, but panics if an error occurs.
func (*DatasetQuery) Clone ¶
func (dq *DatasetQuery) Clone() *DatasetQuery
Clone returns a duplicate of the DatasetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DatasetQuery) Count ¶
func (dq *DatasetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DatasetQuery) CountX ¶
func (dq *DatasetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DatasetQuery) Exist ¶
func (dq *DatasetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DatasetQuery) ExistX ¶
func (dq *DatasetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DatasetQuery) First ¶
func (dq *DatasetQuery) First(ctx context.Context) (*Dataset, error)
First returns the first Dataset entity from the query. Returns a *NotFoundError when no Dataset was found.
func (*DatasetQuery) FirstID ¶
func (dq *DatasetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Dataset ID from the query. Returns a *NotFoundError when no Dataset ID was found.
func (*DatasetQuery) FirstIDX ¶
func (dq *DatasetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DatasetQuery) FirstX ¶
func (dq *DatasetQuery) FirstX(ctx context.Context) *Dataset
FirstX is like First, but panics if an error occurs.
func (*DatasetQuery) GroupBy ¶
func (dq *DatasetQuery) GroupBy(field string, fields ...string) *DatasetGroupBy
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.Dataset.Query().
GroupBy(dataset.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DatasetQuery) IDs ¶
func (dq *DatasetQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Dataset IDs.
func (*DatasetQuery) IDsX ¶
func (dq *DatasetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DatasetQuery) Limit ¶
func (dq *DatasetQuery) Limit(limit int) *DatasetQuery
Limit adds a limit step to the query.
func (*DatasetQuery) Offset ¶
func (dq *DatasetQuery) Offset(offset int) *DatasetQuery
Offset adds an offset step to the query.
func (*DatasetQuery) Only ¶
func (dq *DatasetQuery) Only(ctx context.Context) (*Dataset, error)
Only returns a single Dataset entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Dataset entity is not found. Returns a *NotFoundError when no Dataset entities are found.
func (*DatasetQuery) OnlyID ¶
func (dq *DatasetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Dataset ID in the query. Returns a *NotSingularError when exactly one Dataset ID is not found. Returns a *NotFoundError when no entities are found.
func (*DatasetQuery) OnlyIDX ¶
func (dq *DatasetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DatasetQuery) OnlyX ¶
func (dq *DatasetQuery) OnlyX(ctx context.Context) *Dataset
OnlyX is like Only, but panics if an error occurs.
func (*DatasetQuery) Order ¶
func (dq *DatasetQuery) Order(o ...OrderFunc) *DatasetQuery
Order adds an order step to the query.
func (*DatasetQuery) QueryDatasetParams ¶
func (dq *DatasetQuery) QueryDatasetParams() *DatasetParamsQuery
QueryDatasetParams chains the current query on the "dataset_params" edge.
func (*DatasetQuery) QueryIndicator ¶
func (dq *DatasetQuery) QueryIndicator() *IndicatorQuery
QueryIndicator chains the current query on the "indicator" edge.
func (*DatasetQuery) QueryLeft ¶
func (dq *DatasetQuery) QueryLeft() *CorrelationQuery
QueryLeft chains the current query on the "left" edge.
func (*DatasetQuery) QueryObservations ¶
func (dq *DatasetQuery) QueryObservations() *ObservationQuery
QueryObservations chains the current query on the "observations" edge.
func (*DatasetQuery) QueryRight ¶
func (dq *DatasetQuery) QueryRight() *CorrelationQuery
QueryRight chains the current query on the "right" edge.
func (*DatasetQuery) QueryUser ¶
func (dq *DatasetQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*DatasetQuery) Select ¶
func (dq *DatasetQuery) Select(field string, fields ...string) *DatasetSelect
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.Dataset.Query().
Select(dataset.FieldCreateTime).
Scan(ctx, &v)
func (*DatasetQuery) Where ¶
func (dq *DatasetQuery) Where(ps ...predicate.Dataset) *DatasetQuery
Where adds a new predicate for the DatasetQuery builder.
func (*DatasetQuery) WithDatasetParams ¶
func (dq *DatasetQuery) WithDatasetParams(opts ...func(*DatasetParamsQuery)) *DatasetQuery
WithDatasetParams tells the query-builder to eager-load the nodes that are connected to the "dataset_params" edge. The optional arguments are used to configure the query builder of the edge.
func (*DatasetQuery) WithIndicator ¶
func (dq *DatasetQuery) WithIndicator(opts ...func(*IndicatorQuery)) *DatasetQuery
WithIndicator tells the query-builder to eager-load the nodes that are connected to the "indicator" edge. The optional arguments are used to configure the query builder of the edge.
func (*DatasetQuery) WithLeft ¶
func (dq *DatasetQuery) WithLeft(opts ...func(*CorrelationQuery)) *DatasetQuery
WithLeft tells the query-builder to eager-load the nodes that are connected to the "left" edge. The optional arguments are used to configure the query builder of the edge.
func (*DatasetQuery) WithObservations ¶
func (dq *DatasetQuery) WithObservations(opts ...func(*ObservationQuery)) *DatasetQuery
WithObservations tells the query-builder to eager-load the nodes that are connected to the "observations" edge. The optional arguments are used to configure the query builder of the edge.
func (*DatasetQuery) WithRight ¶
func (dq *DatasetQuery) WithRight(opts ...func(*CorrelationQuery)) *DatasetQuery
WithRight tells the query-builder to eager-load the nodes that are connected to the "right" edge. The optional arguments are used to configure the query builder of the edge.
func (*DatasetQuery) WithUser ¶
func (dq *DatasetQuery) WithUser(opts ...func(*UserQuery)) *DatasetQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type DatasetSelect ¶
type DatasetSelect struct {
*DatasetQuery
// contains filtered or unexported fields
}
DatasetSelect is the builder for selecting fields of Dataset entities.
func (*DatasetSelect) Bool ¶
func (ds *DatasetSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) BoolX ¶
func (ds *DatasetSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DatasetSelect) Bools ¶
func (ds *DatasetSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) BoolsX ¶
func (ds *DatasetSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DatasetSelect) Float64 ¶
func (ds *DatasetSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Float64X ¶
func (ds *DatasetSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DatasetSelect) Float64s ¶
func (ds *DatasetSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) Float64sX ¶
func (ds *DatasetSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DatasetSelect) Int ¶
func (ds *DatasetSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) IntX ¶
func (ds *DatasetSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DatasetSelect) Ints ¶
func (ds *DatasetSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) IntsX ¶
func (ds *DatasetSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DatasetSelect) Scan ¶
func (ds *DatasetSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DatasetSelect) ScanX ¶
func (ds *DatasetSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DatasetSelect) String ¶
func (ds *DatasetSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DatasetSelect) StringX ¶
func (ds *DatasetSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DatasetUpdate ¶
type DatasetUpdate struct {
// contains filtered or unexported fields
}
DatasetUpdate is the builder for updating Dataset entities.
func (*DatasetUpdate) AddLeft ¶
func (du *DatasetUpdate) AddLeft(c ...*Correlation) *DatasetUpdate
AddLeft adds the "left" edges to the Correlation entity.
func (*DatasetUpdate) AddLeftIDs ¶
func (du *DatasetUpdate) AddLeftIDs(ids ...int) *DatasetUpdate
AddLeftIDs adds the "left" edge to the Correlation entity by IDs.
func (*DatasetUpdate) AddObservationIDs ¶
func (du *DatasetUpdate) AddObservationIDs(ids ...int) *DatasetUpdate
AddObservationIDs adds the "observations" edge to the Observation entity by IDs.
func (*DatasetUpdate) AddObservations ¶
func (du *DatasetUpdate) AddObservations(o ...*Observation) *DatasetUpdate
AddObservations adds the "observations" edges to the Observation entity.
func (*DatasetUpdate) AddRight ¶
func (du *DatasetUpdate) AddRight(c ...*Correlation) *DatasetUpdate
AddRight adds the "right" edges to the Correlation entity.
func (*DatasetUpdate) AddRightIDs ¶
func (du *DatasetUpdate) AddRightIDs(ids ...int) *DatasetUpdate
AddRightIDs adds the "right" edge to the Correlation entity by IDs.
func (*DatasetUpdate) ClearDatasetParams ¶
func (du *DatasetUpdate) ClearDatasetParams() *DatasetUpdate
ClearDatasetParams clears the "dataset_params" edge to the DatasetParams entity.
func (*DatasetUpdate) ClearIndicator ¶
func (du *DatasetUpdate) ClearIndicator() *DatasetUpdate
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*DatasetUpdate) ClearLeft ¶
func (du *DatasetUpdate) ClearLeft() *DatasetUpdate
ClearLeft clears all "left" edges to the Correlation entity.
func (*DatasetUpdate) ClearObservations ¶
func (du *DatasetUpdate) ClearObservations() *DatasetUpdate
ClearObservations clears all "observations" edges to the Observation entity.
func (*DatasetUpdate) ClearRight ¶
func (du *DatasetUpdate) ClearRight() *DatasetUpdate
ClearRight clears all "right" edges to the Correlation entity.
func (*DatasetUpdate) ClearSource ¶
func (du *DatasetUpdate) ClearSource() *DatasetUpdate
ClearSource clears the value of the "source" field.
func (*DatasetUpdate) ClearUser ¶
func (du *DatasetUpdate) ClearUser() *DatasetUpdate
ClearUser clears the "user" edge to the User entity.
func (*DatasetUpdate) Exec ¶
func (du *DatasetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DatasetUpdate) ExecX ¶
func (du *DatasetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpdate) Mutation ¶
func (du *DatasetUpdate) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetUpdate) RemoveLeft ¶
func (du *DatasetUpdate) RemoveLeft(c ...*Correlation) *DatasetUpdate
RemoveLeft removes "left" edges to Correlation entities.
func (*DatasetUpdate) RemoveLeftIDs ¶
func (du *DatasetUpdate) RemoveLeftIDs(ids ...int) *DatasetUpdate
RemoveLeftIDs removes the "left" edge to Correlation entities by IDs.
func (*DatasetUpdate) RemoveObservationIDs ¶
func (du *DatasetUpdate) RemoveObservationIDs(ids ...int) *DatasetUpdate
RemoveObservationIDs removes the "observations" edge to Observation entities by IDs.
func (*DatasetUpdate) RemoveObservations ¶
func (du *DatasetUpdate) RemoveObservations(o ...*Observation) *DatasetUpdate
RemoveObservations removes "observations" edges to Observation entities.
func (*DatasetUpdate) RemoveRight ¶
func (du *DatasetUpdate) RemoveRight(c ...*Correlation) *DatasetUpdate
RemoveRight removes "right" edges to Correlation entities.
func (*DatasetUpdate) RemoveRightIDs ¶
func (du *DatasetUpdate) RemoveRightIDs(ids ...int) *DatasetUpdate
RemoveRightIDs removes the "right" edge to Correlation entities by IDs.
func (*DatasetUpdate) Save ¶
func (du *DatasetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DatasetUpdate) SaveX ¶
func (du *DatasetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DatasetUpdate) SetDatasetParams ¶
func (du *DatasetUpdate) SetDatasetParams(d *DatasetParams) *DatasetUpdate
SetDatasetParams sets the "dataset_params" edge to the DatasetParams entity.
func (*DatasetUpdate) SetDatasetParamsID ¶
func (du *DatasetUpdate) SetDatasetParamsID(id int) *DatasetUpdate
SetDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID.
func (*DatasetUpdate) SetIndicator ¶
func (du *DatasetUpdate) SetIndicator(i *Indicator) *DatasetUpdate
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*DatasetUpdate) SetIndicatorID ¶
func (du *DatasetUpdate) SetIndicatorID(id int) *DatasetUpdate
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*DatasetUpdate) SetNillableDatasetParamsID ¶
func (du *DatasetUpdate) SetNillableDatasetParamsID(id *int) *DatasetUpdate
SetNillableDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID if the given value is not nil.
func (*DatasetUpdate) SetNillableShared ¶
func (du *DatasetUpdate) SetNillableShared(b *bool) *DatasetUpdate
SetNillableShared sets the "shared" field if the given value is not nil.
func (*DatasetUpdate) SetNillableSource ¶
func (du *DatasetUpdate) SetNillableSource(s *string) *DatasetUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (*DatasetUpdate) SetNillableUserID ¶
func (du *DatasetUpdate) SetNillableUserID(id *int) *DatasetUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DatasetUpdate) SetShared ¶
func (du *DatasetUpdate) SetShared(b bool) *DatasetUpdate
SetShared sets the "shared" field.
func (*DatasetUpdate) SetSource ¶
func (du *DatasetUpdate) SetSource(s string) *DatasetUpdate
SetSource sets the "source" field.
func (*DatasetUpdate) SetUser ¶
func (du *DatasetUpdate) SetUser(u *User) *DatasetUpdate
SetUser sets the "user" edge to the User entity.
func (*DatasetUpdate) SetUserID ¶
func (du *DatasetUpdate) SetUserID(id int) *DatasetUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*DatasetUpdate) Where ¶
func (du *DatasetUpdate) Where(ps ...predicate.Dataset) *DatasetUpdate
Where adds a new predicate for the DatasetUpdate builder.
type DatasetUpdateOne ¶
type DatasetUpdateOne struct {
// contains filtered or unexported fields
}
DatasetUpdateOne is the builder for updating a single Dataset entity.
func (*DatasetUpdateOne) AddLeft ¶
func (duo *DatasetUpdateOne) AddLeft(c ...*Correlation) *DatasetUpdateOne
AddLeft adds the "left" edges to the Correlation entity.
func (*DatasetUpdateOne) AddLeftIDs ¶
func (duo *DatasetUpdateOne) AddLeftIDs(ids ...int) *DatasetUpdateOne
AddLeftIDs adds the "left" edge to the Correlation entity by IDs.
func (*DatasetUpdateOne) AddObservationIDs ¶
func (duo *DatasetUpdateOne) AddObservationIDs(ids ...int) *DatasetUpdateOne
AddObservationIDs adds the "observations" edge to the Observation entity by IDs.
func (*DatasetUpdateOne) AddObservations ¶
func (duo *DatasetUpdateOne) AddObservations(o ...*Observation) *DatasetUpdateOne
AddObservations adds the "observations" edges to the Observation entity.
func (*DatasetUpdateOne) AddRight ¶
func (duo *DatasetUpdateOne) AddRight(c ...*Correlation) *DatasetUpdateOne
AddRight adds the "right" edges to the Correlation entity.
func (*DatasetUpdateOne) AddRightIDs ¶
func (duo *DatasetUpdateOne) AddRightIDs(ids ...int) *DatasetUpdateOne
AddRightIDs adds the "right" edge to the Correlation entity by IDs.
func (*DatasetUpdateOne) ClearDatasetParams ¶
func (duo *DatasetUpdateOne) ClearDatasetParams() *DatasetUpdateOne
ClearDatasetParams clears the "dataset_params" edge to the DatasetParams entity.
func (*DatasetUpdateOne) ClearIndicator ¶
func (duo *DatasetUpdateOne) ClearIndicator() *DatasetUpdateOne
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*DatasetUpdateOne) ClearLeft ¶
func (duo *DatasetUpdateOne) ClearLeft() *DatasetUpdateOne
ClearLeft clears all "left" edges to the Correlation entity.
func (*DatasetUpdateOne) ClearObservations ¶
func (duo *DatasetUpdateOne) ClearObservations() *DatasetUpdateOne
ClearObservations clears all "observations" edges to the Observation entity.
func (*DatasetUpdateOne) ClearRight ¶
func (duo *DatasetUpdateOne) ClearRight() *DatasetUpdateOne
ClearRight clears all "right" edges to the Correlation entity.
func (*DatasetUpdateOne) ClearSource ¶
func (duo *DatasetUpdateOne) ClearSource() *DatasetUpdateOne
ClearSource clears the value of the "source" field.
func (*DatasetUpdateOne) ClearUser ¶
func (duo *DatasetUpdateOne) ClearUser() *DatasetUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*DatasetUpdateOne) Exec ¶
func (duo *DatasetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DatasetUpdateOne) ExecX ¶
func (duo *DatasetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DatasetUpdateOne) Mutation ¶
func (duo *DatasetUpdateOne) Mutation() *DatasetMutation
Mutation returns the DatasetMutation object of the builder.
func (*DatasetUpdateOne) RemoveLeft ¶
func (duo *DatasetUpdateOne) RemoveLeft(c ...*Correlation) *DatasetUpdateOne
RemoveLeft removes "left" edges to Correlation entities.
func (*DatasetUpdateOne) RemoveLeftIDs ¶
func (duo *DatasetUpdateOne) RemoveLeftIDs(ids ...int) *DatasetUpdateOne
RemoveLeftIDs removes the "left" edge to Correlation entities by IDs.
func (*DatasetUpdateOne) RemoveObservationIDs ¶
func (duo *DatasetUpdateOne) RemoveObservationIDs(ids ...int) *DatasetUpdateOne
RemoveObservationIDs removes the "observations" edge to Observation entities by IDs.
func (*DatasetUpdateOne) RemoveObservations ¶
func (duo *DatasetUpdateOne) RemoveObservations(o ...*Observation) *DatasetUpdateOne
RemoveObservations removes "observations" edges to Observation entities.
func (*DatasetUpdateOne) RemoveRight ¶
func (duo *DatasetUpdateOne) RemoveRight(c ...*Correlation) *DatasetUpdateOne
RemoveRight removes "right" edges to Correlation entities.
func (*DatasetUpdateOne) RemoveRightIDs ¶
func (duo *DatasetUpdateOne) RemoveRightIDs(ids ...int) *DatasetUpdateOne
RemoveRightIDs removes the "right" edge to Correlation entities by IDs.
func (*DatasetUpdateOne) Save ¶
func (duo *DatasetUpdateOne) Save(ctx context.Context) (*Dataset, error)
Save executes the query and returns the updated Dataset entity.
func (*DatasetUpdateOne) SaveX ¶
func (duo *DatasetUpdateOne) SaveX(ctx context.Context) *Dataset
SaveX is like Save, but panics if an error occurs.
func (*DatasetUpdateOne) SetDatasetParams ¶
func (duo *DatasetUpdateOne) SetDatasetParams(d *DatasetParams) *DatasetUpdateOne
SetDatasetParams sets the "dataset_params" edge to the DatasetParams entity.
func (*DatasetUpdateOne) SetDatasetParamsID ¶
func (duo *DatasetUpdateOne) SetDatasetParamsID(id int) *DatasetUpdateOne
SetDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID.
func (*DatasetUpdateOne) SetIndicator ¶
func (duo *DatasetUpdateOne) SetIndicator(i *Indicator) *DatasetUpdateOne
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*DatasetUpdateOne) SetIndicatorID ¶
func (duo *DatasetUpdateOne) SetIndicatorID(id int) *DatasetUpdateOne
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*DatasetUpdateOne) SetNillableDatasetParamsID ¶
func (duo *DatasetUpdateOne) SetNillableDatasetParamsID(id *int) *DatasetUpdateOne
SetNillableDatasetParamsID sets the "dataset_params" edge to the DatasetParams entity by ID if the given value is not nil.
func (*DatasetUpdateOne) SetNillableShared ¶
func (duo *DatasetUpdateOne) SetNillableShared(b *bool) *DatasetUpdateOne
SetNillableShared sets the "shared" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableSource ¶
func (duo *DatasetUpdateOne) SetNillableSource(s *string) *DatasetUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (*DatasetUpdateOne) SetNillableUserID ¶
func (duo *DatasetUpdateOne) SetNillableUserID(id *int) *DatasetUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DatasetUpdateOne) SetShared ¶
func (duo *DatasetUpdateOne) SetShared(b bool) *DatasetUpdateOne
SetShared sets the "shared" field.
func (*DatasetUpdateOne) SetSource ¶
func (duo *DatasetUpdateOne) SetSource(s string) *DatasetUpdateOne
SetSource sets the "source" field.
func (*DatasetUpdateOne) SetUser ¶
func (duo *DatasetUpdateOne) SetUser(u *User) *DatasetUpdateOne
SetUser sets the "user" edge to the User entity.
func (*DatasetUpdateOne) SetUserID ¶
func (duo *DatasetUpdateOne) SetUserID(id int) *DatasetUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Dictionaries ¶ added in v0.0.8
type Dictionaries []*Dictionary
Dictionaries is a parsable slice of Dictionary.
type Dictionary ¶ added in v0.0.8
type Dictionary struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Code holds the value of the "code" field.
Code string `json:"code,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 DictionaryQuery when eager-loading is set.
Edges DictionaryEdges `json:"edges"`
// contains filtered or unexported fields
}
Dictionary is the model entity for the Dictionary schema.
func (*Dictionary) QueryEntries ¶ added in v0.0.8
func (d *Dictionary) QueryEntries() *DictionaryEntryQuery
QueryEntries queries the "entries" edge of the Dictionary entity.
func (*Dictionary) String ¶ added in v0.0.8
func (d *Dictionary) String() string
String implements the fmt.Stringer.
func (*Dictionary) Unwrap ¶ added in v0.0.8
func (d *Dictionary) Unwrap() *Dictionary
Unwrap unwraps the Dictionary 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 (*Dictionary) Update ¶ added in v0.0.8
func (d *Dictionary) Update() *DictionaryUpdateOne
Update returns a builder for updating this Dictionary. Note that you need to call Dictionary.Unwrap() before calling this method if this Dictionary was returned from a transaction, and the transaction was committed or rolled back.
type DictionaryClient ¶ added in v0.0.8
type DictionaryClient struct {
// contains filtered or unexported fields
}
DictionaryClient is a client for the Dictionary schema.
func NewDictionaryClient ¶ added in v0.0.8
func NewDictionaryClient(c config) *DictionaryClient
NewDictionaryClient returns a client for the Dictionary from the given config.
func (*DictionaryClient) Create ¶ added in v0.0.8
func (c *DictionaryClient) Create() *DictionaryCreate
Create returns a create builder for Dictionary.
func (*DictionaryClient) CreateBulk ¶ added in v0.0.8
func (c *DictionaryClient) CreateBulk(builders ...*DictionaryCreate) *DictionaryCreateBulk
CreateBulk returns a builder for creating a bulk of Dictionary entities.
func (*DictionaryClient) Delete ¶ added in v0.0.8
func (c *DictionaryClient) Delete() *DictionaryDelete
Delete returns a delete builder for Dictionary.
func (*DictionaryClient) DeleteOne ¶ added in v0.0.8
func (c *DictionaryClient) DeleteOne(d *Dictionary) *DictionaryDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DictionaryClient) DeleteOneID ¶ added in v0.0.8
func (c *DictionaryClient) DeleteOneID(id int) *DictionaryDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DictionaryClient) Get ¶ added in v0.0.8
func (c *DictionaryClient) Get(ctx context.Context, id int) (*Dictionary, error)
Get returns a Dictionary entity by its id.
func (*DictionaryClient) GetX ¶ added in v0.0.8
func (c *DictionaryClient) GetX(ctx context.Context, id int) *Dictionary
GetX is like Get, but panics if an error occurs.
func (*DictionaryClient) Hooks ¶ added in v0.0.8
func (c *DictionaryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DictionaryClient) Query ¶ added in v0.0.8
func (c *DictionaryClient) Query() *DictionaryQuery
Query returns a query builder for Dictionary.
func (*DictionaryClient) QueryEntries ¶ added in v0.0.8
func (c *DictionaryClient) QueryEntries(d *Dictionary) *DictionaryEntryQuery
QueryEntries queries the entries edge of a Dictionary.
func (*DictionaryClient) Update ¶ added in v0.0.8
func (c *DictionaryClient) Update() *DictionaryUpdate
Update returns an update builder for Dictionary.
func (*DictionaryClient) UpdateOne ¶ added in v0.0.8
func (c *DictionaryClient) UpdateOne(d *Dictionary) *DictionaryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DictionaryClient) UpdateOneID ¶ added in v0.0.8
func (c *DictionaryClient) UpdateOneID(id int) *DictionaryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DictionaryClient) Use ¶ added in v0.0.8
func (c *DictionaryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dictionary.Hooks(f(g(h())))`.
type DictionaryCreate ¶ added in v0.0.8
type DictionaryCreate struct {
// contains filtered or unexported fields
}
DictionaryCreate is the builder for creating a Dictionary entity.
func (*DictionaryCreate) AddEntries ¶ added in v0.0.8
func (dc *DictionaryCreate) AddEntries(d ...*DictionaryEntry) *DictionaryCreate
AddEntries adds the "entries" edges to the DictionaryEntry entity.
func (*DictionaryCreate) AddEntryIDs ¶ added in v0.0.8
func (dc *DictionaryCreate) AddEntryIDs(ids ...int) *DictionaryCreate
AddEntryIDs adds the "entries" edge to the DictionaryEntry entity by IDs.
func (*DictionaryCreate) Mutation ¶ added in v0.0.8
func (dc *DictionaryCreate) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryCreate) Save ¶ added in v0.0.8
func (dc *DictionaryCreate) Save(ctx context.Context) (*Dictionary, error)
Save creates the Dictionary in the database.
func (*DictionaryCreate) SaveX ¶ added in v0.0.8
func (dc *DictionaryCreate) SaveX(ctx context.Context) *Dictionary
SaveX calls Save and panics if Save returns an error.
func (*DictionaryCreate) SetCode ¶ added in v0.0.8
func (dc *DictionaryCreate) SetCode(s string) *DictionaryCreate
SetCode sets the "code" field.
func (*DictionaryCreate) SetDescription ¶ added in v0.0.8
func (dc *DictionaryCreate) SetDescription(s string) *DictionaryCreate
SetDescription sets the "description" field.
func (*DictionaryCreate) SetID ¶ added in v0.0.8
func (dc *DictionaryCreate) SetID(i int) *DictionaryCreate
SetID sets the "id" field.
func (*DictionaryCreate) SetNillableDescription ¶ added in v0.0.8
func (dc *DictionaryCreate) SetNillableDescription(s *string) *DictionaryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
type DictionaryCreateBulk ¶ added in v0.0.8
type DictionaryCreateBulk struct {
// contains filtered or unexported fields
}
DictionaryCreateBulk is the builder for creating many Dictionary entities in bulk.
func (*DictionaryCreateBulk) Save ¶ added in v0.0.8
func (dcb *DictionaryCreateBulk) Save(ctx context.Context) ([]*Dictionary, error)
Save creates the Dictionary entities in the database.
func (*DictionaryCreateBulk) SaveX ¶ added in v0.0.8
func (dcb *DictionaryCreateBulk) SaveX(ctx context.Context) []*Dictionary
SaveX is like Save, but panics if an error occurs.
type DictionaryDelete ¶ added in v0.0.8
type DictionaryDelete struct {
// contains filtered or unexported fields
}
DictionaryDelete is the builder for deleting a Dictionary entity.
func (*DictionaryDelete) Exec ¶ added in v0.0.8
func (dd *DictionaryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DictionaryDelete) ExecX ¶ added in v0.0.8
func (dd *DictionaryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDelete) Where ¶ added in v0.0.8
func (dd *DictionaryDelete) Where(ps ...predicate.Dictionary) *DictionaryDelete
Where adds a new predicate to the DictionaryDelete builder.
type DictionaryDeleteOne ¶ added in v0.0.8
type DictionaryDeleteOne struct {
// contains filtered or unexported fields
}
DictionaryDeleteOne is the builder for deleting a single Dictionary entity.
func (*DictionaryDeleteOne) Exec ¶ added in v0.0.8
func (ddo *DictionaryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DictionaryDeleteOne) ExecX ¶ added in v0.0.8
func (ddo *DictionaryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DictionaryEdges ¶ added in v0.0.8
type DictionaryEdges struct {
// Entries holds the value of the entries edge.
Entries []*DictionaryEntry `json:"entries,omitempty"`
// contains filtered or unexported fields
}
DictionaryEdges holds the relations/edges for other nodes in the graph.
func (DictionaryEdges) EntriesOrErr ¶ added in v0.0.8
func (e DictionaryEdges) EntriesOrErr() ([]*DictionaryEntry, error)
EntriesOrErr returns the Entries value or an error if the edge was not loaded in eager-loading.
type DictionaryEntries ¶ added in v0.0.8
type DictionaryEntries []*DictionaryEntry
DictionaryEntries is a parsable slice of DictionaryEntry.
type DictionaryEntry ¶ added in v0.0.8
type DictionaryEntry struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Code holds the value of the "code" field.
Code string `json:"code,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 DictionaryEntryQuery when eager-loading is set.
Edges DictionaryEntryEdges `json:"edges"`
// contains filtered or unexported fields
}
DictionaryEntry is the model entity for the DictionaryEntry schema.
func (*DictionaryEntry) QueryDictionary ¶ added in v0.0.8
func (de *DictionaryEntry) QueryDictionary() *DictionaryQuery
QueryDictionary queries the "dictionary" edge of the DictionaryEntry entity.
func (*DictionaryEntry) String ¶ added in v0.0.8
func (de *DictionaryEntry) String() string
String implements the fmt.Stringer.
func (*DictionaryEntry) Unwrap ¶ added in v0.0.8
func (de *DictionaryEntry) Unwrap() *DictionaryEntry
Unwrap unwraps the DictionaryEntry 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 (*DictionaryEntry) Update ¶ added in v0.0.8
func (de *DictionaryEntry) Update() *DictionaryEntryUpdateOne
Update returns a builder for updating this DictionaryEntry. Note that you need to call DictionaryEntry.Unwrap() before calling this method if this DictionaryEntry was returned from a transaction, and the transaction was committed or rolled back.
type DictionaryEntryClient ¶ added in v0.0.8
type DictionaryEntryClient struct {
// contains filtered or unexported fields
}
DictionaryEntryClient is a client for the DictionaryEntry schema.
func NewDictionaryEntryClient ¶ added in v0.0.8
func NewDictionaryEntryClient(c config) *DictionaryEntryClient
NewDictionaryEntryClient returns a client for the DictionaryEntry from the given config.
func (*DictionaryEntryClient) Create ¶ added in v0.0.8
func (c *DictionaryEntryClient) Create() *DictionaryEntryCreate
Create returns a create builder for DictionaryEntry.
func (*DictionaryEntryClient) CreateBulk ¶ added in v0.0.8
func (c *DictionaryEntryClient) CreateBulk(builders ...*DictionaryEntryCreate) *DictionaryEntryCreateBulk
CreateBulk returns a builder for creating a bulk of DictionaryEntry entities.
func (*DictionaryEntryClient) Delete ¶ added in v0.0.8
func (c *DictionaryEntryClient) Delete() *DictionaryEntryDelete
Delete returns a delete builder for DictionaryEntry.
func (*DictionaryEntryClient) DeleteOne ¶ added in v0.0.8
func (c *DictionaryEntryClient) DeleteOne(de *DictionaryEntry) *DictionaryEntryDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DictionaryEntryClient) DeleteOneID ¶ added in v0.0.8
func (c *DictionaryEntryClient) DeleteOneID(id int) *DictionaryEntryDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DictionaryEntryClient) Get ¶ added in v0.0.8
func (c *DictionaryEntryClient) Get(ctx context.Context, id int) (*DictionaryEntry, error)
Get returns a DictionaryEntry entity by its id.
func (*DictionaryEntryClient) GetX ¶ added in v0.0.8
func (c *DictionaryEntryClient) GetX(ctx context.Context, id int) *DictionaryEntry
GetX is like Get, but panics if an error occurs.
func (*DictionaryEntryClient) Hooks ¶ added in v0.0.8
func (c *DictionaryEntryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DictionaryEntryClient) Query ¶ added in v0.0.8
func (c *DictionaryEntryClient) Query() *DictionaryEntryQuery
Query returns a query builder for DictionaryEntry.
func (*DictionaryEntryClient) QueryDictionary ¶ added in v0.0.8
func (c *DictionaryEntryClient) QueryDictionary(de *DictionaryEntry) *DictionaryQuery
QueryDictionary queries the dictionary edge of a DictionaryEntry.
func (*DictionaryEntryClient) Update ¶ added in v0.0.8
func (c *DictionaryEntryClient) Update() *DictionaryEntryUpdate
Update returns an update builder for DictionaryEntry.
func (*DictionaryEntryClient) UpdateOne ¶ added in v0.0.8
func (c *DictionaryEntryClient) UpdateOne(de *DictionaryEntry) *DictionaryEntryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DictionaryEntryClient) UpdateOneID ¶ added in v0.0.8
func (c *DictionaryEntryClient) UpdateOneID(id int) *DictionaryEntryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DictionaryEntryClient) Use ¶ added in v0.0.8
func (c *DictionaryEntryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dictionaryentry.Hooks(f(g(h())))`.
type DictionaryEntryCreate ¶ added in v0.0.8
type DictionaryEntryCreate struct {
// contains filtered or unexported fields
}
DictionaryEntryCreate is the builder for creating a DictionaryEntry entity.
func (*DictionaryEntryCreate) Mutation ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) Mutation() *DictionaryEntryMutation
Mutation returns the DictionaryEntryMutation object of the builder.
func (*DictionaryEntryCreate) Save ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) Save(ctx context.Context) (*DictionaryEntry, error)
Save creates the DictionaryEntry in the database.
func (*DictionaryEntryCreate) SaveX ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SaveX(ctx context.Context) *DictionaryEntry
SaveX calls Save and panics if Save returns an error.
func (*DictionaryEntryCreate) SetCode ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetCode(s string) *DictionaryEntryCreate
SetCode sets the "code" field.
func (*DictionaryEntryCreate) SetDescription ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetDescription(s string) *DictionaryEntryCreate
SetDescription sets the "description" field.
func (*DictionaryEntryCreate) SetDictionary ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetDictionary(d *Dictionary) *DictionaryEntryCreate
SetDictionary sets the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryCreate) SetDictionaryID ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetDictionaryID(id int) *DictionaryEntryCreate
SetDictionaryID sets the "dictionary" edge to the Dictionary entity by ID.
func (*DictionaryEntryCreate) SetID ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetID(i int) *DictionaryEntryCreate
SetID sets the "id" field.
func (*DictionaryEntryCreate) SetNillableDescription ¶ added in v0.0.8
func (dec *DictionaryEntryCreate) SetNillableDescription(s *string) *DictionaryEntryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
type DictionaryEntryCreateBulk ¶ added in v0.0.8
type DictionaryEntryCreateBulk struct {
// contains filtered or unexported fields
}
DictionaryEntryCreateBulk is the builder for creating many DictionaryEntry entities in bulk.
func (*DictionaryEntryCreateBulk) Save ¶ added in v0.0.8
func (decb *DictionaryEntryCreateBulk) Save(ctx context.Context) ([]*DictionaryEntry, error)
Save creates the DictionaryEntry entities in the database.
func (*DictionaryEntryCreateBulk) SaveX ¶ added in v0.0.8
func (decb *DictionaryEntryCreateBulk) SaveX(ctx context.Context) []*DictionaryEntry
SaveX is like Save, but panics if an error occurs.
type DictionaryEntryDelete ¶ added in v0.0.8
type DictionaryEntryDelete struct {
// contains filtered or unexported fields
}
DictionaryEntryDelete is the builder for deleting a DictionaryEntry entity.
func (*DictionaryEntryDelete) Exec ¶ added in v0.0.8
func (ded *DictionaryEntryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DictionaryEntryDelete) ExecX ¶ added in v0.0.8
func (ded *DictionaryEntryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryEntryDelete) Where ¶ added in v0.0.8
func (ded *DictionaryEntryDelete) Where(ps ...predicate.DictionaryEntry) *DictionaryEntryDelete
Where adds a new predicate to the DictionaryEntryDelete builder.
type DictionaryEntryDeleteOne ¶ added in v0.0.8
type DictionaryEntryDeleteOne struct {
// contains filtered or unexported fields
}
DictionaryEntryDeleteOne is the builder for deleting a single DictionaryEntry entity.
func (*DictionaryEntryDeleteOne) Exec ¶ added in v0.0.8
func (dedo *DictionaryEntryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DictionaryEntryDeleteOne) ExecX ¶ added in v0.0.8
func (dedo *DictionaryEntryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DictionaryEntryEdges ¶ added in v0.0.8
type DictionaryEntryEdges struct {
// Dictionary holds the value of the dictionary edge.
Dictionary *Dictionary `json:"dictionary,omitempty"`
// contains filtered or unexported fields
}
DictionaryEntryEdges holds the relations/edges for other nodes in the graph.
func (DictionaryEntryEdges) DictionaryOrErr ¶ added in v0.0.8
func (e DictionaryEntryEdges) DictionaryOrErr() (*Dictionary, error)
DictionaryOrErr returns the Dictionary value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DictionaryEntryGroupBy ¶ added in v0.0.8
type DictionaryEntryGroupBy struct {
// contains filtered or unexported fields
}
DictionaryEntryGroupBy is the group-by builder for DictionaryEntry entities.
func (*DictionaryEntryGroupBy) Aggregate ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryEntryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DictionaryEntryGroupBy) Bool ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) BoolX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Bools ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) BoolsX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Float64 ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) Float64X ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Float64s ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) Float64sX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Int ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) IntX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Ints ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) IntsX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DictionaryEntryGroupBy) Scan ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DictionaryEntryGroupBy) ScanX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DictionaryEntryGroupBy) String ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) 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 (*DictionaryEntryGroupBy) StringX ¶ added in v0.0.8
func (degb *DictionaryEntryGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DictionaryEntryMutation ¶ added in v0.0.8
type DictionaryEntryMutation struct {
// contains filtered or unexported fields
}
DictionaryEntryMutation represents an operation that mutates the DictionaryEntry nodes in the graph.
func (*DictionaryEntryMutation) AddField ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) AddedEdges ¶ added in v0.0.8
func (m *DictionaryEntryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DictionaryEntryMutation) AddedField ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) AddedFields ¶ added in v0.0.8
func (m *DictionaryEntryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DictionaryEntryMutation) AddedIDs ¶ added in v0.0.8
func (m *DictionaryEntryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DictionaryEntryMutation) ClearDescription ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*DictionaryEntryMutation) ClearDictionary ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ClearDictionary()
ClearDictionary clears the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryMutation) ClearEdge ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) ClearField ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) ClearedEdges ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DictionaryEntryMutation) ClearedFields ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DictionaryEntryMutation) Client ¶ added in v0.0.8
func (m DictionaryEntryMutation) 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 (*DictionaryEntryMutation) Code ¶ added in v0.0.8
func (m *DictionaryEntryMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*DictionaryEntryMutation) Description ¶ added in v0.0.8
func (m *DictionaryEntryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DictionaryEntryMutation) DescriptionCleared ¶ added in v0.0.8
func (m *DictionaryEntryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*DictionaryEntryMutation) DictionaryCleared ¶ added in v0.0.8
func (m *DictionaryEntryMutation) DictionaryCleared() bool
DictionaryCleared returns if the "dictionary" edge to the Dictionary entity was cleared.
func (*DictionaryEntryMutation) DictionaryID ¶ added in v0.0.8
func (m *DictionaryEntryMutation) DictionaryID() (id int, exists bool)
DictionaryID returns the "dictionary" edge ID in the mutation.
func (*DictionaryEntryMutation) DictionaryIDs ¶ added in v0.0.8
func (m *DictionaryEntryMutation) DictionaryIDs() (ids []int)
DictionaryIDs returns the "dictionary" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DictionaryID instead. It exists only for internal usage by the builders.
func (*DictionaryEntryMutation) EdgeCleared ¶ added in v0.0.8
func (m *DictionaryEntryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DictionaryEntryMutation) Field ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) FieldCleared ¶ added in v0.0.8
func (m *DictionaryEntryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DictionaryEntryMutation) Fields ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) ID ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) OldCode ¶ added in v0.0.8
func (m *DictionaryEntryMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the DictionaryEntry entity. If the DictionaryEntry 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 (*DictionaryEntryMutation) OldDescription ¶ added in v0.0.8
func (m *DictionaryEntryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the DictionaryEntry entity. If the DictionaryEntry 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 (*DictionaryEntryMutation) OldField ¶ added in v0.0.8
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 (*DictionaryEntryMutation) Op ¶ added in v0.0.8
func (m *DictionaryEntryMutation) Op() Op
Op returns the operation name.
func (*DictionaryEntryMutation) RemovedEdges ¶ added in v0.0.8
func (m *DictionaryEntryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DictionaryEntryMutation) RemovedIDs ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) ResetCode ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*DictionaryEntryMutation) ResetDescription ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DictionaryEntryMutation) ResetDictionary ¶ added in v0.0.8
func (m *DictionaryEntryMutation) ResetDictionary()
ResetDictionary resets all changes to the "dictionary" edge.
func (*DictionaryEntryMutation) ResetEdge ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) ResetField ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) SetCode ¶ added in v0.0.8
func (m *DictionaryEntryMutation) SetCode(s string)
SetCode sets the "code" field.
func (*DictionaryEntryMutation) SetDescription ¶ added in v0.0.8
func (m *DictionaryEntryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DictionaryEntryMutation) SetDictionaryID ¶ added in v0.0.8
func (m *DictionaryEntryMutation) SetDictionaryID(id int)
SetDictionaryID sets the "dictionary" edge to the Dictionary entity by id.
func (*DictionaryEntryMutation) SetField ¶ added in v0.0.8
func (m *DictionaryEntryMutation) 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 (*DictionaryEntryMutation) SetID ¶ added in v0.0.8
func (m *DictionaryEntryMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DictionaryEntry entities.
func (DictionaryEntryMutation) Tx ¶ added in v0.0.8
func (m DictionaryEntryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DictionaryEntryMutation) Type ¶ added in v0.0.8
func (m *DictionaryEntryMutation) Type() string
Type returns the node type of this mutation (DictionaryEntry).
type DictionaryEntryQuery ¶ added in v0.0.8
type DictionaryEntryQuery struct {
// contains filtered or unexported fields
}
DictionaryEntryQuery is the builder for querying DictionaryEntry entities.
func (*DictionaryEntryQuery) All ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) All(ctx context.Context) ([]*DictionaryEntry, error)
All executes the query and returns a list of DictionaryEntries.
func (*DictionaryEntryQuery) AllX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) AllX(ctx context.Context) []*DictionaryEntry
AllX is like All, but panics if an error occurs.
func (*DictionaryEntryQuery) Clone ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Clone() *DictionaryEntryQuery
Clone returns a duplicate of the DictionaryEntryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DictionaryEntryQuery) Count ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DictionaryEntryQuery) CountX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DictionaryEntryQuery) Exist ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DictionaryEntryQuery) ExistX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DictionaryEntryQuery) First ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) First(ctx context.Context) (*DictionaryEntry, error)
First returns the first DictionaryEntry entity from the query. Returns a *NotFoundError when no DictionaryEntry was found.
func (*DictionaryEntryQuery) FirstID ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DictionaryEntry ID from the query. Returns a *NotFoundError when no DictionaryEntry ID was found.
func (*DictionaryEntryQuery) FirstIDX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DictionaryEntryQuery) FirstX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) FirstX(ctx context.Context) *DictionaryEntry
FirstX is like First, but panics if an error occurs.
func (*DictionaryEntryQuery) GroupBy ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) GroupBy(field string, fields ...string) *DictionaryEntryGroupBy
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 {
Code string `json:"code,omitempty"`
Count int `json:"count,omitempty"`
}
client.DictionaryEntry.Query().
GroupBy(dictionaryentry.FieldCode).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DictionaryEntryQuery) IDs ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DictionaryEntry IDs.
func (*DictionaryEntryQuery) IDsX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DictionaryEntryQuery) Limit ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Limit(limit int) *DictionaryEntryQuery
Limit adds a limit step to the query.
func (*DictionaryEntryQuery) Offset ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Offset(offset int) *DictionaryEntryQuery
Offset adds an offset step to the query.
func (*DictionaryEntryQuery) Only ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Only(ctx context.Context) (*DictionaryEntry, error)
Only returns a single DictionaryEntry entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DictionaryEntry entity is not found. Returns a *NotFoundError when no DictionaryEntry entities are found.
func (*DictionaryEntryQuery) OnlyID ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DictionaryEntry ID in the query. Returns a *NotSingularError when exactly one DictionaryEntry ID is not found. Returns a *NotFoundError when no entities are found.
func (*DictionaryEntryQuery) OnlyIDX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DictionaryEntryQuery) OnlyX ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) OnlyX(ctx context.Context) *DictionaryEntry
OnlyX is like Only, but panics if an error occurs.
func (*DictionaryEntryQuery) Order ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Order(o ...OrderFunc) *DictionaryEntryQuery
Order adds an order step to the query.
func (*DictionaryEntryQuery) QueryDictionary ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) QueryDictionary() *DictionaryQuery
QueryDictionary chains the current query on the "dictionary" edge.
func (*DictionaryEntryQuery) Select ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Select(field string, fields ...string) *DictionaryEntrySelect
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 {
Code string `json:"code,omitempty"`
}
client.DictionaryEntry.Query().
Select(dictionaryentry.FieldCode).
Scan(ctx, &v)
func (*DictionaryEntryQuery) Where ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) Where(ps ...predicate.DictionaryEntry) *DictionaryEntryQuery
Where adds a new predicate for the DictionaryEntryQuery builder.
func (*DictionaryEntryQuery) WithDictionary ¶ added in v0.0.8
func (deq *DictionaryEntryQuery) WithDictionary(opts ...func(*DictionaryQuery)) *DictionaryEntryQuery
WithDictionary tells the query-builder to eager-load the nodes that are connected to the "dictionary" edge. The optional arguments are used to configure the query builder of the edge.
type DictionaryEntrySelect ¶ added in v0.0.8
type DictionaryEntrySelect struct {
*DictionaryEntryQuery
// contains filtered or unexported fields
}
DictionaryEntrySelect is the builder for selecting fields of DictionaryEntry entities.
func (*DictionaryEntrySelect) Bool ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) BoolX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DictionaryEntrySelect) Bools ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) BoolsX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DictionaryEntrySelect) Float64 ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) Float64X ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DictionaryEntrySelect) Float64s ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) Float64sX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionaryEntrySelect) Int ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) IntX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DictionaryEntrySelect) Ints ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) IntsX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DictionaryEntrySelect) Scan ¶ added in v0.0.8
func (des *DictionaryEntrySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DictionaryEntrySelect) ScanX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DictionaryEntrySelect) String ¶ added in v0.0.8
func (des *DictionaryEntrySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DictionaryEntrySelect) StringX ¶ added in v0.0.8
func (des *DictionaryEntrySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DictionaryEntryUpdate ¶ added in v0.0.8
type DictionaryEntryUpdate struct {
// contains filtered or unexported fields
}
DictionaryEntryUpdate is the builder for updating DictionaryEntry entities.
func (*DictionaryEntryUpdate) ClearDescription ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) ClearDescription() *DictionaryEntryUpdate
ClearDescription clears the value of the "description" field.
func (*DictionaryEntryUpdate) ClearDictionary ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) ClearDictionary() *DictionaryEntryUpdate
ClearDictionary clears the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryUpdate) Exec ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryEntryUpdate) ExecX ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryEntryUpdate) Mutation ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) Mutation() *DictionaryEntryMutation
Mutation returns the DictionaryEntryMutation object of the builder.
func (*DictionaryEntryUpdate) Save ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DictionaryEntryUpdate) SaveX ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DictionaryEntryUpdate) SetCode ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SetCode(s string) *DictionaryEntryUpdate
SetCode sets the "code" field.
func (*DictionaryEntryUpdate) SetDescription ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SetDescription(s string) *DictionaryEntryUpdate
SetDescription sets the "description" field.
func (*DictionaryEntryUpdate) SetDictionary ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SetDictionary(d *Dictionary) *DictionaryEntryUpdate
SetDictionary sets the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryUpdate) SetDictionaryID ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SetDictionaryID(id int) *DictionaryEntryUpdate
SetDictionaryID sets the "dictionary" edge to the Dictionary entity by ID.
func (*DictionaryEntryUpdate) SetNillableDescription ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) SetNillableDescription(s *string) *DictionaryEntryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DictionaryEntryUpdate) Where ¶ added in v0.0.8
func (deu *DictionaryEntryUpdate) Where(ps ...predicate.DictionaryEntry) *DictionaryEntryUpdate
Where adds a new predicate for the DictionaryEntryUpdate builder.
type DictionaryEntryUpdateOne ¶ added in v0.0.8
type DictionaryEntryUpdateOne struct {
// contains filtered or unexported fields
}
DictionaryEntryUpdateOne is the builder for updating a single DictionaryEntry entity.
func (*DictionaryEntryUpdateOne) ClearDescription ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) ClearDescription() *DictionaryEntryUpdateOne
ClearDescription clears the value of the "description" field.
func (*DictionaryEntryUpdateOne) ClearDictionary ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) ClearDictionary() *DictionaryEntryUpdateOne
ClearDictionary clears the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryUpdateOne) Exec ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DictionaryEntryUpdateOne) ExecX ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryEntryUpdateOne) Mutation ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) Mutation() *DictionaryEntryMutation
Mutation returns the DictionaryEntryMutation object of the builder.
func (*DictionaryEntryUpdateOne) Save ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) Save(ctx context.Context) (*DictionaryEntry, error)
Save executes the query and returns the updated DictionaryEntry entity.
func (*DictionaryEntryUpdateOne) SaveX ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SaveX(ctx context.Context) *DictionaryEntry
SaveX is like Save, but panics if an error occurs.
func (*DictionaryEntryUpdateOne) SetCode ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SetCode(s string) *DictionaryEntryUpdateOne
SetCode sets the "code" field.
func (*DictionaryEntryUpdateOne) SetDescription ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SetDescription(s string) *DictionaryEntryUpdateOne
SetDescription sets the "description" field.
func (*DictionaryEntryUpdateOne) SetDictionary ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SetDictionary(d *Dictionary) *DictionaryEntryUpdateOne
SetDictionary sets the "dictionary" edge to the Dictionary entity.
func (*DictionaryEntryUpdateOne) SetDictionaryID ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SetDictionaryID(id int) *DictionaryEntryUpdateOne
SetDictionaryID sets the "dictionary" edge to the Dictionary entity by ID.
func (*DictionaryEntryUpdateOne) SetNillableDescription ¶ added in v0.0.8
func (deuo *DictionaryEntryUpdateOne) SetNillableDescription(s *string) *DictionaryEntryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
type DictionaryGroupBy ¶ added in v0.0.8
type DictionaryGroupBy struct {
// contains filtered or unexported fields
}
DictionaryGroupBy is the group-by builder for Dictionary entities.
func (*DictionaryGroupBy) Aggregate ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DictionaryGroupBy) Bool ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) BoolX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DictionaryGroupBy) Bools ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) BoolsX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DictionaryGroupBy) Float64 ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) Float64X ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DictionaryGroupBy) Float64s ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) Float64sX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionaryGroupBy) Int ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) IntX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DictionaryGroupBy) Ints ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) IntsX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DictionaryGroupBy) Scan ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DictionaryGroupBy) ScanX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DictionaryGroupBy) String ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) 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 (*DictionaryGroupBy) StringX ¶ added in v0.0.8
func (dgb *DictionaryGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DictionaryMutation ¶ added in v0.0.8
type DictionaryMutation struct {
// contains filtered or unexported fields
}
DictionaryMutation represents an operation that mutates the Dictionary nodes in the graph.
func (*DictionaryMutation) AddEntryIDs ¶ added in v0.0.8
func (m *DictionaryMutation) AddEntryIDs(ids ...int)
AddEntryIDs adds the "entries" edge to the DictionaryEntry entity by ids.
func (*DictionaryMutation) AddField ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) AddedEdges ¶ added in v0.0.8
func (m *DictionaryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DictionaryMutation) AddedField ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) AddedFields ¶ added in v0.0.8
func (m *DictionaryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DictionaryMutation) AddedIDs ¶ added in v0.0.8
func (m *DictionaryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DictionaryMutation) ClearDescription ¶ added in v0.0.8
func (m *DictionaryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*DictionaryMutation) ClearEdge ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) ClearEntries ¶ added in v0.0.8
func (m *DictionaryMutation) ClearEntries()
ClearEntries clears the "entries" edge to the DictionaryEntry entity.
func (*DictionaryMutation) ClearField ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) ClearedEdges ¶ added in v0.0.8
func (m *DictionaryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DictionaryMutation) ClearedFields ¶ added in v0.0.8
func (m *DictionaryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DictionaryMutation) Client ¶ added in v0.0.8
func (m DictionaryMutation) 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 (*DictionaryMutation) Code ¶ added in v0.0.8
func (m *DictionaryMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*DictionaryMutation) Description ¶ added in v0.0.8
func (m *DictionaryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DictionaryMutation) DescriptionCleared ¶ added in v0.0.8
func (m *DictionaryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*DictionaryMutation) EdgeCleared ¶ added in v0.0.8
func (m *DictionaryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DictionaryMutation) EntriesCleared ¶ added in v0.0.8
func (m *DictionaryMutation) EntriesCleared() bool
EntriesCleared returns if the "entries" edge to the DictionaryEntry entity was cleared.
func (*DictionaryMutation) EntriesIDs ¶ added in v0.0.8
func (m *DictionaryMutation) EntriesIDs() (ids []int)
EntriesIDs returns the "entries" edge IDs in the mutation.
func (*DictionaryMutation) Field ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) FieldCleared ¶ added in v0.0.8
func (m *DictionaryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DictionaryMutation) Fields ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) ID ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) OldCode ¶ added in v0.0.8
func (m *DictionaryMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldDescription ¶ added in v0.0.8
func (m *DictionaryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldField ¶ added in v0.0.8
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 (*DictionaryMutation) Op ¶ added in v0.0.8
func (m *DictionaryMutation) Op() Op
Op returns the operation name.
func (*DictionaryMutation) RemoveEntryIDs ¶ added in v0.0.8
func (m *DictionaryMutation) RemoveEntryIDs(ids ...int)
RemoveEntryIDs removes the "entries" edge to the DictionaryEntry entity by IDs.
func (*DictionaryMutation) RemovedEdges ¶ added in v0.0.8
func (m *DictionaryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DictionaryMutation) RemovedEntriesIDs ¶ added in v0.0.8
func (m *DictionaryMutation) RemovedEntriesIDs() (ids []int)
RemovedEntries returns the removed IDs of the "entries" edge to the DictionaryEntry entity.
func (*DictionaryMutation) RemovedIDs ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) ResetCode ¶ added in v0.0.8
func (m *DictionaryMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*DictionaryMutation) ResetDescription ¶ added in v0.0.8
func (m *DictionaryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DictionaryMutation) ResetEdge ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) ResetEntries ¶ added in v0.0.8
func (m *DictionaryMutation) ResetEntries()
ResetEntries resets all changes to the "entries" edge.
func (*DictionaryMutation) ResetField ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) SetCode ¶ added in v0.0.8
func (m *DictionaryMutation) SetCode(s string)
SetCode sets the "code" field.
func (*DictionaryMutation) SetDescription ¶ added in v0.0.8
func (m *DictionaryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DictionaryMutation) SetField ¶ added in v0.0.8
func (m *DictionaryMutation) 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 (*DictionaryMutation) SetID ¶ added in v0.0.8
func (m *DictionaryMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Dictionary entities.
func (DictionaryMutation) Tx ¶ added in v0.0.8
func (m DictionaryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DictionaryMutation) Type ¶ added in v0.0.8
func (m *DictionaryMutation) Type() string
Type returns the node type of this mutation (Dictionary).
type DictionaryQuery ¶ added in v0.0.8
type DictionaryQuery struct {
// contains filtered or unexported fields
}
DictionaryQuery is the builder for querying Dictionary entities.
func (*DictionaryQuery) All ¶ added in v0.0.8
func (dq *DictionaryQuery) All(ctx context.Context) ([]*Dictionary, error)
All executes the query and returns a list of Dictionaries.
func (*DictionaryQuery) AllX ¶ added in v0.0.8
func (dq *DictionaryQuery) AllX(ctx context.Context) []*Dictionary
AllX is like All, but panics if an error occurs.
func (*DictionaryQuery) Clone ¶ added in v0.0.8
func (dq *DictionaryQuery) Clone() *DictionaryQuery
Clone returns a duplicate of the DictionaryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DictionaryQuery) Count ¶ added in v0.0.8
func (dq *DictionaryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DictionaryQuery) CountX ¶ added in v0.0.8
func (dq *DictionaryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DictionaryQuery) Exist ¶ added in v0.0.8
func (dq *DictionaryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DictionaryQuery) ExistX ¶ added in v0.0.8
func (dq *DictionaryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DictionaryQuery) First ¶ added in v0.0.8
func (dq *DictionaryQuery) First(ctx context.Context) (*Dictionary, error)
First returns the first Dictionary entity from the query. Returns a *NotFoundError when no Dictionary was found.
func (*DictionaryQuery) FirstID ¶ added in v0.0.8
func (dq *DictionaryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Dictionary ID from the query. Returns a *NotFoundError when no Dictionary ID was found.
func (*DictionaryQuery) FirstIDX ¶ added in v0.0.8
func (dq *DictionaryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DictionaryQuery) FirstX ¶ added in v0.0.8
func (dq *DictionaryQuery) FirstX(ctx context.Context) *Dictionary
FirstX is like First, but panics if an error occurs.
func (*DictionaryQuery) GroupBy ¶ added in v0.0.8
func (dq *DictionaryQuery) GroupBy(field string, fields ...string) *DictionaryGroupBy
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 {
Code string `json:"code,omitempty"`
Count int `json:"count,omitempty"`
}
client.Dictionary.Query().
GroupBy(dictionary.FieldCode).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DictionaryQuery) IDs ¶ added in v0.0.8
func (dq *DictionaryQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Dictionary IDs.
func (*DictionaryQuery) IDsX ¶ added in v0.0.8
func (dq *DictionaryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DictionaryQuery) Limit ¶ added in v0.0.8
func (dq *DictionaryQuery) Limit(limit int) *DictionaryQuery
Limit adds a limit step to the query.
func (*DictionaryQuery) Offset ¶ added in v0.0.8
func (dq *DictionaryQuery) Offset(offset int) *DictionaryQuery
Offset adds an offset step to the query.
func (*DictionaryQuery) Only ¶ added in v0.0.8
func (dq *DictionaryQuery) Only(ctx context.Context) (*Dictionary, error)
Only returns a single Dictionary entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Dictionary entity is not found. Returns a *NotFoundError when no Dictionary entities are found.
func (*DictionaryQuery) OnlyID ¶ added in v0.0.8
func (dq *DictionaryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Dictionary ID in the query. Returns a *NotSingularError when exactly one Dictionary ID is not found. Returns a *NotFoundError when no entities are found.
func (*DictionaryQuery) OnlyIDX ¶ added in v0.0.8
func (dq *DictionaryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DictionaryQuery) OnlyX ¶ added in v0.0.8
func (dq *DictionaryQuery) OnlyX(ctx context.Context) *Dictionary
OnlyX is like Only, but panics if an error occurs.
func (*DictionaryQuery) Order ¶ added in v0.0.8
func (dq *DictionaryQuery) Order(o ...OrderFunc) *DictionaryQuery
Order adds an order step to the query.
func (*DictionaryQuery) QueryEntries ¶ added in v0.0.8
func (dq *DictionaryQuery) QueryEntries() *DictionaryEntryQuery
QueryEntries chains the current query on the "entries" edge.
func (*DictionaryQuery) Select ¶ added in v0.0.8
func (dq *DictionaryQuery) Select(field string, fields ...string) *DictionarySelect
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 {
Code string `json:"code,omitempty"`
}
client.Dictionary.Query().
Select(dictionary.FieldCode).
Scan(ctx, &v)
func (*DictionaryQuery) Where ¶ added in v0.0.8
func (dq *DictionaryQuery) Where(ps ...predicate.Dictionary) *DictionaryQuery
Where adds a new predicate for the DictionaryQuery builder.
func (*DictionaryQuery) WithEntries ¶ added in v0.0.8
func (dq *DictionaryQuery) WithEntries(opts ...func(*DictionaryEntryQuery)) *DictionaryQuery
WithEntries tells the query-builder to eager-load the nodes that are connected to the "entries" edge. The optional arguments are used to configure the query builder of the edge.
type DictionarySelect ¶ added in v0.0.8
type DictionarySelect struct {
*DictionaryQuery
// contains filtered or unexported fields
}
DictionarySelect is the builder for selecting fields of Dictionary entities.
func (*DictionarySelect) Bool ¶ added in v0.0.8
func (ds *DictionarySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) BoolX ¶ added in v0.0.8
func (ds *DictionarySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DictionarySelect) Bools ¶ added in v0.0.8
func (ds *DictionarySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) BoolsX ¶ added in v0.0.8
func (ds *DictionarySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DictionarySelect) Float64 ¶ added in v0.0.8
func (ds *DictionarySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Float64X ¶ added in v0.0.8
func (ds *DictionarySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DictionarySelect) Float64s ¶ added in v0.0.8
func (ds *DictionarySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Float64sX ¶ added in v0.0.8
func (ds *DictionarySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionarySelect) Int ¶ added in v0.0.8
func (ds *DictionarySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) IntX ¶ added in v0.0.8
func (ds *DictionarySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DictionarySelect) Ints ¶ added in v0.0.8
func (ds *DictionarySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) IntsX ¶ added in v0.0.8
func (ds *DictionarySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DictionarySelect) Scan ¶ added in v0.0.8
func (ds *DictionarySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DictionarySelect) ScanX ¶ added in v0.0.8
func (ds *DictionarySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DictionarySelect) String ¶ added in v0.0.8
func (ds *DictionarySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) StringX ¶ added in v0.0.8
func (ds *DictionarySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DictionaryUpdate ¶ added in v0.0.8
type DictionaryUpdate struct {
// contains filtered or unexported fields
}
DictionaryUpdate is the builder for updating Dictionary entities.
func (*DictionaryUpdate) AddEntries ¶ added in v0.0.8
func (du *DictionaryUpdate) AddEntries(d ...*DictionaryEntry) *DictionaryUpdate
AddEntries adds the "entries" edges to the DictionaryEntry entity.
func (*DictionaryUpdate) AddEntryIDs ¶ added in v0.0.8
func (du *DictionaryUpdate) AddEntryIDs(ids ...int) *DictionaryUpdate
AddEntryIDs adds the "entries" edge to the DictionaryEntry entity by IDs.
func (*DictionaryUpdate) ClearDescription ¶ added in v0.0.8
func (du *DictionaryUpdate) ClearDescription() *DictionaryUpdate
ClearDescription clears the value of the "description" field.
func (*DictionaryUpdate) ClearEntries ¶ added in v0.0.8
func (du *DictionaryUpdate) ClearEntries() *DictionaryUpdate
ClearEntries clears all "entries" edges to the DictionaryEntry entity.
func (*DictionaryUpdate) Exec ¶ added in v0.0.8
func (du *DictionaryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryUpdate) ExecX ¶ added in v0.0.8
func (du *DictionaryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryUpdate) Mutation ¶ added in v0.0.8
func (du *DictionaryUpdate) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryUpdate) RemoveEntries ¶ added in v0.0.8
func (du *DictionaryUpdate) RemoveEntries(d ...*DictionaryEntry) *DictionaryUpdate
RemoveEntries removes "entries" edges to DictionaryEntry entities.
func (*DictionaryUpdate) RemoveEntryIDs ¶ added in v0.0.8
func (du *DictionaryUpdate) RemoveEntryIDs(ids ...int) *DictionaryUpdate
RemoveEntryIDs removes the "entries" edge to DictionaryEntry entities by IDs.
func (*DictionaryUpdate) Save ¶ added in v0.0.8
func (du *DictionaryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DictionaryUpdate) SaveX ¶ added in v0.0.8
func (du *DictionaryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DictionaryUpdate) SetCode ¶ added in v0.0.8
func (du *DictionaryUpdate) SetCode(s string) *DictionaryUpdate
SetCode sets the "code" field.
func (*DictionaryUpdate) SetDescription ¶ added in v0.0.8
func (du *DictionaryUpdate) SetDescription(s string) *DictionaryUpdate
SetDescription sets the "description" field.
func (*DictionaryUpdate) SetNillableDescription ¶ added in v0.0.8
func (du *DictionaryUpdate) SetNillableDescription(s *string) *DictionaryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DictionaryUpdate) Where ¶ added in v0.0.8
func (du *DictionaryUpdate) Where(ps ...predicate.Dictionary) *DictionaryUpdate
Where adds a new predicate for the DictionaryUpdate builder.
type DictionaryUpdateOne ¶ added in v0.0.8
type DictionaryUpdateOne struct {
// contains filtered or unexported fields
}
DictionaryUpdateOne is the builder for updating a single Dictionary entity.
func (*DictionaryUpdateOne) AddEntries ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) AddEntries(d ...*DictionaryEntry) *DictionaryUpdateOne
AddEntries adds the "entries" edges to the DictionaryEntry entity.
func (*DictionaryUpdateOne) AddEntryIDs ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) AddEntryIDs(ids ...int) *DictionaryUpdateOne
AddEntryIDs adds the "entries" edge to the DictionaryEntry entity by IDs.
func (*DictionaryUpdateOne) ClearDescription ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) ClearDescription() *DictionaryUpdateOne
ClearDescription clears the value of the "description" field.
func (*DictionaryUpdateOne) ClearEntries ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) ClearEntries() *DictionaryUpdateOne
ClearEntries clears all "entries" edges to the DictionaryEntry entity.
func (*DictionaryUpdateOne) Exec ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DictionaryUpdateOne) ExecX ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryUpdateOne) Mutation ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryUpdateOne) RemoveEntries ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) RemoveEntries(d ...*DictionaryEntry) *DictionaryUpdateOne
RemoveEntries removes "entries" edges to DictionaryEntry entities.
func (*DictionaryUpdateOne) RemoveEntryIDs ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) RemoveEntryIDs(ids ...int) *DictionaryUpdateOne
RemoveEntryIDs removes the "entries" edge to DictionaryEntry entities by IDs.
func (*DictionaryUpdateOne) Save ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) Save(ctx context.Context) (*Dictionary, error)
Save executes the query and returns the updated Dictionary entity.
func (*DictionaryUpdateOne) SaveX ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) SaveX(ctx context.Context) *Dictionary
SaveX is like Save, but panics if an error occurs.
func (*DictionaryUpdateOne) SetCode ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) SetCode(s string) *DictionaryUpdateOne
SetCode sets the "code" field.
func (*DictionaryUpdateOne) SetDescription ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) SetDescription(s string) *DictionaryUpdateOne
SetDescription sets the "description" field.
func (*DictionaryUpdateOne) SetNillableDescription ¶ added in v0.0.8
func (duo *DictionaryUpdateOne) SetNillableDescription(s *string) *DictionaryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
type Indicator ¶
type Indicator 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"`
// Code holds the value of the "code" field.
Code string `json:"code,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Active holds the value of the "active" field.
Active bool `json:"active,omitempty"`
// BuiltIn holds the value of the "built_in" field.
BuiltIn bool `json:"built_in,omitempty"`
// External holds the value of the "external" field.
External bool `json:"external,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the IndicatorQuery when eager-loading is set.
Edges IndicatorEdges `json:"edges"`
// contains filtered or unexported fields
}
Indicator is the model entity for the Indicator schema.
func (*Indicator) QueryAuthor ¶
QueryAuthor queries the "author" edge of the Indicator entity.
func (*Indicator) QueryDatasets ¶
func (i *Indicator) QueryDatasets() *DatasetQuery
QueryDatasets queries the "datasets" edge of the Indicator entity.
func (*Indicator) QueryIndicatorParams ¶ added in v0.0.8
func (i *Indicator) QueryIndicatorParams() *IndicatorParamsQuery
QueryIndicatorParams queries the "indicator_params" edge of the Indicator entity.
func (*Indicator) QueryScale ¶
func (i *Indicator) QueryScale() *ScaleQuery
QueryScale queries the "scale" edge of the Indicator entity.
func (*Indicator) Unwrap ¶
Unwrap unwraps the Indicator 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 (*Indicator) Update ¶
func (i *Indicator) Update() *IndicatorUpdateOne
Update returns a builder for updating this Indicator. Note that you need to call Indicator.Unwrap() before calling this method if this Indicator was returned from a transaction, and the transaction was committed or rolled back.
type IndicatorClient ¶
type IndicatorClient struct {
// contains filtered or unexported fields
}
IndicatorClient is a client for the Indicator schema.
func NewIndicatorClient ¶
func NewIndicatorClient(c config) *IndicatorClient
NewIndicatorClient returns a client for the Indicator from the given config.
func (*IndicatorClient) Create ¶
func (c *IndicatorClient) Create() *IndicatorCreate
Create returns a create builder for Indicator.
func (*IndicatorClient) CreateBulk ¶
func (c *IndicatorClient) CreateBulk(builders ...*IndicatorCreate) *IndicatorCreateBulk
CreateBulk returns a builder for creating a bulk of Indicator entities.
func (*IndicatorClient) Delete ¶
func (c *IndicatorClient) Delete() *IndicatorDelete
Delete returns a delete builder for Indicator.
func (*IndicatorClient) DeleteOne ¶
func (c *IndicatorClient) DeleteOne(i *Indicator) *IndicatorDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*IndicatorClient) DeleteOneID ¶
func (c *IndicatorClient) DeleteOneID(id int) *IndicatorDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*IndicatorClient) GetX ¶
func (c *IndicatorClient) GetX(ctx context.Context, id int) *Indicator
GetX is like Get, but panics if an error occurs.
func (*IndicatorClient) Hooks ¶
func (c *IndicatorClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IndicatorClient) Query ¶
func (c *IndicatorClient) Query() *IndicatorQuery
Query returns a query builder for Indicator.
func (*IndicatorClient) QueryAuthor ¶
func (c *IndicatorClient) QueryAuthor(i *Indicator) *UserQuery
QueryAuthor queries the author edge of a Indicator.
func (*IndicatorClient) QueryDatasets ¶
func (c *IndicatorClient) QueryDatasets(i *Indicator) *DatasetQuery
QueryDatasets queries the datasets edge of a Indicator.
func (*IndicatorClient) QueryIndicatorParams ¶ added in v0.0.8
func (c *IndicatorClient) QueryIndicatorParams(i *Indicator) *IndicatorParamsQuery
QueryIndicatorParams queries the indicator_params edge of a Indicator.
func (*IndicatorClient) QueryScale ¶
func (c *IndicatorClient) QueryScale(i *Indicator) *ScaleQuery
QueryScale queries the scale edge of a Indicator.
func (*IndicatorClient) Update ¶
func (c *IndicatorClient) Update() *IndicatorUpdate
Update returns an update builder for Indicator.
func (*IndicatorClient) UpdateOne ¶
func (c *IndicatorClient) UpdateOne(i *Indicator) *IndicatorUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IndicatorClient) UpdateOneID ¶
func (c *IndicatorClient) UpdateOneID(id int) *IndicatorUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IndicatorClient) Use ¶
func (c *IndicatorClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `indicator.Hooks(f(g(h())))`.
type IndicatorCreate ¶
type IndicatorCreate struct {
// contains filtered or unexported fields
}
IndicatorCreate is the builder for creating a Indicator entity.
func (*IndicatorCreate) AddDatasetIDs ¶
func (ic *IndicatorCreate) AddDatasetIDs(ids ...int) *IndicatorCreate
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*IndicatorCreate) AddDatasets ¶
func (ic *IndicatorCreate) AddDatasets(d ...*Dataset) *IndicatorCreate
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*IndicatorCreate) Mutation ¶
func (ic *IndicatorCreate) Mutation() *IndicatorMutation
Mutation returns the IndicatorMutation object of the builder.
func (*IndicatorCreate) Save ¶
func (ic *IndicatorCreate) Save(ctx context.Context) (*Indicator, error)
Save creates the Indicator in the database.
func (*IndicatorCreate) SaveX ¶
func (ic *IndicatorCreate) SaveX(ctx context.Context) *Indicator
SaveX calls Save and panics if Save returns an error.
func (*IndicatorCreate) SetActive ¶
func (ic *IndicatorCreate) SetActive(b bool) *IndicatorCreate
SetActive sets the "active" field.
func (*IndicatorCreate) SetAuthor ¶
func (ic *IndicatorCreate) SetAuthor(u *User) *IndicatorCreate
SetAuthor sets the "author" edge to the User entity.
func (*IndicatorCreate) SetAuthorID ¶
func (ic *IndicatorCreate) SetAuthorID(id int) *IndicatorCreate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*IndicatorCreate) SetBuiltIn ¶
func (ic *IndicatorCreate) SetBuiltIn(b bool) *IndicatorCreate
SetBuiltIn sets the "built_in" field.
func (*IndicatorCreate) SetCode ¶
func (ic *IndicatorCreate) SetCode(s string) *IndicatorCreate
SetCode sets the "code" field.
func (*IndicatorCreate) SetCreateTime ¶
func (ic *IndicatorCreate) SetCreateTime(t time.Time) *IndicatorCreate
SetCreateTime sets the "create_time" field.
func (*IndicatorCreate) SetDescription ¶
func (ic *IndicatorCreate) SetDescription(s string) *IndicatorCreate
SetDescription sets the "description" field.
func (*IndicatorCreate) SetExternal ¶
func (ic *IndicatorCreate) SetExternal(b bool) *IndicatorCreate
SetExternal sets the "external" field.
func (*IndicatorCreate) SetIndicatorParams ¶ added in v0.0.8
func (ic *IndicatorCreate) SetIndicatorParams(i *IndicatorParams) *IndicatorCreate
SetIndicatorParams sets the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorCreate) SetIndicatorParamsID ¶ added in v0.0.8
func (ic *IndicatorCreate) SetIndicatorParamsID(id int) *IndicatorCreate
SetIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID.
func (*IndicatorCreate) SetNillableActive ¶
func (ic *IndicatorCreate) SetNillableActive(b *bool) *IndicatorCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*IndicatorCreate) SetNillableAuthorID ¶
func (ic *IndicatorCreate) SetNillableAuthorID(id *int) *IndicatorCreate
SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.
func (*IndicatorCreate) SetNillableBuiltIn ¶
func (ic *IndicatorCreate) SetNillableBuiltIn(b *bool) *IndicatorCreate
SetNillableBuiltIn sets the "built_in" field if the given value is not nil.
func (*IndicatorCreate) SetNillableCreateTime ¶
func (ic *IndicatorCreate) SetNillableCreateTime(t *time.Time) *IndicatorCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*IndicatorCreate) SetNillableDescription ¶
func (ic *IndicatorCreate) SetNillableDescription(s *string) *IndicatorCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*IndicatorCreate) SetNillableExternal ¶
func (ic *IndicatorCreate) SetNillableExternal(b *bool) *IndicatorCreate
SetNillableExternal sets the "external" field if the given value is not nil.
func (*IndicatorCreate) SetNillableIndicatorParamsID ¶ added in v0.0.8
func (ic *IndicatorCreate) SetNillableIndicatorParamsID(id *int) *IndicatorCreate
SetNillableIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID if the given value is not nil.
func (*IndicatorCreate) SetNillableUpdateTime ¶
func (ic *IndicatorCreate) SetNillableUpdateTime(t *time.Time) *IndicatorCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*IndicatorCreate) SetScale ¶
func (ic *IndicatorCreate) SetScale(s *Scale) *IndicatorCreate
SetScale sets the "scale" edge to the Scale entity.
func (*IndicatorCreate) SetScaleID ¶
func (ic *IndicatorCreate) SetScaleID(id int) *IndicatorCreate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*IndicatorCreate) SetTitle ¶
func (ic *IndicatorCreate) SetTitle(s string) *IndicatorCreate
SetTitle sets the "title" field.
func (*IndicatorCreate) SetUpdateTime ¶
func (ic *IndicatorCreate) SetUpdateTime(t time.Time) *IndicatorCreate
SetUpdateTime sets the "update_time" field.
type IndicatorCreateBulk ¶
type IndicatorCreateBulk struct {
// contains filtered or unexported fields
}
IndicatorCreateBulk is the builder for creating many Indicator entities in bulk.
type IndicatorDelete ¶
type IndicatorDelete struct {
// contains filtered or unexported fields
}
IndicatorDelete is the builder for deleting a Indicator entity.
func (*IndicatorDelete) Exec ¶
func (id *IndicatorDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IndicatorDelete) ExecX ¶
func (id *IndicatorDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorDelete) Where ¶
func (id *IndicatorDelete) Where(ps ...predicate.Indicator) *IndicatorDelete
Where adds a new predicate to the IndicatorDelete builder.
type IndicatorDeleteOne ¶
type IndicatorDeleteOne struct {
// contains filtered or unexported fields
}
IndicatorDeleteOne is the builder for deleting a single Indicator entity.
func (*IndicatorDeleteOne) Exec ¶
func (ido *IndicatorDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IndicatorDeleteOne) ExecX ¶
func (ido *IndicatorDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IndicatorEdges ¶
type IndicatorEdges struct {
// Datasets holds the value of the datasets edge.
Datasets []*Dataset `json:"datasets,omitempty"`
// IndicatorParams holds the value of the indicator_params edge.
IndicatorParams *IndicatorParams `json:"indicator_params,omitempty"`
// Author holds the value of the author edge.
Author *User `json:"author,omitempty"`
// Scale holds the value of the scale edge.
Scale *Scale `json:"scale,omitempty"`
// contains filtered or unexported fields
}
IndicatorEdges holds the relations/edges for other nodes in the graph.
func (IndicatorEdges) AuthorOrErr ¶
func (e IndicatorEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IndicatorEdges) DatasetsOrErr ¶
func (e IndicatorEdges) DatasetsOrErr() ([]*Dataset, error)
DatasetsOrErr returns the Datasets value or an error if the edge was not loaded in eager-loading.
func (IndicatorEdges) IndicatorParamsOrErr ¶ added in v0.0.8
func (e IndicatorEdges) IndicatorParamsOrErr() (*IndicatorParams, error)
IndicatorParamsOrErr returns the IndicatorParams value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IndicatorEdges) ScaleOrErr ¶
func (e IndicatorEdges) ScaleOrErr() (*Scale, error)
ScaleOrErr returns the Scale value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IndicatorGroupBy ¶
type IndicatorGroupBy struct {
// contains filtered or unexported fields
}
IndicatorGroupBy is the group-by builder for Indicator entities.
func (*IndicatorGroupBy) Aggregate ¶
func (igb *IndicatorGroupBy) Aggregate(fns ...AggregateFunc) *IndicatorGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IndicatorGroupBy) Bool ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) BoolX ¶
func (igb *IndicatorGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IndicatorGroupBy) Bools ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) BoolsX ¶
func (igb *IndicatorGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IndicatorGroupBy) Float64 ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) Float64X ¶
func (igb *IndicatorGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IndicatorGroupBy) Float64s ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) Float64sX ¶
func (igb *IndicatorGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IndicatorGroupBy) Int ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) IntX ¶
func (igb *IndicatorGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IndicatorGroupBy) Ints ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) IntsX ¶
func (igb *IndicatorGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IndicatorGroupBy) Scan ¶
func (igb *IndicatorGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*IndicatorGroupBy) ScanX ¶
func (igb *IndicatorGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IndicatorGroupBy) String ¶
func (igb *IndicatorGroupBy) 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 (*IndicatorGroupBy) StringX ¶
func (igb *IndicatorGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IndicatorMutation ¶
type IndicatorMutation struct {
// contains filtered or unexported fields
}
IndicatorMutation represents an operation that mutates the Indicator nodes in the graph.
func (*IndicatorMutation) Active ¶
func (m *IndicatorMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*IndicatorMutation) AddDatasetIDs ¶
func (m *IndicatorMutation) AddDatasetIDs(ids ...int)
AddDatasetIDs adds the "datasets" edge to the Dataset entity by ids.
func (*IndicatorMutation) AddField ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) AddedEdges ¶
func (m *IndicatorMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IndicatorMutation) AddedField ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) AddedFields ¶
func (m *IndicatorMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IndicatorMutation) AddedIDs ¶
func (m *IndicatorMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IndicatorMutation) AuthorCleared ¶
func (m *IndicatorMutation) AuthorCleared() bool
AuthorCleared returns if the "author" edge to the User entity was cleared.
func (*IndicatorMutation) AuthorID ¶
func (m *IndicatorMutation) AuthorID() (id int, exists bool)
AuthorID returns the "author" edge ID in the mutation.
func (*IndicatorMutation) AuthorIDs ¶
func (m *IndicatorMutation) AuthorIDs() (ids []int)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*IndicatorMutation) BuiltIn ¶
func (m *IndicatorMutation) BuiltIn() (r bool, exists bool)
BuiltIn returns the value of the "built_in" field in the mutation.
func (*IndicatorMutation) ClearAuthor ¶
func (m *IndicatorMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*IndicatorMutation) ClearDatasets ¶
func (m *IndicatorMutation) ClearDatasets()
ClearDatasets clears the "datasets" edge to the Dataset entity.
func (*IndicatorMutation) ClearDescription ¶
func (m *IndicatorMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*IndicatorMutation) ClearEdge ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ClearField ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ClearIndicatorParams ¶ added in v0.0.8
func (m *IndicatorMutation) ClearIndicatorParams()
ClearIndicatorParams clears the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorMutation) ClearScale ¶
func (m *IndicatorMutation) ClearScale()
ClearScale clears the "scale" edge to the Scale entity.
func (*IndicatorMutation) ClearedEdges ¶
func (m *IndicatorMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IndicatorMutation) ClearedFields ¶
func (m *IndicatorMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IndicatorMutation) Client ¶
func (m IndicatorMutation) 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 (*IndicatorMutation) Code ¶
func (m *IndicatorMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*IndicatorMutation) CreateTime ¶
func (m *IndicatorMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*IndicatorMutation) DatasetsCleared ¶
func (m *IndicatorMutation) DatasetsCleared() bool
DatasetsCleared returns if the "datasets" edge to the Dataset entity was cleared.
func (*IndicatorMutation) DatasetsIDs ¶
func (m *IndicatorMutation) DatasetsIDs() (ids []int)
DatasetsIDs returns the "datasets" edge IDs in the mutation.
func (*IndicatorMutation) Description ¶
func (m *IndicatorMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*IndicatorMutation) DescriptionCleared ¶
func (m *IndicatorMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*IndicatorMutation) EdgeCleared ¶
func (m *IndicatorMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IndicatorMutation) External ¶
func (m *IndicatorMutation) External() (r bool, exists bool)
External returns the value of the "external" field in the mutation.
func (*IndicatorMutation) Field ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) FieldCleared ¶
func (m *IndicatorMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IndicatorMutation) Fields ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ID ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) IndicatorParamsCleared ¶ added in v0.0.8
func (m *IndicatorMutation) IndicatorParamsCleared() bool
IndicatorParamsCleared returns if the "indicator_params" edge to the IndicatorParams entity was cleared.
func (*IndicatorMutation) IndicatorParamsID ¶ added in v0.0.8
func (m *IndicatorMutation) IndicatorParamsID() (id int, exists bool)
IndicatorParamsID returns the "indicator_params" edge ID in the mutation.
func (*IndicatorMutation) IndicatorParamsIDs ¶ added in v0.0.8
func (m *IndicatorMutation) IndicatorParamsIDs() (ids []int)
IndicatorParamsIDs returns the "indicator_params" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IndicatorParamsID instead. It exists only for internal usage by the builders.
func (*IndicatorMutation) OldActive ¶
func (m *IndicatorMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldBuiltIn ¶
func (m *IndicatorMutation) OldBuiltIn(ctx context.Context) (v bool, err error)
OldBuiltIn returns the old "built_in" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldCode ¶
func (m *IndicatorMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldDescription ¶
func (m *IndicatorMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldExternal ¶
func (m *IndicatorMutation) OldExternal(ctx context.Context) (v bool, err error)
OldExternal returns the old "external" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) 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 (*IndicatorMutation) OldTitle ¶
func (m *IndicatorMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Indicator entity. If the Indicator 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 (*IndicatorMutation) RemoveDatasetIDs ¶
func (m *IndicatorMutation) RemoveDatasetIDs(ids ...int)
RemoveDatasetIDs removes the "datasets" edge to the Dataset entity by IDs.
func (*IndicatorMutation) RemovedDatasetsIDs ¶
func (m *IndicatorMutation) RemovedDatasetsIDs() (ids []int)
RemovedDatasets returns the removed IDs of the "datasets" edge to the Dataset entity.
func (*IndicatorMutation) RemovedEdges ¶
func (m *IndicatorMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IndicatorMutation) RemovedIDs ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ResetActive ¶
func (m *IndicatorMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*IndicatorMutation) ResetAuthor ¶
func (m *IndicatorMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*IndicatorMutation) ResetBuiltIn ¶
func (m *IndicatorMutation) ResetBuiltIn()
ResetBuiltIn resets all changes to the "built_in" field.
func (*IndicatorMutation) ResetCode ¶
func (m *IndicatorMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*IndicatorMutation) ResetCreateTime ¶
func (m *IndicatorMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*IndicatorMutation) ResetDatasets ¶
func (m *IndicatorMutation) ResetDatasets()
ResetDatasets resets all changes to the "datasets" edge.
func (*IndicatorMutation) ResetDescription ¶
func (m *IndicatorMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*IndicatorMutation) ResetEdge ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ResetExternal ¶
func (m *IndicatorMutation) ResetExternal()
ResetExternal resets all changes to the "external" field.
func (*IndicatorMutation) ResetField ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) ResetIndicatorParams ¶ added in v0.0.8
func (m *IndicatorMutation) ResetIndicatorParams()
ResetIndicatorParams resets all changes to the "indicator_params" edge.
func (*IndicatorMutation) ResetScale ¶
func (m *IndicatorMutation) ResetScale()
ResetScale resets all changes to the "scale" edge.
func (*IndicatorMutation) ResetTitle ¶
func (m *IndicatorMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*IndicatorMutation) ResetUpdateTime ¶
func (m *IndicatorMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*IndicatorMutation) ScaleCleared ¶
func (m *IndicatorMutation) ScaleCleared() bool
ScaleCleared returns if the "scale" edge to the Scale entity was cleared.
func (*IndicatorMutation) ScaleID ¶
func (m *IndicatorMutation) ScaleID() (id int, exists bool)
ScaleID returns the "scale" edge ID in the mutation.
func (*IndicatorMutation) ScaleIDs ¶
func (m *IndicatorMutation) ScaleIDs() (ids []int)
ScaleIDs returns the "scale" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScaleID instead. It exists only for internal usage by the builders.
func (*IndicatorMutation) SetActive ¶
func (m *IndicatorMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*IndicatorMutation) SetAuthorID ¶
func (m *IndicatorMutation) SetAuthorID(id int)
SetAuthorID sets the "author" edge to the User entity by id.
func (*IndicatorMutation) SetBuiltIn ¶
func (m *IndicatorMutation) SetBuiltIn(b bool)
SetBuiltIn sets the "built_in" field.
func (*IndicatorMutation) SetCode ¶
func (m *IndicatorMutation) SetCode(s string)
SetCode sets the "code" field.
func (*IndicatorMutation) SetCreateTime ¶
func (m *IndicatorMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*IndicatorMutation) SetDescription ¶
func (m *IndicatorMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*IndicatorMutation) SetExternal ¶
func (m *IndicatorMutation) SetExternal(b bool)
SetExternal sets the "external" field.
func (*IndicatorMutation) SetField ¶
func (m *IndicatorMutation) 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 (*IndicatorMutation) SetIndicatorParamsID ¶ added in v0.0.8
func (m *IndicatorMutation) SetIndicatorParamsID(id int)
SetIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by id.
func (*IndicatorMutation) SetScaleID ¶
func (m *IndicatorMutation) SetScaleID(id int)
SetScaleID sets the "scale" edge to the Scale entity by id.
func (*IndicatorMutation) SetTitle ¶
func (m *IndicatorMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*IndicatorMutation) SetUpdateTime ¶
func (m *IndicatorMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*IndicatorMutation) Title ¶
func (m *IndicatorMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (IndicatorMutation) Tx ¶
func (m IndicatorMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IndicatorMutation) Type ¶
func (m *IndicatorMutation) Type() string
Type returns the node type of this mutation (Indicator).
func (*IndicatorMutation) UpdateTime ¶
func (m *IndicatorMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type IndicatorParams ¶ added in v0.0.8
type IndicatorParams struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ValueMapping holds the value of the "value_mapping" field.
ValueMapping map[string]string `json:"value_mapping,omitempty"`
// ValueParams holds the value of the "value_params" field.
ValueParams domain.IndicatorValueParams `json:"value_params,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the IndicatorParamsQuery when eager-loading is set.
Edges IndicatorParamsEdges `json:"edges"`
// contains filtered or unexported fields
}
IndicatorParams is the model entity for the IndicatorParams schema.
func (*IndicatorParams) QueryIndicator ¶ added in v0.0.8
func (ip *IndicatorParams) QueryIndicator() *IndicatorQuery
QueryIndicator queries the "indicator" edge of the IndicatorParams entity.
func (*IndicatorParams) String ¶ added in v0.0.8
func (ip *IndicatorParams) String() string
String implements the fmt.Stringer.
func (*IndicatorParams) Unwrap ¶ added in v0.0.8
func (ip *IndicatorParams) Unwrap() *IndicatorParams
Unwrap unwraps the IndicatorParams 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 (*IndicatorParams) Update ¶ added in v0.0.8
func (ip *IndicatorParams) Update() *IndicatorParamsUpdateOne
Update returns a builder for updating this IndicatorParams. Note that you need to call IndicatorParams.Unwrap() before calling this method if this IndicatorParams was returned from a transaction, and the transaction was committed or rolled back.
type IndicatorParamsClient ¶ added in v0.0.8
type IndicatorParamsClient struct {
// contains filtered or unexported fields
}
IndicatorParamsClient is a client for the IndicatorParams schema.
func NewIndicatorParamsClient ¶ added in v0.0.8
func NewIndicatorParamsClient(c config) *IndicatorParamsClient
NewIndicatorParamsClient returns a client for the IndicatorParams from the given config.
func (*IndicatorParamsClient) Create ¶ added in v0.0.8
func (c *IndicatorParamsClient) Create() *IndicatorParamsCreate
Create returns a create builder for IndicatorParams.
func (*IndicatorParamsClient) CreateBulk ¶ added in v0.0.8
func (c *IndicatorParamsClient) CreateBulk(builders ...*IndicatorParamsCreate) *IndicatorParamsCreateBulk
CreateBulk returns a builder for creating a bulk of IndicatorParams entities.
func (*IndicatorParamsClient) Delete ¶ added in v0.0.8
func (c *IndicatorParamsClient) Delete() *IndicatorParamsDelete
Delete returns a delete builder for IndicatorParams.
func (*IndicatorParamsClient) DeleteOne ¶ added in v0.0.8
func (c *IndicatorParamsClient) DeleteOne(ip *IndicatorParams) *IndicatorParamsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*IndicatorParamsClient) DeleteOneID ¶ added in v0.0.8
func (c *IndicatorParamsClient) DeleteOneID(id int) *IndicatorParamsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*IndicatorParamsClient) Get ¶ added in v0.0.8
func (c *IndicatorParamsClient) Get(ctx context.Context, id int) (*IndicatorParams, error)
Get returns a IndicatorParams entity by its id.
func (*IndicatorParamsClient) GetX ¶ added in v0.0.8
func (c *IndicatorParamsClient) GetX(ctx context.Context, id int) *IndicatorParams
GetX is like Get, but panics if an error occurs.
func (*IndicatorParamsClient) Hooks ¶ added in v0.0.8
func (c *IndicatorParamsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IndicatorParamsClient) Query ¶ added in v0.0.8
func (c *IndicatorParamsClient) Query() *IndicatorParamsQuery
Query returns a query builder for IndicatorParams.
func (*IndicatorParamsClient) QueryIndicator ¶ added in v0.0.8
func (c *IndicatorParamsClient) QueryIndicator(ip *IndicatorParams) *IndicatorQuery
QueryIndicator queries the indicator edge of a IndicatorParams.
func (*IndicatorParamsClient) Update ¶ added in v0.0.8
func (c *IndicatorParamsClient) Update() *IndicatorParamsUpdate
Update returns an update builder for IndicatorParams.
func (*IndicatorParamsClient) UpdateOne ¶ added in v0.0.8
func (c *IndicatorParamsClient) UpdateOne(ip *IndicatorParams) *IndicatorParamsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IndicatorParamsClient) UpdateOneID ¶ added in v0.0.8
func (c *IndicatorParamsClient) UpdateOneID(id int) *IndicatorParamsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IndicatorParamsClient) Use ¶ added in v0.0.8
func (c *IndicatorParamsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `indicatorparams.Hooks(f(g(h())))`.
type IndicatorParamsCreate ¶ added in v0.0.8
type IndicatorParamsCreate struct {
// contains filtered or unexported fields
}
IndicatorParamsCreate is the builder for creating a IndicatorParams entity.
func (*IndicatorParamsCreate) Mutation ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) Mutation() *IndicatorParamsMutation
Mutation returns the IndicatorParamsMutation object of the builder.
func (*IndicatorParamsCreate) Save ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) Save(ctx context.Context) (*IndicatorParams, error)
Save creates the IndicatorParams in the database.
func (*IndicatorParamsCreate) SaveX ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) SaveX(ctx context.Context) *IndicatorParams
SaveX calls Save and panics if Save returns an error.
func (*IndicatorParamsCreate) SetIndicator ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) SetIndicator(i *Indicator) *IndicatorParamsCreate
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*IndicatorParamsCreate) SetIndicatorID ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) SetIndicatorID(id int) *IndicatorParamsCreate
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*IndicatorParamsCreate) SetValueMapping ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) SetValueMapping(m map[string]string) *IndicatorParamsCreate
SetValueMapping sets the "value_mapping" field.
func (*IndicatorParamsCreate) SetValueParams ¶ added in v0.0.8
func (ipc *IndicatorParamsCreate) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsCreate
SetValueParams sets the "value_params" field.
type IndicatorParamsCreateBulk ¶ added in v0.0.8
type IndicatorParamsCreateBulk struct {
// contains filtered or unexported fields
}
IndicatorParamsCreateBulk is the builder for creating many IndicatorParams entities in bulk.
func (*IndicatorParamsCreateBulk) Save ¶ added in v0.0.8
func (ipcb *IndicatorParamsCreateBulk) Save(ctx context.Context) ([]*IndicatorParams, error)
Save creates the IndicatorParams entities in the database.
func (*IndicatorParamsCreateBulk) SaveX ¶ added in v0.0.8
func (ipcb *IndicatorParamsCreateBulk) SaveX(ctx context.Context) []*IndicatorParams
SaveX is like Save, but panics if an error occurs.
type IndicatorParamsDelete ¶ added in v0.0.8
type IndicatorParamsDelete struct {
// contains filtered or unexported fields
}
IndicatorParamsDelete is the builder for deleting a IndicatorParams entity.
func (*IndicatorParamsDelete) Exec ¶ added in v0.0.8
func (ipd *IndicatorParamsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IndicatorParamsDelete) ExecX ¶ added in v0.0.8
func (ipd *IndicatorParamsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorParamsDelete) Where ¶ added in v0.0.8
func (ipd *IndicatorParamsDelete) Where(ps ...predicate.IndicatorParams) *IndicatorParamsDelete
Where adds a new predicate to the IndicatorParamsDelete builder.
type IndicatorParamsDeleteOne ¶ added in v0.0.8
type IndicatorParamsDeleteOne struct {
// contains filtered or unexported fields
}
IndicatorParamsDeleteOne is the builder for deleting a single IndicatorParams entity.
func (*IndicatorParamsDeleteOne) Exec ¶ added in v0.0.8
func (ipdo *IndicatorParamsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IndicatorParamsDeleteOne) ExecX ¶ added in v0.0.8
func (ipdo *IndicatorParamsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IndicatorParamsEdges ¶ added in v0.0.8
type IndicatorParamsEdges struct {
// Indicator holds the value of the indicator edge.
Indicator *Indicator `json:"indicator,omitempty"`
// contains filtered or unexported fields
}
IndicatorParamsEdges holds the relations/edges for other nodes in the graph.
func (IndicatorParamsEdges) IndicatorOrErr ¶ added in v0.0.8
func (e IndicatorParamsEdges) IndicatorOrErr() (*Indicator, error)
IndicatorOrErr returns the Indicator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IndicatorParamsGroupBy ¶ added in v0.0.8
type IndicatorParamsGroupBy struct {
// contains filtered or unexported fields
}
IndicatorParamsGroupBy is the group-by builder for IndicatorParams entities.
func (*IndicatorParamsGroupBy) Aggregate ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) Aggregate(fns ...AggregateFunc) *IndicatorParamsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IndicatorParamsGroupBy) Bool ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) BoolX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Bools ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) BoolsX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Float64 ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) Float64X ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Float64s ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) Float64sX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Int ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) IntX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Ints ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) IntsX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IndicatorParamsGroupBy) Scan ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*IndicatorParamsGroupBy) ScanX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IndicatorParamsGroupBy) String ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) 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 (*IndicatorParamsGroupBy) StringX ¶ added in v0.0.8
func (ipgb *IndicatorParamsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IndicatorParamsMutation ¶ added in v0.0.8
type IndicatorParamsMutation struct {
// contains filtered or unexported fields
}
IndicatorParamsMutation represents an operation that mutates the IndicatorParams nodes in the graph.
func (*IndicatorParamsMutation) AddField ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) AddedEdges ¶ added in v0.0.8
func (m *IndicatorParamsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IndicatorParamsMutation) AddedField ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) AddedFields ¶ added in v0.0.8
func (m *IndicatorParamsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IndicatorParamsMutation) AddedIDs ¶ added in v0.0.8
func (m *IndicatorParamsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IndicatorParamsMutation) ClearEdge ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ClearField ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ClearIndicator ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ClearIndicator()
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*IndicatorParamsMutation) ClearValueMapping ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ClearValueMapping()
ClearValueMapping clears the value of the "value_mapping" field.
func (*IndicatorParamsMutation) ClearedEdges ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IndicatorParamsMutation) ClearedFields ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IndicatorParamsMutation) Client ¶ added in v0.0.8
func (m IndicatorParamsMutation) 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 (*IndicatorParamsMutation) EdgeCleared ¶ added in v0.0.8
func (m *IndicatorParamsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IndicatorParamsMutation) Field ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) FieldCleared ¶ added in v0.0.8
func (m *IndicatorParamsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IndicatorParamsMutation) Fields ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ID ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) IndicatorCleared ¶ added in v0.0.8
func (m *IndicatorParamsMutation) IndicatorCleared() bool
IndicatorCleared returns if the "indicator" edge to the Indicator entity was cleared.
func (*IndicatorParamsMutation) IndicatorID ¶ added in v0.0.8
func (m *IndicatorParamsMutation) IndicatorID() (id int, exists bool)
IndicatorID returns the "indicator" edge ID in the mutation.
func (*IndicatorParamsMutation) IndicatorIDs ¶ added in v0.0.8
func (m *IndicatorParamsMutation) IndicatorIDs() (ids []int)
IndicatorIDs returns the "indicator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IndicatorID instead. It exists only for internal usage by the builders.
func (*IndicatorParamsMutation) OldField ¶ added in v0.0.8
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 (*IndicatorParamsMutation) OldValueMapping ¶ added in v0.0.8
func (m *IndicatorParamsMutation) OldValueMapping(ctx context.Context) (v map[string]string, err error)
OldValueMapping returns the old "value_mapping" field's value of the IndicatorParams entity. If the IndicatorParams 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 (*IndicatorParamsMutation) OldValueParams ¶ added in v0.0.8
func (m *IndicatorParamsMutation) OldValueParams(ctx context.Context) (v domain.IndicatorValueParams, err error)
OldValueParams returns the old "value_params" field's value of the IndicatorParams entity. If the IndicatorParams 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 (*IndicatorParamsMutation) Op ¶ added in v0.0.8
func (m *IndicatorParamsMutation) Op() Op
Op returns the operation name.
func (*IndicatorParamsMutation) RemovedEdges ¶ added in v0.0.8
func (m *IndicatorParamsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IndicatorParamsMutation) RemovedIDs ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ResetEdge ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ResetField ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) ResetIndicator ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ResetIndicator()
ResetIndicator resets all changes to the "indicator" edge.
func (*IndicatorParamsMutation) ResetValueMapping ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ResetValueMapping()
ResetValueMapping resets all changes to the "value_mapping" field.
func (*IndicatorParamsMutation) ResetValueParams ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ResetValueParams()
ResetValueParams resets all changes to the "value_params" field.
func (*IndicatorParamsMutation) SetField ¶ added in v0.0.8
func (m *IndicatorParamsMutation) 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 (*IndicatorParamsMutation) SetIndicatorID ¶ added in v0.0.8
func (m *IndicatorParamsMutation) SetIndicatorID(id int)
SetIndicatorID sets the "indicator" edge to the Indicator entity by id.
func (*IndicatorParamsMutation) SetValueMapping ¶ added in v0.0.8
func (m *IndicatorParamsMutation) SetValueMapping(value map[string]string)
SetValueMapping sets the "value_mapping" field.
func (*IndicatorParamsMutation) SetValueParams ¶ added in v0.0.8
func (m *IndicatorParamsMutation) SetValueParams(dvp domain.IndicatorValueParams)
SetValueParams sets the "value_params" field.
func (IndicatorParamsMutation) Tx ¶ added in v0.0.8
func (m IndicatorParamsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IndicatorParamsMutation) Type ¶ added in v0.0.8
func (m *IndicatorParamsMutation) Type() string
Type returns the node type of this mutation (IndicatorParams).
func (*IndicatorParamsMutation) ValueMapping ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ValueMapping() (r map[string]string, exists bool)
ValueMapping returns the value of the "value_mapping" field in the mutation.
func (*IndicatorParamsMutation) ValueMappingCleared ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ValueMappingCleared() bool
ValueMappingCleared returns if the "value_mapping" field was cleared in this mutation.
func (*IndicatorParamsMutation) ValueParams ¶ added in v0.0.8
func (m *IndicatorParamsMutation) ValueParams() (r domain.IndicatorValueParams, exists bool)
ValueParams returns the value of the "value_params" field in the mutation.
type IndicatorParamsQuery ¶ added in v0.0.8
type IndicatorParamsQuery struct {
// contains filtered or unexported fields
}
IndicatorParamsQuery is the builder for querying IndicatorParams entities.
func (*IndicatorParamsQuery) All ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) All(ctx context.Context) ([]*IndicatorParams, error)
All executes the query and returns a list of IndicatorParamsSlice.
func (*IndicatorParamsQuery) AllX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) AllX(ctx context.Context) []*IndicatorParams
AllX is like All, but panics if an error occurs.
func (*IndicatorParamsQuery) Clone ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Clone() *IndicatorParamsQuery
Clone returns a duplicate of the IndicatorParamsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IndicatorParamsQuery) Count ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IndicatorParamsQuery) CountX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IndicatorParamsQuery) Exist ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IndicatorParamsQuery) ExistX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IndicatorParamsQuery) First ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) First(ctx context.Context) (*IndicatorParams, error)
First returns the first IndicatorParams entity from the query. Returns a *NotFoundError when no IndicatorParams was found.
func (*IndicatorParamsQuery) FirstID ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first IndicatorParams ID from the query. Returns a *NotFoundError when no IndicatorParams ID was found.
func (*IndicatorParamsQuery) FirstIDX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IndicatorParamsQuery) FirstX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) FirstX(ctx context.Context) *IndicatorParams
FirstX is like First, but panics if an error occurs.
func (*IndicatorParamsQuery) GroupBy ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) GroupBy(field string, fields ...string) *IndicatorParamsGroupBy
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 {
ValueMapping map[string]string `json:"value_mapping,omitempty"`
Count int `json:"count,omitempty"`
}
client.IndicatorParams.Query().
GroupBy(indicatorparams.FieldValueMapping).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*IndicatorParamsQuery) IDs ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of IndicatorParams IDs.
func (*IndicatorParamsQuery) IDsX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IndicatorParamsQuery) Limit ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Limit(limit int) *IndicatorParamsQuery
Limit adds a limit step to the query.
func (*IndicatorParamsQuery) Offset ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Offset(offset int) *IndicatorParamsQuery
Offset adds an offset step to the query.
func (*IndicatorParamsQuery) Only ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Only(ctx context.Context) (*IndicatorParams, error)
Only returns a single IndicatorParams entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one IndicatorParams entity is not found. Returns a *NotFoundError when no IndicatorParams entities are found.
func (*IndicatorParamsQuery) OnlyID ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only IndicatorParams ID in the query. Returns a *NotSingularError when exactly one IndicatorParams ID is not found. Returns a *NotFoundError when no entities are found.
func (*IndicatorParamsQuery) OnlyIDX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IndicatorParamsQuery) OnlyX ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) OnlyX(ctx context.Context) *IndicatorParams
OnlyX is like Only, but panics if an error occurs.
func (*IndicatorParamsQuery) Order ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Order(o ...OrderFunc) *IndicatorParamsQuery
Order adds an order step to the query.
func (*IndicatorParamsQuery) QueryIndicator ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) QueryIndicator() *IndicatorQuery
QueryIndicator chains the current query on the "indicator" edge.
func (*IndicatorParamsQuery) Select ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Select(field string, fields ...string) *IndicatorParamsSelect
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 {
ValueMapping map[string]string `json:"value_mapping,omitempty"`
}
client.IndicatorParams.Query().
Select(indicatorparams.FieldValueMapping).
Scan(ctx, &v)
func (*IndicatorParamsQuery) Where ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) Where(ps ...predicate.IndicatorParams) *IndicatorParamsQuery
Where adds a new predicate for the IndicatorParamsQuery builder.
func (*IndicatorParamsQuery) WithIndicator ¶ added in v0.0.8
func (ipq *IndicatorParamsQuery) WithIndicator(opts ...func(*IndicatorQuery)) *IndicatorParamsQuery
WithIndicator tells the query-builder to eager-load the nodes that are connected to the "indicator" edge. The optional arguments are used to configure the query builder of the edge.
type IndicatorParamsSelect ¶ added in v0.0.8
type IndicatorParamsSelect struct {
*IndicatorParamsQuery
// contains filtered or unexported fields
}
IndicatorParamsSelect is the builder for selecting fields of IndicatorParams entities.
func (*IndicatorParamsSelect) Bool ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) BoolX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IndicatorParamsSelect) Bools ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) BoolsX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IndicatorParamsSelect) Float64 ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) Float64X ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IndicatorParamsSelect) Float64s ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) Float64sX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IndicatorParamsSelect) Int ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) IntX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IndicatorParamsSelect) Ints ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) IntsX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IndicatorParamsSelect) Scan ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*IndicatorParamsSelect) ScanX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IndicatorParamsSelect) String ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*IndicatorParamsSelect) StringX ¶ added in v0.0.8
func (ips *IndicatorParamsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IndicatorParamsSlice ¶ added in v0.0.8
type IndicatorParamsSlice []*IndicatorParams
IndicatorParamsSlice is a parsable slice of IndicatorParams.
type IndicatorParamsUpdate ¶ added in v0.0.8
type IndicatorParamsUpdate struct {
// contains filtered or unexported fields
}
IndicatorParamsUpdate is the builder for updating IndicatorParams entities.
func (*IndicatorParamsUpdate) ClearIndicator ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) ClearIndicator() *IndicatorParamsUpdate
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*IndicatorParamsUpdate) ClearValueMapping ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) ClearValueMapping() *IndicatorParamsUpdate
ClearValueMapping clears the value of the "value_mapping" field.
func (*IndicatorParamsUpdate) Exec ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IndicatorParamsUpdate) ExecX ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorParamsUpdate) Mutation ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) Mutation() *IndicatorParamsMutation
Mutation returns the IndicatorParamsMutation object of the builder.
func (*IndicatorParamsUpdate) Save ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IndicatorParamsUpdate) SaveX ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IndicatorParamsUpdate) SetIndicator ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) SetIndicator(i *Indicator) *IndicatorParamsUpdate
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*IndicatorParamsUpdate) SetIndicatorID ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) SetIndicatorID(id int) *IndicatorParamsUpdate
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*IndicatorParamsUpdate) SetValueMapping ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) SetValueMapping(m map[string]string) *IndicatorParamsUpdate
SetValueMapping sets the "value_mapping" field.
func (*IndicatorParamsUpdate) SetValueParams ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsUpdate
SetValueParams sets the "value_params" field.
func (*IndicatorParamsUpdate) Where ¶ added in v0.0.8
func (ipu *IndicatorParamsUpdate) Where(ps ...predicate.IndicatorParams) *IndicatorParamsUpdate
Where adds a new predicate for the IndicatorParamsUpdate builder.
type IndicatorParamsUpdateOne ¶ added in v0.0.8
type IndicatorParamsUpdateOne struct {
// contains filtered or unexported fields
}
IndicatorParamsUpdateOne is the builder for updating a single IndicatorParams entity.
func (*IndicatorParamsUpdateOne) ClearIndicator ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) ClearIndicator() *IndicatorParamsUpdateOne
ClearIndicator clears the "indicator" edge to the Indicator entity.
func (*IndicatorParamsUpdateOne) ClearValueMapping ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) ClearValueMapping() *IndicatorParamsUpdateOne
ClearValueMapping clears the value of the "value_mapping" field.
func (*IndicatorParamsUpdateOne) Exec ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IndicatorParamsUpdateOne) ExecX ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorParamsUpdateOne) Mutation ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) Mutation() *IndicatorParamsMutation
Mutation returns the IndicatorParamsMutation object of the builder.
func (*IndicatorParamsUpdateOne) Save ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) Save(ctx context.Context) (*IndicatorParams, error)
Save executes the query and returns the updated IndicatorParams entity.
func (*IndicatorParamsUpdateOne) SaveX ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) SaveX(ctx context.Context) *IndicatorParams
SaveX is like Save, but panics if an error occurs.
func (*IndicatorParamsUpdateOne) SetIndicator ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) SetIndicator(i *Indicator) *IndicatorParamsUpdateOne
SetIndicator sets the "indicator" edge to the Indicator entity.
func (*IndicatorParamsUpdateOne) SetIndicatorID ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) SetIndicatorID(id int) *IndicatorParamsUpdateOne
SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.
func (*IndicatorParamsUpdateOne) SetValueMapping ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) SetValueMapping(m map[string]string) *IndicatorParamsUpdateOne
SetValueMapping sets the "value_mapping" field.
func (*IndicatorParamsUpdateOne) SetValueParams ¶ added in v0.0.8
func (ipuo *IndicatorParamsUpdateOne) SetValueParams(dvp domain.IndicatorValueParams) *IndicatorParamsUpdateOne
SetValueParams sets the "value_params" field.
type IndicatorQuery ¶
type IndicatorQuery struct {
// contains filtered or unexported fields
}
IndicatorQuery is the builder for querying Indicator entities.
func (*IndicatorQuery) All ¶
func (iq *IndicatorQuery) All(ctx context.Context) ([]*Indicator, error)
All executes the query and returns a list of Indicators.
func (*IndicatorQuery) AllX ¶
func (iq *IndicatorQuery) AllX(ctx context.Context) []*Indicator
AllX is like All, but panics if an error occurs.
func (*IndicatorQuery) Clone ¶
func (iq *IndicatorQuery) Clone() *IndicatorQuery
Clone returns a duplicate of the IndicatorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IndicatorQuery) Count ¶
func (iq *IndicatorQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IndicatorQuery) CountX ¶
func (iq *IndicatorQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IndicatorQuery) Exist ¶
func (iq *IndicatorQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IndicatorQuery) ExistX ¶
func (iq *IndicatorQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IndicatorQuery) First ¶
func (iq *IndicatorQuery) First(ctx context.Context) (*Indicator, error)
First returns the first Indicator entity from the query. Returns a *NotFoundError when no Indicator was found.
func (*IndicatorQuery) FirstID ¶
func (iq *IndicatorQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Indicator ID from the query. Returns a *NotFoundError when no Indicator ID was found.
func (*IndicatorQuery) FirstIDX ¶
func (iq *IndicatorQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IndicatorQuery) FirstX ¶
func (iq *IndicatorQuery) FirstX(ctx context.Context) *Indicator
FirstX is like First, but panics if an error occurs.
func (*IndicatorQuery) GroupBy ¶
func (iq *IndicatorQuery) GroupBy(field string, fields ...string) *IndicatorGroupBy
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.Indicator.Query().
GroupBy(indicator.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*IndicatorQuery) IDs ¶
func (iq *IndicatorQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Indicator IDs.
func (*IndicatorQuery) IDsX ¶
func (iq *IndicatorQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IndicatorQuery) Limit ¶
func (iq *IndicatorQuery) Limit(limit int) *IndicatorQuery
Limit adds a limit step to the query.
func (*IndicatorQuery) Offset ¶
func (iq *IndicatorQuery) Offset(offset int) *IndicatorQuery
Offset adds an offset step to the query.
func (*IndicatorQuery) Only ¶
func (iq *IndicatorQuery) Only(ctx context.Context) (*Indicator, error)
Only returns a single Indicator entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Indicator entity is not found. Returns a *NotFoundError when no Indicator entities are found.
func (*IndicatorQuery) OnlyID ¶
func (iq *IndicatorQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Indicator ID in the query. Returns a *NotSingularError when exactly one Indicator ID is not found. Returns a *NotFoundError when no entities are found.
func (*IndicatorQuery) OnlyIDX ¶
func (iq *IndicatorQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IndicatorQuery) OnlyX ¶
func (iq *IndicatorQuery) OnlyX(ctx context.Context) *Indicator
OnlyX is like Only, but panics if an error occurs.
func (*IndicatorQuery) Order ¶
func (iq *IndicatorQuery) Order(o ...OrderFunc) *IndicatorQuery
Order adds an order step to the query.
func (*IndicatorQuery) QueryAuthor ¶
func (iq *IndicatorQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*IndicatorQuery) QueryDatasets ¶
func (iq *IndicatorQuery) QueryDatasets() *DatasetQuery
QueryDatasets chains the current query on the "datasets" edge.
func (*IndicatorQuery) QueryIndicatorParams ¶ added in v0.0.8
func (iq *IndicatorQuery) QueryIndicatorParams() *IndicatorParamsQuery
QueryIndicatorParams chains the current query on the "indicator_params" edge.
func (*IndicatorQuery) QueryScale ¶
func (iq *IndicatorQuery) QueryScale() *ScaleQuery
QueryScale chains the current query on the "scale" edge.
func (*IndicatorQuery) Select ¶
func (iq *IndicatorQuery) Select(field string, fields ...string) *IndicatorSelect
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.Indicator.Query().
Select(indicator.FieldCreateTime).
Scan(ctx, &v)
func (*IndicatorQuery) Where ¶
func (iq *IndicatorQuery) Where(ps ...predicate.Indicator) *IndicatorQuery
Where adds a new predicate for the IndicatorQuery builder.
func (*IndicatorQuery) WithAuthor ¶
func (iq *IndicatorQuery) WithAuthor(opts ...func(*UserQuery)) *IndicatorQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*IndicatorQuery) WithDatasets ¶
func (iq *IndicatorQuery) WithDatasets(opts ...func(*DatasetQuery)) *IndicatorQuery
WithDatasets tells the query-builder to eager-load the nodes that are connected to the "datasets" edge. The optional arguments are used to configure the query builder of the edge.
func (*IndicatorQuery) WithIndicatorParams ¶ added in v0.0.8
func (iq *IndicatorQuery) WithIndicatorParams(opts ...func(*IndicatorParamsQuery)) *IndicatorQuery
WithIndicatorParams tells the query-builder to eager-load the nodes that are connected to the "indicator_params" edge. The optional arguments are used to configure the query builder of the edge.
func (*IndicatorQuery) WithScale ¶
func (iq *IndicatorQuery) WithScale(opts ...func(*ScaleQuery)) *IndicatorQuery
WithScale tells the query-builder to eager-load the nodes that are connected to the "scale" edge. The optional arguments are used to configure the query builder of the edge.
type IndicatorSelect ¶
type IndicatorSelect struct {
*IndicatorQuery
// contains filtered or unexported fields
}
IndicatorSelect is the builder for selecting fields of Indicator entities.
func (*IndicatorSelect) Bool ¶
func (is *IndicatorSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) BoolX ¶
func (is *IndicatorSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*IndicatorSelect) Bools ¶
func (is *IndicatorSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) BoolsX ¶
func (is *IndicatorSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*IndicatorSelect) Float64 ¶
func (is *IndicatorSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) Float64X ¶
func (is *IndicatorSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*IndicatorSelect) Float64s ¶
func (is *IndicatorSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) Float64sX ¶
func (is *IndicatorSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*IndicatorSelect) Int ¶
func (is *IndicatorSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) IntX ¶
func (is *IndicatorSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*IndicatorSelect) Ints ¶
func (is *IndicatorSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) IntsX ¶
func (is *IndicatorSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*IndicatorSelect) Scan ¶
func (is *IndicatorSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*IndicatorSelect) ScanX ¶
func (is *IndicatorSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*IndicatorSelect) String ¶
func (is *IndicatorSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*IndicatorSelect) StringX ¶
func (is *IndicatorSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type IndicatorUpdate ¶
type IndicatorUpdate struct {
// contains filtered or unexported fields
}
IndicatorUpdate is the builder for updating Indicator entities.
func (*IndicatorUpdate) AddDatasetIDs ¶
func (iu *IndicatorUpdate) AddDatasetIDs(ids ...int) *IndicatorUpdate
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*IndicatorUpdate) AddDatasets ¶
func (iu *IndicatorUpdate) AddDatasets(d ...*Dataset) *IndicatorUpdate
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*IndicatorUpdate) ClearAuthor ¶
func (iu *IndicatorUpdate) ClearAuthor() *IndicatorUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*IndicatorUpdate) ClearDatasets ¶
func (iu *IndicatorUpdate) ClearDatasets() *IndicatorUpdate
ClearDatasets clears all "datasets" edges to the Dataset entity.
func (*IndicatorUpdate) ClearDescription ¶
func (iu *IndicatorUpdate) ClearDescription() *IndicatorUpdate
ClearDescription clears the value of the "description" field.
func (*IndicatorUpdate) ClearIndicatorParams ¶ added in v0.0.8
func (iu *IndicatorUpdate) ClearIndicatorParams() *IndicatorUpdate
ClearIndicatorParams clears the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorUpdate) ClearScale ¶
func (iu *IndicatorUpdate) ClearScale() *IndicatorUpdate
ClearScale clears the "scale" edge to the Scale entity.
func (*IndicatorUpdate) Exec ¶
func (iu *IndicatorUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IndicatorUpdate) ExecX ¶
func (iu *IndicatorUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorUpdate) Mutation ¶
func (iu *IndicatorUpdate) Mutation() *IndicatorMutation
Mutation returns the IndicatorMutation object of the builder.
func (*IndicatorUpdate) RemoveDatasetIDs ¶
func (iu *IndicatorUpdate) RemoveDatasetIDs(ids ...int) *IndicatorUpdate
RemoveDatasetIDs removes the "datasets" edge to Dataset entities by IDs.
func (*IndicatorUpdate) RemoveDatasets ¶
func (iu *IndicatorUpdate) RemoveDatasets(d ...*Dataset) *IndicatorUpdate
RemoveDatasets removes "datasets" edges to Dataset entities.
func (*IndicatorUpdate) Save ¶
func (iu *IndicatorUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IndicatorUpdate) SaveX ¶
func (iu *IndicatorUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IndicatorUpdate) SetActive ¶
func (iu *IndicatorUpdate) SetActive(b bool) *IndicatorUpdate
SetActive sets the "active" field.
func (*IndicatorUpdate) SetAuthor ¶
func (iu *IndicatorUpdate) SetAuthor(u *User) *IndicatorUpdate
SetAuthor sets the "author" edge to the User entity.
func (*IndicatorUpdate) SetAuthorID ¶
func (iu *IndicatorUpdate) SetAuthorID(id int) *IndicatorUpdate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*IndicatorUpdate) SetDescription ¶
func (iu *IndicatorUpdate) SetDescription(s string) *IndicatorUpdate
SetDescription sets the "description" field.
func (*IndicatorUpdate) SetExternal ¶
func (iu *IndicatorUpdate) SetExternal(b bool) *IndicatorUpdate
SetExternal sets the "external" field.
func (*IndicatorUpdate) SetIndicatorParams ¶ added in v0.0.8
func (iu *IndicatorUpdate) SetIndicatorParams(i *IndicatorParams) *IndicatorUpdate
SetIndicatorParams sets the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorUpdate) SetIndicatorParamsID ¶ added in v0.0.8
func (iu *IndicatorUpdate) SetIndicatorParamsID(id int) *IndicatorUpdate
SetIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID.
func (*IndicatorUpdate) SetNillableActive ¶
func (iu *IndicatorUpdate) SetNillableActive(b *bool) *IndicatorUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*IndicatorUpdate) SetNillableAuthorID ¶
func (iu *IndicatorUpdate) SetNillableAuthorID(id *int) *IndicatorUpdate
SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.
func (*IndicatorUpdate) SetNillableDescription ¶
func (iu *IndicatorUpdate) SetNillableDescription(s *string) *IndicatorUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*IndicatorUpdate) SetNillableExternal ¶
func (iu *IndicatorUpdate) SetNillableExternal(b *bool) *IndicatorUpdate
SetNillableExternal sets the "external" field if the given value is not nil.
func (*IndicatorUpdate) SetNillableIndicatorParamsID ¶ added in v0.0.8
func (iu *IndicatorUpdate) SetNillableIndicatorParamsID(id *int) *IndicatorUpdate
SetNillableIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID if the given value is not nil.
func (*IndicatorUpdate) SetScale ¶
func (iu *IndicatorUpdate) SetScale(s *Scale) *IndicatorUpdate
SetScale sets the "scale" edge to the Scale entity.
func (*IndicatorUpdate) SetScaleID ¶
func (iu *IndicatorUpdate) SetScaleID(id int) *IndicatorUpdate
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*IndicatorUpdate) SetTitle ¶
func (iu *IndicatorUpdate) SetTitle(s string) *IndicatorUpdate
SetTitle sets the "title" field.
func (*IndicatorUpdate) Where ¶
func (iu *IndicatorUpdate) Where(ps ...predicate.Indicator) *IndicatorUpdate
Where adds a new predicate for the IndicatorUpdate builder.
type IndicatorUpdateOne ¶
type IndicatorUpdateOne struct {
// contains filtered or unexported fields
}
IndicatorUpdateOne is the builder for updating a single Indicator entity.
func (*IndicatorUpdateOne) AddDatasetIDs ¶
func (iuo *IndicatorUpdateOne) AddDatasetIDs(ids ...int) *IndicatorUpdateOne
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*IndicatorUpdateOne) AddDatasets ¶
func (iuo *IndicatorUpdateOne) AddDatasets(d ...*Dataset) *IndicatorUpdateOne
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*IndicatorUpdateOne) ClearAuthor ¶
func (iuo *IndicatorUpdateOne) ClearAuthor() *IndicatorUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*IndicatorUpdateOne) ClearDatasets ¶
func (iuo *IndicatorUpdateOne) ClearDatasets() *IndicatorUpdateOne
ClearDatasets clears all "datasets" edges to the Dataset entity.
func (*IndicatorUpdateOne) ClearDescription ¶
func (iuo *IndicatorUpdateOne) ClearDescription() *IndicatorUpdateOne
ClearDescription clears the value of the "description" field.
func (*IndicatorUpdateOne) ClearIndicatorParams ¶ added in v0.0.8
func (iuo *IndicatorUpdateOne) ClearIndicatorParams() *IndicatorUpdateOne
ClearIndicatorParams clears the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorUpdateOne) ClearScale ¶
func (iuo *IndicatorUpdateOne) ClearScale() *IndicatorUpdateOne
ClearScale clears the "scale" edge to the Scale entity.
func (*IndicatorUpdateOne) Exec ¶
func (iuo *IndicatorUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IndicatorUpdateOne) ExecX ¶
func (iuo *IndicatorUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IndicatorUpdateOne) Mutation ¶
func (iuo *IndicatorUpdateOne) Mutation() *IndicatorMutation
Mutation returns the IndicatorMutation object of the builder.
func (*IndicatorUpdateOne) RemoveDatasetIDs ¶
func (iuo *IndicatorUpdateOne) RemoveDatasetIDs(ids ...int) *IndicatorUpdateOne
RemoveDatasetIDs removes the "datasets" edge to Dataset entities by IDs.
func (*IndicatorUpdateOne) RemoveDatasets ¶
func (iuo *IndicatorUpdateOne) RemoveDatasets(d ...*Dataset) *IndicatorUpdateOne
RemoveDatasets removes "datasets" edges to Dataset entities.
func (*IndicatorUpdateOne) Save ¶
func (iuo *IndicatorUpdateOne) Save(ctx context.Context) (*Indicator, error)
Save executes the query and returns the updated Indicator entity.
func (*IndicatorUpdateOne) SaveX ¶
func (iuo *IndicatorUpdateOne) SaveX(ctx context.Context) *Indicator
SaveX is like Save, but panics if an error occurs.
func (*IndicatorUpdateOne) SetActive ¶
func (iuo *IndicatorUpdateOne) SetActive(b bool) *IndicatorUpdateOne
SetActive sets the "active" field.
func (*IndicatorUpdateOne) SetAuthor ¶
func (iuo *IndicatorUpdateOne) SetAuthor(u *User) *IndicatorUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*IndicatorUpdateOne) SetAuthorID ¶
func (iuo *IndicatorUpdateOne) SetAuthorID(id int) *IndicatorUpdateOne
SetAuthorID sets the "author" edge to the User entity by ID.
func (*IndicatorUpdateOne) SetDescription ¶
func (iuo *IndicatorUpdateOne) SetDescription(s string) *IndicatorUpdateOne
SetDescription sets the "description" field.
func (*IndicatorUpdateOne) SetExternal ¶
func (iuo *IndicatorUpdateOne) SetExternal(b bool) *IndicatorUpdateOne
SetExternal sets the "external" field.
func (*IndicatorUpdateOne) SetIndicatorParams ¶ added in v0.0.8
func (iuo *IndicatorUpdateOne) SetIndicatorParams(i *IndicatorParams) *IndicatorUpdateOne
SetIndicatorParams sets the "indicator_params" edge to the IndicatorParams entity.
func (*IndicatorUpdateOne) SetIndicatorParamsID ¶ added in v0.0.8
func (iuo *IndicatorUpdateOne) SetIndicatorParamsID(id int) *IndicatorUpdateOne
SetIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID.
func (*IndicatorUpdateOne) SetNillableActive ¶
func (iuo *IndicatorUpdateOne) SetNillableActive(b *bool) *IndicatorUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*IndicatorUpdateOne) SetNillableAuthorID ¶
func (iuo *IndicatorUpdateOne) SetNillableAuthorID(id *int) *IndicatorUpdateOne
SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.
func (*IndicatorUpdateOne) SetNillableDescription ¶
func (iuo *IndicatorUpdateOne) SetNillableDescription(s *string) *IndicatorUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*IndicatorUpdateOne) SetNillableExternal ¶
func (iuo *IndicatorUpdateOne) SetNillableExternal(b *bool) *IndicatorUpdateOne
SetNillableExternal sets the "external" field if the given value is not nil.
func (*IndicatorUpdateOne) SetNillableIndicatorParamsID ¶ added in v0.0.8
func (iuo *IndicatorUpdateOne) SetNillableIndicatorParamsID(id *int) *IndicatorUpdateOne
SetNillableIndicatorParamsID sets the "indicator_params" edge to the IndicatorParams entity by ID if the given value is not nil.
func (*IndicatorUpdateOne) SetScale ¶
func (iuo *IndicatorUpdateOne) SetScale(s *Scale) *IndicatorUpdateOne
SetScale sets the "scale" edge to the Scale entity.
func (*IndicatorUpdateOne) SetScaleID ¶
func (iuo *IndicatorUpdateOne) SetScaleID(id int) *IndicatorUpdateOne
SetScaleID sets the "scale" edge to the Scale entity by ID.
func (*IndicatorUpdateOne) SetTitle ¶
func (iuo *IndicatorUpdateOne) SetTitle(s string) *IndicatorUpdateOne
SetTitle sets the "title" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Observation ¶
type Observation struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// Value holds the value of the "value" field.
Value float64 `json:"value,omitempty"`
// Date holds the value of the "date" field.
Date time.Time `json:"date,omitempty"`
// Granularity holds the value of the "granularity" field.
Granularity observation.Granularity `json:"granularity,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ObservationQuery when eager-loading is set.
Edges ObservationEdges `json:"edges"`
// contains filtered or unexported fields
}
Observation is the model entity for the Observation schema.
func (*Observation) QueryDataset ¶
func (o *Observation) QueryDataset() *DatasetQuery
QueryDataset queries the "dataset" edge of the Observation entity.
func (*Observation) String ¶
func (o *Observation) String() string
String implements the fmt.Stringer.
func (*Observation) Unwrap ¶
func (o *Observation) Unwrap() *Observation
Unwrap unwraps the Observation 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 (*Observation) Update ¶
func (o *Observation) Update() *ObservationUpdateOne
Update returns a builder for updating this Observation. Note that you need to call Observation.Unwrap() before calling this method if this Observation was returned from a transaction, and the transaction was committed or rolled back.
type ObservationClient ¶
type ObservationClient struct {
// contains filtered or unexported fields
}
ObservationClient is a client for the Observation schema.
func NewObservationClient ¶
func NewObservationClient(c config) *ObservationClient
NewObservationClient returns a client for the Observation from the given config.
func (*ObservationClient) Create ¶
func (c *ObservationClient) Create() *ObservationCreate
Create returns a create builder for Observation.
func (*ObservationClient) CreateBulk ¶
func (c *ObservationClient) CreateBulk(builders ...*ObservationCreate) *ObservationCreateBulk
CreateBulk returns a builder for creating a bulk of Observation entities.
func (*ObservationClient) Delete ¶
func (c *ObservationClient) Delete() *ObservationDelete
Delete returns a delete builder for Observation.
func (*ObservationClient) DeleteOne ¶
func (c *ObservationClient) DeleteOne(o *Observation) *ObservationDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ObservationClient) DeleteOneID ¶
func (c *ObservationClient) DeleteOneID(id int) *ObservationDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ObservationClient) Get ¶
func (c *ObservationClient) Get(ctx context.Context, id int) (*Observation, error)
Get returns a Observation entity by its id.
func (*ObservationClient) GetX ¶
func (c *ObservationClient) GetX(ctx context.Context, id int) *Observation
GetX is like Get, but panics if an error occurs.
func (*ObservationClient) Hooks ¶
func (c *ObservationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ObservationClient) Query ¶
func (c *ObservationClient) Query() *ObservationQuery
Query returns a query builder for Observation.
func (*ObservationClient) QueryDataset ¶
func (c *ObservationClient) QueryDataset(o *Observation) *DatasetQuery
QueryDataset queries the dataset edge of a Observation.
func (*ObservationClient) Update ¶
func (c *ObservationClient) Update() *ObservationUpdate
Update returns an update builder for Observation.
func (*ObservationClient) UpdateOne ¶
func (c *ObservationClient) UpdateOne(o *Observation) *ObservationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ObservationClient) UpdateOneID ¶
func (c *ObservationClient) UpdateOneID(id int) *ObservationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ObservationClient) Use ¶
func (c *ObservationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `observation.Hooks(f(g(h())))`.
type ObservationCreate ¶
type ObservationCreate struct {
// contains filtered or unexported fields
}
ObservationCreate is the builder for creating a Observation entity.
func (*ObservationCreate) Mutation ¶
func (oc *ObservationCreate) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationCreate) Save ¶
func (oc *ObservationCreate) Save(ctx context.Context) (*Observation, error)
Save creates the Observation in the database.
func (*ObservationCreate) SaveX ¶
func (oc *ObservationCreate) SaveX(ctx context.Context) *Observation
SaveX calls Save and panics if Save returns an error.
func (*ObservationCreate) SetCreateTime ¶
func (oc *ObservationCreate) SetCreateTime(t time.Time) *ObservationCreate
SetCreateTime sets the "create_time" field.
func (*ObservationCreate) SetDataset ¶
func (oc *ObservationCreate) SetDataset(d *Dataset) *ObservationCreate
SetDataset sets the "dataset" edge to the Dataset entity.
func (*ObservationCreate) SetDatasetID ¶
func (oc *ObservationCreate) SetDatasetID(id int) *ObservationCreate
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*ObservationCreate) SetDate ¶
func (oc *ObservationCreate) SetDate(t time.Time) *ObservationCreate
SetDate sets the "date" field.
func (*ObservationCreate) SetGranularity ¶
func (oc *ObservationCreate) SetGranularity(o observation.Granularity) *ObservationCreate
SetGranularity sets the "granularity" field.
func (*ObservationCreate) SetNillableCreateTime ¶
func (oc *ObservationCreate) SetNillableCreateTime(t *time.Time) *ObservationCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ObservationCreate) SetNillableGranularity ¶
func (oc *ObservationCreate) SetNillableGranularity(o *observation.Granularity) *ObservationCreate
SetNillableGranularity sets the "granularity" field if the given value is not nil.
func (*ObservationCreate) SetNillableUpdateTime ¶
func (oc *ObservationCreate) SetNillableUpdateTime(t *time.Time) *ObservationCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ObservationCreate) SetUpdateTime ¶
func (oc *ObservationCreate) SetUpdateTime(t time.Time) *ObservationCreate
SetUpdateTime sets the "update_time" field.
func (*ObservationCreate) SetValue ¶
func (oc *ObservationCreate) SetValue(f float64) *ObservationCreate
SetValue sets the "value" field.
type ObservationCreateBulk ¶
type ObservationCreateBulk struct {
// contains filtered or unexported fields
}
ObservationCreateBulk is the builder for creating many Observation entities in bulk.
func (*ObservationCreateBulk) Save ¶
func (ocb *ObservationCreateBulk) Save(ctx context.Context) ([]*Observation, error)
Save creates the Observation entities in the database.
func (*ObservationCreateBulk) SaveX ¶
func (ocb *ObservationCreateBulk) SaveX(ctx context.Context) []*Observation
SaveX is like Save, but panics if an error occurs.
type ObservationDelete ¶
type ObservationDelete struct {
// contains filtered or unexported fields
}
ObservationDelete is the builder for deleting a Observation entity.
func (*ObservationDelete) Exec ¶
func (od *ObservationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ObservationDelete) ExecX ¶
func (od *ObservationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ObservationDelete) Where ¶
func (od *ObservationDelete) Where(ps ...predicate.Observation) *ObservationDelete
Where adds a new predicate to the ObservationDelete builder.
type ObservationDeleteOne ¶
type ObservationDeleteOne struct {
// contains filtered or unexported fields
}
ObservationDeleteOne is the builder for deleting a single Observation entity.
func (*ObservationDeleteOne) Exec ¶
func (odo *ObservationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ObservationDeleteOne) ExecX ¶
func (odo *ObservationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ObservationEdges ¶
type ObservationEdges struct {
// Dataset holds the value of the dataset edge.
Dataset *Dataset `json:"dataset,omitempty"`
// contains filtered or unexported fields
}
ObservationEdges holds the relations/edges for other nodes in the graph.
func (ObservationEdges) DatasetOrErr ¶
func (e ObservationEdges) DatasetOrErr() (*Dataset, error)
DatasetOrErr returns the Dataset value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ObservationGroupBy ¶
type ObservationGroupBy struct {
// contains filtered or unexported fields
}
ObservationGroupBy is the group-by builder for Observation entities.
func (*ObservationGroupBy) Aggregate ¶
func (ogb *ObservationGroupBy) Aggregate(fns ...AggregateFunc) *ObservationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ObservationGroupBy) Bool ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) BoolX ¶
func (ogb *ObservationGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ObservationGroupBy) Bools ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) BoolsX ¶
func (ogb *ObservationGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ObservationGroupBy) Float64 ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) Float64X ¶
func (ogb *ObservationGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ObservationGroupBy) Float64s ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) Float64sX ¶
func (ogb *ObservationGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ObservationGroupBy) Int ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) IntX ¶
func (ogb *ObservationGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ObservationGroupBy) Ints ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) IntsX ¶
func (ogb *ObservationGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ObservationGroupBy) Scan ¶
func (ogb *ObservationGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ObservationGroupBy) ScanX ¶
func (ogb *ObservationGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ObservationGroupBy) String ¶
func (ogb *ObservationGroupBy) 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 (*ObservationGroupBy) StringX ¶
func (ogb *ObservationGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ObservationMutation ¶
type ObservationMutation struct {
// contains filtered or unexported fields
}
ObservationMutation represents an operation that mutates the Observation nodes in the graph.
func (*ObservationMutation) AddField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) AddValue ¶
func (m *ObservationMutation) AddValue(f float64)
AddValue adds f to the "value" field.
func (*ObservationMutation) AddedEdges ¶
func (m *ObservationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ObservationMutation) AddedField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) AddedFields ¶
func (m *ObservationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ObservationMutation) AddedIDs ¶
func (m *ObservationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ObservationMutation) AddedValue ¶
func (m *ObservationMutation) AddedValue() (r float64, exists bool)
AddedValue returns the value that was added to the "value" field in this mutation.
func (*ObservationMutation) ClearDataset ¶
func (m *ObservationMutation) ClearDataset()
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*ObservationMutation) ClearEdge ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ClearField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ClearedEdges ¶
func (m *ObservationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ObservationMutation) ClearedFields ¶
func (m *ObservationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ObservationMutation) Client ¶
func (m ObservationMutation) 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 (*ObservationMutation) CreateTime ¶
func (m *ObservationMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ObservationMutation) DatasetCleared ¶
func (m *ObservationMutation) DatasetCleared() bool
DatasetCleared returns if the "dataset" edge to the Dataset entity was cleared.
func (*ObservationMutation) DatasetID ¶
func (m *ObservationMutation) DatasetID() (id int, exists bool)
DatasetID returns the "dataset" edge ID in the mutation.
func (*ObservationMutation) DatasetIDs ¶
func (m *ObservationMutation) DatasetIDs() (ids []int)
DatasetIDs returns the "dataset" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DatasetID instead. It exists only for internal usage by the builders.
func (*ObservationMutation) Date ¶
func (m *ObservationMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*ObservationMutation) EdgeCleared ¶
func (m *ObservationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ObservationMutation) Field ¶
func (m *ObservationMutation) 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 (*ObservationMutation) FieldCleared ¶
func (m *ObservationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ObservationMutation) Fields ¶
func (m *ObservationMutation) 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 (*ObservationMutation) Granularity ¶
func (m *ObservationMutation) Granularity() (r observation.Granularity, exists bool)
Granularity returns the value of the "granularity" field in the mutation.
func (*ObservationMutation) ID ¶
func (m *ObservationMutation) 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 (*ObservationMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldDate ¶
OldDate returns the old "date" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) 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 (*ObservationMutation) OldGranularity ¶
func (m *ObservationMutation) OldGranularity(ctx context.Context) (v observation.Granularity, err error)
OldGranularity returns the old "granularity" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldValue ¶
func (m *ObservationMutation) OldValue(ctx context.Context) (v float64, err error)
OldValue returns the old "value" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) Op ¶
func (m *ObservationMutation) Op() Op
Op returns the operation name.
func (*ObservationMutation) RemovedEdges ¶
func (m *ObservationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ObservationMutation) RemovedIDs ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetCreateTime ¶
func (m *ObservationMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ObservationMutation) ResetDataset ¶
func (m *ObservationMutation) ResetDataset()
ResetDataset resets all changes to the "dataset" edge.
func (*ObservationMutation) ResetDate ¶
func (m *ObservationMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*ObservationMutation) ResetEdge ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetGranularity ¶
func (m *ObservationMutation) ResetGranularity()
ResetGranularity resets all changes to the "granularity" field.
func (*ObservationMutation) ResetUpdateTime ¶
func (m *ObservationMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ObservationMutation) ResetValue ¶
func (m *ObservationMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ObservationMutation) SetCreateTime ¶
func (m *ObservationMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ObservationMutation) SetDatasetID ¶
func (m *ObservationMutation) SetDatasetID(id int)
SetDatasetID sets the "dataset" edge to the Dataset entity by id.
func (*ObservationMutation) SetDate ¶
func (m *ObservationMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*ObservationMutation) SetField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) SetGranularity ¶
func (m *ObservationMutation) SetGranularity(o observation.Granularity)
SetGranularity sets the "granularity" field.
func (*ObservationMutation) SetUpdateTime ¶
func (m *ObservationMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ObservationMutation) SetValue ¶
func (m *ObservationMutation) SetValue(f float64)
SetValue sets the "value" field.
func (ObservationMutation) Tx ¶
func (m ObservationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ObservationMutation) Type ¶
func (m *ObservationMutation) Type() string
Type returns the node type of this mutation (Observation).
func (*ObservationMutation) UpdateTime ¶
func (m *ObservationMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ObservationMutation) Value ¶
func (m *ObservationMutation) Value() (r float64, exists bool)
Value returns the value of the "value" field in the mutation.
type ObservationQuery ¶
type ObservationQuery struct {
// contains filtered or unexported fields
}
ObservationQuery is the builder for querying Observation entities.
func (*ObservationQuery) All ¶
func (oq *ObservationQuery) All(ctx context.Context) ([]*Observation, error)
All executes the query and returns a list of Observations.
func (*ObservationQuery) AllX ¶
func (oq *ObservationQuery) AllX(ctx context.Context) []*Observation
AllX is like All, but panics if an error occurs.
func (*ObservationQuery) Clone ¶
func (oq *ObservationQuery) Clone() *ObservationQuery
Clone returns a duplicate of the ObservationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ObservationQuery) Count ¶
func (oq *ObservationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ObservationQuery) CountX ¶
func (oq *ObservationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ObservationQuery) Exist ¶
func (oq *ObservationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ObservationQuery) ExistX ¶
func (oq *ObservationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ObservationQuery) First ¶
func (oq *ObservationQuery) First(ctx context.Context) (*Observation, error)
First returns the first Observation entity from the query. Returns a *NotFoundError when no Observation was found.
func (*ObservationQuery) FirstID ¶
func (oq *ObservationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Observation ID from the query. Returns a *NotFoundError when no Observation ID was found.
func (*ObservationQuery) FirstIDX ¶
func (oq *ObservationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ObservationQuery) FirstX ¶
func (oq *ObservationQuery) FirstX(ctx context.Context) *Observation
FirstX is like First, but panics if an error occurs.
func (*ObservationQuery) GroupBy ¶
func (oq *ObservationQuery) GroupBy(field string, fields ...string) *ObservationGroupBy
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.Observation.Query().
GroupBy(observation.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ObservationQuery) IDs ¶
func (oq *ObservationQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Observation IDs.
func (*ObservationQuery) IDsX ¶
func (oq *ObservationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ObservationQuery) Limit ¶
func (oq *ObservationQuery) Limit(limit int) *ObservationQuery
Limit adds a limit step to the query.
func (*ObservationQuery) Offset ¶
func (oq *ObservationQuery) Offset(offset int) *ObservationQuery
Offset adds an offset step to the query.
func (*ObservationQuery) Only ¶
func (oq *ObservationQuery) Only(ctx context.Context) (*Observation, error)
Only returns a single Observation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Observation entity is not found. Returns a *NotFoundError when no Observation entities are found.
func (*ObservationQuery) OnlyID ¶
func (oq *ObservationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Observation ID in the query. Returns a *NotSingularError when exactly one Observation ID is not found. Returns a *NotFoundError when no entities are found.
func (*ObservationQuery) OnlyIDX ¶
func (oq *ObservationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ObservationQuery) OnlyX ¶
func (oq *ObservationQuery) OnlyX(ctx context.Context) *Observation
OnlyX is like Only, but panics if an error occurs.
func (*ObservationQuery) Order ¶
func (oq *ObservationQuery) Order(o ...OrderFunc) *ObservationQuery
Order adds an order step to the query.
func (*ObservationQuery) QueryDataset ¶
func (oq *ObservationQuery) QueryDataset() *DatasetQuery
QueryDataset chains the current query on the "dataset" edge.
func (*ObservationQuery) Select ¶
func (oq *ObservationQuery) Select(field string, fields ...string) *ObservationSelect
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.Observation.Query().
Select(observation.FieldCreateTime).
Scan(ctx, &v)
func (*ObservationQuery) Where ¶
func (oq *ObservationQuery) Where(ps ...predicate.Observation) *ObservationQuery
Where adds a new predicate for the ObservationQuery builder.
func (*ObservationQuery) WithDataset ¶
func (oq *ObservationQuery) WithDataset(opts ...func(*DatasetQuery)) *ObservationQuery
WithDataset tells the query-builder to eager-load the nodes that are connected to the "dataset" edge. The optional arguments are used to configure the query builder of the edge.
type ObservationSelect ¶
type ObservationSelect struct {
*ObservationQuery
// contains filtered or unexported fields
}
ObservationSelect is the builder for selecting fields of Observation entities.
func (*ObservationSelect) Bool ¶
func (os *ObservationSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) BoolX ¶
func (os *ObservationSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ObservationSelect) Bools ¶
func (os *ObservationSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) BoolsX ¶
func (os *ObservationSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ObservationSelect) Float64 ¶
func (os *ObservationSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Float64X ¶
func (os *ObservationSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ObservationSelect) Float64s ¶
func (os *ObservationSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Float64sX ¶
func (os *ObservationSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ObservationSelect) Int ¶
func (os *ObservationSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) IntX ¶
func (os *ObservationSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ObservationSelect) Ints ¶
func (os *ObservationSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) IntsX ¶
func (os *ObservationSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ObservationSelect) Scan ¶
func (os *ObservationSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ObservationSelect) ScanX ¶
func (os *ObservationSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ObservationSelect) String ¶
func (os *ObservationSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) StringX ¶
func (os *ObservationSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ObservationUpdate ¶
type ObservationUpdate struct {
// contains filtered or unexported fields
}
ObservationUpdate is the builder for updating Observation entities.
func (*ObservationUpdate) AddValue ¶
func (ou *ObservationUpdate) AddValue(f float64) *ObservationUpdate
AddValue adds f to the "value" field.
func (*ObservationUpdate) ClearDataset ¶
func (ou *ObservationUpdate) ClearDataset() *ObservationUpdate
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*ObservationUpdate) Exec ¶
func (ou *ObservationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ObservationUpdate) ExecX ¶
func (ou *ObservationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationUpdate) Mutation ¶
func (ou *ObservationUpdate) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationUpdate) Save ¶
func (ou *ObservationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ObservationUpdate) SaveX ¶
func (ou *ObservationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ObservationUpdate) SetDataset ¶
func (ou *ObservationUpdate) SetDataset(d *Dataset) *ObservationUpdate
SetDataset sets the "dataset" edge to the Dataset entity.
func (*ObservationUpdate) SetDatasetID ¶
func (ou *ObservationUpdate) SetDatasetID(id int) *ObservationUpdate
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*ObservationUpdate) SetDate ¶
func (ou *ObservationUpdate) SetDate(t time.Time) *ObservationUpdate
SetDate sets the "date" field.
func (*ObservationUpdate) SetValue ¶
func (ou *ObservationUpdate) SetValue(f float64) *ObservationUpdate
SetValue sets the "value" field.
func (*ObservationUpdate) Where ¶
func (ou *ObservationUpdate) Where(ps ...predicate.Observation) *ObservationUpdate
Where adds a new predicate for the ObservationUpdate builder.
type ObservationUpdateOne ¶
type ObservationUpdateOne struct {
// contains filtered or unexported fields
}
ObservationUpdateOne is the builder for updating a single Observation entity.
func (*ObservationUpdateOne) AddValue ¶
func (ouo *ObservationUpdateOne) AddValue(f float64) *ObservationUpdateOne
AddValue adds f to the "value" field.
func (*ObservationUpdateOne) ClearDataset ¶
func (ouo *ObservationUpdateOne) ClearDataset() *ObservationUpdateOne
ClearDataset clears the "dataset" edge to the Dataset entity.
func (*ObservationUpdateOne) Exec ¶
func (ouo *ObservationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ObservationUpdateOne) ExecX ¶
func (ouo *ObservationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationUpdateOne) Mutation ¶
func (ouo *ObservationUpdateOne) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationUpdateOne) Save ¶
func (ouo *ObservationUpdateOne) Save(ctx context.Context) (*Observation, error)
Save executes the query and returns the updated Observation entity.
func (*ObservationUpdateOne) SaveX ¶
func (ouo *ObservationUpdateOne) SaveX(ctx context.Context) *Observation
SaveX is like Save, but panics if an error occurs.
func (*ObservationUpdateOne) SetDataset ¶
func (ouo *ObservationUpdateOne) SetDataset(d *Dataset) *ObservationUpdateOne
SetDataset sets the "dataset" edge to the Dataset entity.
func (*ObservationUpdateOne) SetDatasetID ¶
func (ouo *ObservationUpdateOne) SetDatasetID(id int) *ObservationUpdateOne
SetDatasetID sets the "dataset" edge to the Dataset entity by ID.
func (*ObservationUpdateOne) SetDate ¶
func (ouo *ObservationUpdateOne) SetDate(t time.Time) *ObservationUpdateOne
SetDate sets the "date" field.
func (*ObservationUpdateOne) SetValue ¶
func (ouo *ObservationUpdateOne) SetValue(f float64) *ObservationUpdateOne
SetValue sets the "value" field.
type Observations ¶
type Observations []*Observation
Observations is a parsable slice of Observation.
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 Scale ¶
type Scale struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type string `json:"type,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ScaleQuery when eager-loading is set.
Edges ScaleEdges `json:"edges"`
// contains filtered or unexported fields
}
Scale is the model entity for the Scale schema.
func (*Scale) QueryIndicators ¶
func (s *Scale) QueryIndicators() *IndicatorQuery
QueryIndicators queries the "indicators" edge of the Scale entity.
func (*Scale) Unwrap ¶
Unwrap unwraps the Scale 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 (*Scale) Update ¶
func (s *Scale) Update() *ScaleUpdateOne
Update returns a builder for updating this Scale. Note that you need to call Scale.Unwrap() before calling this method if this Scale was returned from a transaction, and the transaction was committed or rolled back.
type ScaleClient ¶
type ScaleClient struct {
// contains filtered or unexported fields
}
ScaleClient is a client for the Scale schema.
func NewScaleClient ¶
func NewScaleClient(c config) *ScaleClient
NewScaleClient returns a client for the Scale from the given config.
func (*ScaleClient) Create ¶
func (c *ScaleClient) Create() *ScaleCreate
Create returns a create builder for Scale.
func (*ScaleClient) CreateBulk ¶
func (c *ScaleClient) CreateBulk(builders ...*ScaleCreate) *ScaleCreateBulk
CreateBulk returns a builder for creating a bulk of Scale entities.
func (*ScaleClient) Delete ¶
func (c *ScaleClient) Delete() *ScaleDelete
Delete returns a delete builder for Scale.
func (*ScaleClient) DeleteOne ¶
func (c *ScaleClient) DeleteOne(s *Scale) *ScaleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ScaleClient) DeleteOneID ¶
func (c *ScaleClient) DeleteOneID(id int) *ScaleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ScaleClient) GetX ¶
func (c *ScaleClient) GetX(ctx context.Context, id int) *Scale
GetX is like Get, but panics if an error occurs.
func (*ScaleClient) Query ¶
func (c *ScaleClient) Query() *ScaleQuery
Query returns a query builder for Scale.
func (*ScaleClient) QueryIndicators ¶
func (c *ScaleClient) QueryIndicators(s *Scale) *IndicatorQuery
QueryIndicators queries the indicators edge of a Scale.
func (*ScaleClient) Update ¶
func (c *ScaleClient) Update() *ScaleUpdate
Update returns an update builder for Scale.
func (*ScaleClient) UpdateOne ¶
func (c *ScaleClient) UpdateOne(s *Scale) *ScaleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScaleClient) UpdateOneID ¶
func (c *ScaleClient) UpdateOneID(id int) *ScaleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScaleClient) Use ¶
func (c *ScaleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scale.Hooks(f(g(h())))`.
type ScaleCreate ¶
type ScaleCreate struct {
// contains filtered or unexported fields
}
ScaleCreate is the builder for creating a Scale entity.
func (*ScaleCreate) AddIndicatorIDs ¶
func (sc *ScaleCreate) AddIndicatorIDs(ids ...int) *ScaleCreate
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*ScaleCreate) AddIndicators ¶
func (sc *ScaleCreate) AddIndicators(i ...*Indicator) *ScaleCreate
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*ScaleCreate) Mutation ¶
func (sc *ScaleCreate) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleCreate) Save ¶
func (sc *ScaleCreate) Save(ctx context.Context) (*Scale, error)
Save creates the Scale in the database.
func (*ScaleCreate) SaveX ¶
func (sc *ScaleCreate) SaveX(ctx context.Context) *Scale
SaveX calls Save and panics if Save returns an error.
func (*ScaleCreate) SetDescription ¶
func (sc *ScaleCreate) SetDescription(s string) *ScaleCreate
SetDescription sets the "description" field.
func (*ScaleCreate) SetTitle ¶
func (sc *ScaleCreate) SetTitle(s string) *ScaleCreate
SetTitle sets the "title" field.
func (*ScaleCreate) SetType ¶
func (sc *ScaleCreate) SetType(s string) *ScaleCreate
SetType sets the "type" field.
type ScaleCreateBulk ¶
type ScaleCreateBulk struct {
// contains filtered or unexported fields
}
ScaleCreateBulk is the builder for creating many Scale entities in bulk.
type ScaleDelete ¶
type ScaleDelete struct {
// contains filtered or unexported fields
}
ScaleDelete is the builder for deleting a Scale entity.
func (*ScaleDelete) Exec ¶
func (sd *ScaleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScaleDelete) ExecX ¶
func (sd *ScaleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScaleDelete) Where ¶
func (sd *ScaleDelete) Where(ps ...predicate.Scale) *ScaleDelete
Where adds a new predicate to the ScaleDelete builder.
type ScaleDeleteOne ¶
type ScaleDeleteOne struct {
// contains filtered or unexported fields
}
ScaleDeleteOne is the builder for deleting a single Scale entity.
func (*ScaleDeleteOne) Exec ¶
func (sdo *ScaleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScaleDeleteOne) ExecX ¶
func (sdo *ScaleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScaleEdges ¶
type ScaleEdges struct {
// Indicators holds the value of the indicators edge.
Indicators []*Indicator `json:"indicators,omitempty"`
// contains filtered or unexported fields
}
ScaleEdges holds the relations/edges for other nodes in the graph.
func (ScaleEdges) IndicatorsOrErr ¶
func (e ScaleEdges) IndicatorsOrErr() ([]*Indicator, error)
IndicatorsOrErr returns the Indicators value or an error if the edge was not loaded in eager-loading.
type ScaleGroupBy ¶
type ScaleGroupBy struct {
// contains filtered or unexported fields
}
ScaleGroupBy is the group-by builder for Scale entities.
func (*ScaleGroupBy) Aggregate ¶
func (sgb *ScaleGroupBy) Aggregate(fns ...AggregateFunc) *ScaleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScaleGroupBy) Bool ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) BoolX ¶
func (sgb *ScaleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ScaleGroupBy) Bools ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) BoolsX ¶
func (sgb *ScaleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ScaleGroupBy) Float64 ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) Float64X ¶
func (sgb *ScaleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ScaleGroupBy) Float64s ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) Float64sX ¶
func (sgb *ScaleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ScaleGroupBy) Int ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) IntX ¶
func (sgb *ScaleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ScaleGroupBy) Ints ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) IntsX ¶
func (sgb *ScaleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ScaleGroupBy) Scan ¶
func (sgb *ScaleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ScaleGroupBy) ScanX ¶
func (sgb *ScaleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ScaleGroupBy) String ¶
func (sgb *ScaleGroupBy) 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 (*ScaleGroupBy) StringX ¶
func (sgb *ScaleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ScaleMutation ¶
type ScaleMutation struct {
// contains filtered or unexported fields
}
ScaleMutation represents an operation that mutates the Scale nodes in the graph.
func (*ScaleMutation) AddField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) AddIndicatorIDs ¶
func (m *ScaleMutation) AddIndicatorIDs(ids ...int)
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by ids.
func (*ScaleMutation) AddedEdges ¶
func (m *ScaleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScaleMutation) AddedField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) AddedFields ¶
func (m *ScaleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScaleMutation) AddedIDs ¶
func (m *ScaleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScaleMutation) ClearEdge ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ClearField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ClearIndicators ¶
func (m *ScaleMutation) ClearIndicators()
ClearIndicators clears the "indicators" edge to the Indicator entity.
func (*ScaleMutation) ClearedEdges ¶
func (m *ScaleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScaleMutation) ClearedFields ¶
func (m *ScaleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScaleMutation) Client ¶
func (m ScaleMutation) 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 (*ScaleMutation) Description ¶
func (m *ScaleMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ScaleMutation) EdgeCleared ¶
func (m *ScaleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScaleMutation) Field ¶
func (m *ScaleMutation) 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 (*ScaleMutation) FieldCleared ¶
func (m *ScaleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScaleMutation) Fields ¶
func (m *ScaleMutation) 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 (*ScaleMutation) GetType ¶
func (m *ScaleMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ScaleMutation) ID ¶
func (m *ScaleMutation) 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 (*ScaleMutation) IndicatorsCleared ¶
func (m *ScaleMutation) IndicatorsCleared() bool
IndicatorsCleared returns if the "indicators" edge to the Indicator entity was cleared.
func (*ScaleMutation) IndicatorsIDs ¶
func (m *ScaleMutation) IndicatorsIDs() (ids []int)
IndicatorsIDs returns the "indicators" edge IDs in the mutation.
func (*ScaleMutation) OldDescription ¶
func (m *ScaleMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) 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 (*ScaleMutation) OldTitle ¶
func (m *ScaleMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) OldType ¶
func (m *ScaleMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Scale entity. If the Scale 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 (*ScaleMutation) RemoveIndicatorIDs ¶
func (m *ScaleMutation) RemoveIndicatorIDs(ids ...int)
RemoveIndicatorIDs removes the "indicators" edge to the Indicator entity by IDs.
func (*ScaleMutation) RemovedEdges ¶
func (m *ScaleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScaleMutation) RemovedIDs ¶
func (m *ScaleMutation) 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 (*ScaleMutation) RemovedIndicatorsIDs ¶
func (m *ScaleMutation) RemovedIndicatorsIDs() (ids []int)
RemovedIndicators returns the removed IDs of the "indicators" edge to the Indicator entity.
func (*ScaleMutation) ResetDescription ¶
func (m *ScaleMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ScaleMutation) ResetEdge ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ResetField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) ResetIndicators ¶
func (m *ScaleMutation) ResetIndicators()
ResetIndicators resets all changes to the "indicators" edge.
func (*ScaleMutation) ResetTitle ¶
func (m *ScaleMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ScaleMutation) ResetType ¶
func (m *ScaleMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ScaleMutation) SetDescription ¶
func (m *ScaleMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ScaleMutation) SetField ¶
func (m *ScaleMutation) 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 (*ScaleMutation) SetTitle ¶
func (m *ScaleMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ScaleMutation) SetType ¶
func (m *ScaleMutation) SetType(s string)
SetType sets the "type" field.
func (*ScaleMutation) Title ¶
func (m *ScaleMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (ScaleMutation) Tx ¶
func (m ScaleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScaleMutation) Type ¶
func (m *ScaleMutation) Type() string
Type returns the node type of this mutation (Scale).
type ScaleQuery ¶
type ScaleQuery struct {
// contains filtered or unexported fields
}
ScaleQuery is the builder for querying Scale entities.
func (*ScaleQuery) All ¶
func (sq *ScaleQuery) All(ctx context.Context) ([]*Scale, error)
All executes the query and returns a list of Scales.
func (*ScaleQuery) AllX ¶
func (sq *ScaleQuery) AllX(ctx context.Context) []*Scale
AllX is like All, but panics if an error occurs.
func (*ScaleQuery) Clone ¶
func (sq *ScaleQuery) Clone() *ScaleQuery
Clone returns a duplicate of the ScaleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScaleQuery) Count ¶
func (sq *ScaleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScaleQuery) CountX ¶
func (sq *ScaleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScaleQuery) Exist ¶
func (sq *ScaleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScaleQuery) ExistX ¶
func (sq *ScaleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScaleQuery) First ¶
func (sq *ScaleQuery) First(ctx context.Context) (*Scale, error)
First returns the first Scale entity from the query. Returns a *NotFoundError when no Scale was found.
func (*ScaleQuery) FirstID ¶
func (sq *ScaleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Scale ID from the query. Returns a *NotFoundError when no Scale ID was found.
func (*ScaleQuery) FirstIDX ¶
func (sq *ScaleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScaleQuery) FirstX ¶
func (sq *ScaleQuery) FirstX(ctx context.Context) *Scale
FirstX is like First, but panics if an error occurs.
func (*ScaleQuery) GroupBy ¶
func (sq *ScaleQuery) GroupBy(field string, fields ...string) *ScaleGroupBy
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 {
Type string `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.Scale.Query().
GroupBy(scale.FieldType).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ScaleQuery) IDs ¶
func (sq *ScaleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Scale IDs.
func (*ScaleQuery) IDsX ¶
func (sq *ScaleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ScaleQuery) Limit ¶
func (sq *ScaleQuery) Limit(limit int) *ScaleQuery
Limit adds a limit step to the query.
func (*ScaleQuery) Offset ¶
func (sq *ScaleQuery) Offset(offset int) *ScaleQuery
Offset adds an offset step to the query.
func (*ScaleQuery) Only ¶
func (sq *ScaleQuery) Only(ctx context.Context) (*Scale, error)
Only returns a single Scale entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Scale entity is not found. Returns a *NotFoundError when no Scale entities are found.
func (*ScaleQuery) OnlyID ¶
func (sq *ScaleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Scale ID in the query. Returns a *NotSingularError when exactly one Scale ID is not found. Returns a *NotFoundError when no entities are found.
func (*ScaleQuery) OnlyIDX ¶
func (sq *ScaleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScaleQuery) OnlyX ¶
func (sq *ScaleQuery) OnlyX(ctx context.Context) *Scale
OnlyX is like Only, but panics if an error occurs.
func (*ScaleQuery) Order ¶
func (sq *ScaleQuery) Order(o ...OrderFunc) *ScaleQuery
Order adds an order step to the query.
func (*ScaleQuery) QueryIndicators ¶
func (sq *ScaleQuery) QueryIndicators() *IndicatorQuery
QueryIndicators chains the current query on the "indicators" edge.
func (*ScaleQuery) Select ¶
func (sq *ScaleQuery) Select(field string, fields ...string) *ScaleSelect
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 {
Type string `json:"type,omitempty"`
}
client.Scale.Query().
Select(scale.FieldType).
Scan(ctx, &v)
func (*ScaleQuery) Where ¶
func (sq *ScaleQuery) Where(ps ...predicate.Scale) *ScaleQuery
Where adds a new predicate for the ScaleQuery builder.
func (*ScaleQuery) WithIndicators ¶
func (sq *ScaleQuery) WithIndicators(opts ...func(*IndicatorQuery)) *ScaleQuery
WithIndicators tells the query-builder to eager-load the nodes that are connected to the "indicators" edge. The optional arguments are used to configure the query builder of the edge.
type ScaleSelect ¶
type ScaleSelect struct {
*ScaleQuery
// contains filtered or unexported fields
}
ScaleSelect is the builder for selecting fields of Scale entities.
func (*ScaleSelect) Bool ¶
func (ss *ScaleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) BoolX ¶
func (ss *ScaleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ScaleSelect) Bools ¶
func (ss *ScaleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) BoolsX ¶
func (ss *ScaleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ScaleSelect) Float64 ¶
func (ss *ScaleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Float64X ¶
func (ss *ScaleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ScaleSelect) Float64s ¶
func (ss *ScaleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) Float64sX ¶
func (ss *ScaleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ScaleSelect) Int ¶
func (ss *ScaleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) IntX ¶
func (ss *ScaleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ScaleSelect) Ints ¶
func (ss *ScaleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) IntsX ¶
func (ss *ScaleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ScaleSelect) Scan ¶
func (ss *ScaleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ScaleSelect) ScanX ¶
func (ss *ScaleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ScaleSelect) String ¶
func (ss *ScaleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScaleSelect) StringX ¶
func (ss *ScaleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ScaleUpdate ¶
type ScaleUpdate struct {
// contains filtered or unexported fields
}
ScaleUpdate is the builder for updating Scale entities.
func (*ScaleUpdate) AddIndicatorIDs ¶
func (su *ScaleUpdate) AddIndicatorIDs(ids ...int) *ScaleUpdate
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*ScaleUpdate) AddIndicators ¶
func (su *ScaleUpdate) AddIndicators(i ...*Indicator) *ScaleUpdate
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*ScaleUpdate) ClearIndicators ¶
func (su *ScaleUpdate) ClearIndicators() *ScaleUpdate
ClearIndicators clears all "indicators" edges to the Indicator entity.
func (*ScaleUpdate) Exec ¶
func (su *ScaleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScaleUpdate) ExecX ¶
func (su *ScaleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleUpdate) Mutation ¶
func (su *ScaleUpdate) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleUpdate) RemoveIndicatorIDs ¶
func (su *ScaleUpdate) RemoveIndicatorIDs(ids ...int) *ScaleUpdate
RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.
func (*ScaleUpdate) RemoveIndicators ¶
func (su *ScaleUpdate) RemoveIndicators(i ...*Indicator) *ScaleUpdate
RemoveIndicators removes "indicators" edges to Indicator entities.
func (*ScaleUpdate) Save ¶
func (su *ScaleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScaleUpdate) SaveX ¶
func (su *ScaleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScaleUpdate) SetDescription ¶
func (su *ScaleUpdate) SetDescription(s string) *ScaleUpdate
SetDescription sets the "description" field.
func (*ScaleUpdate) Where ¶
func (su *ScaleUpdate) Where(ps ...predicate.Scale) *ScaleUpdate
Where adds a new predicate for the ScaleUpdate builder.
type ScaleUpdateOne ¶
type ScaleUpdateOne struct {
// contains filtered or unexported fields
}
ScaleUpdateOne is the builder for updating a single Scale entity.
func (*ScaleUpdateOne) AddIndicatorIDs ¶
func (suo *ScaleUpdateOne) AddIndicatorIDs(ids ...int) *ScaleUpdateOne
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*ScaleUpdateOne) AddIndicators ¶
func (suo *ScaleUpdateOne) AddIndicators(i ...*Indicator) *ScaleUpdateOne
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*ScaleUpdateOne) ClearIndicators ¶
func (suo *ScaleUpdateOne) ClearIndicators() *ScaleUpdateOne
ClearIndicators clears all "indicators" edges to the Indicator entity.
func (*ScaleUpdateOne) Exec ¶
func (suo *ScaleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScaleUpdateOne) ExecX ¶
func (suo *ScaleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScaleUpdateOne) Mutation ¶
func (suo *ScaleUpdateOne) Mutation() *ScaleMutation
Mutation returns the ScaleMutation object of the builder.
func (*ScaleUpdateOne) RemoveIndicatorIDs ¶
func (suo *ScaleUpdateOne) RemoveIndicatorIDs(ids ...int) *ScaleUpdateOne
RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.
func (*ScaleUpdateOne) RemoveIndicators ¶
func (suo *ScaleUpdateOne) RemoveIndicators(i ...*Indicator) *ScaleUpdateOne
RemoveIndicators removes "indicators" edges to Indicator entities.
func (*ScaleUpdateOne) Save ¶
func (suo *ScaleUpdateOne) Save(ctx context.Context) (*Scale, error)
Save executes the query and returns the updated Scale entity.
func (*ScaleUpdateOne) SaveX ¶
func (suo *ScaleUpdateOne) SaveX(ctx context.Context) *Scale
SaveX is like Save, but panics if an error occurs.
func (*ScaleUpdateOne) SetDescription ¶
func (suo *ScaleUpdateOne) SetDescription(s string) *ScaleUpdateOne
SetDescription sets the "description" field.
type Tx ¶
type Tx struct {
// Correlation is the client for interacting with the Correlation builders.
Correlation *CorrelationClient
// Dataset is the client for interacting with the Dataset builders.
Dataset *DatasetClient
// DatasetParams is the client for interacting with the DatasetParams builders.
DatasetParams *DatasetParamsClient
// Dictionary is the client for interacting with the Dictionary builders.
Dictionary *DictionaryClient
// DictionaryEntry is the client for interacting with the DictionaryEntry builders.
DictionaryEntry *DictionaryEntryClient
// Indicator is the client for interacting with the Indicator builders.
Indicator *IndicatorClient
// IndicatorParams is the client for interacting with the IndicatorParams builders.
IndicatorParams *IndicatorParamsClient
// Observation is the client for interacting with the Observation builders.
Observation *ObservationClient
// Scale is the client for interacting with the Scale builders.
Scale *ScaleClient
// User is the client for interacting with the User builders.
User *UserClient
// UserSettings is the client for interacting with the UserSettings builders.
UserSettings *UserSettingsClient
// 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 User ¶
type User 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"`
// Username holds the value of the "username" field.
Username string `json:"username,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// PasswordHash holds the value of the "password_hash" field.
PasswordHash string `json:"password_hash,omitempty"`
// Service holds the value of the "service" field.
Service bool `json:"service,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserQuery when eager-loading is set.
Edges UserEdges `json:"edges"`
// contains filtered or unexported fields
}
User is the model entity for the User schema.
func (*User) QueryDatasets ¶
func (u *User) QueryDatasets() *DatasetQuery
QueryDatasets queries the "datasets" edge of the User entity.
func (*User) QueryIndicators ¶
func (u *User) QueryIndicators() *IndicatorQuery
QueryIndicators queries the "indicators" edge of the User entity.
func (*User) QuerySettings ¶
func (u *User) QuerySettings() *UserSettingsQuery
QuerySettings queries the "settings" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryDatasets ¶
func (c *UserClient) QueryDatasets(u *User) *DatasetQuery
QueryDatasets queries the datasets edge of a User.
func (*UserClient) QueryIndicators ¶
func (c *UserClient) QueryIndicators(u *User) *IndicatorQuery
QueryIndicators queries the indicators edge of a User.
func (*UserClient) QuerySettings ¶
func (c *UserClient) QuerySettings(u *User) *UserSettingsQuery
QuerySettings queries the settings edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddDatasetIDs ¶
func (uc *UserCreate) AddDatasetIDs(ids ...int) *UserCreate
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*UserCreate) AddDatasets ¶
func (uc *UserCreate) AddDatasets(d ...*Dataset) *UserCreate
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*UserCreate) AddIndicatorIDs ¶
func (uc *UserCreate) AddIndicatorIDs(ids ...int) *UserCreate
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*UserCreate) AddIndicators ¶
func (uc *UserCreate) AddIndicators(i ...*Indicator) *UserCreate
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*UserCreate) AddSettingIDs ¶
func (uc *UserCreate) AddSettingIDs(ids ...int) *UserCreate
AddSettingIDs adds the "settings" edge to the UserSettings entity by IDs.
func (*UserCreate) AddSettings ¶
func (uc *UserCreate) AddSettings(u ...*UserSettings) *UserCreate
AddSettings adds the "settings" edges to the UserSettings entity.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableService ¶
func (uc *UserCreate) SetNillableService(b *bool) *UserCreate
SetNillableService sets the "service" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetPasswordHash ¶
func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
SetPasswordHash sets the "password_hash" field.
func (*UserCreate) SetService ¶
func (uc *UserCreate) SetService(b bool) *UserCreate
SetService sets the "service" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct {
// Indicators holds the value of the indicators edge.
Indicators []*Indicator `json:"indicators,omitempty"`
// Datasets holds the value of the datasets edge.
Datasets []*Dataset `json:"datasets,omitempty"`
// Settings holds the value of the settings edge.
Settings []*UserSettings `json:"settings,omitempty"`
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DatasetsOrErr ¶
DatasetsOrErr returns the Datasets value or an error if the edge was not loaded in eager-loading.
func (UserEdges) IndicatorsOrErr ¶
IndicatorsOrErr returns the Indicators value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SettingsOrErr ¶
func (e UserEdges) SettingsOrErr() ([]*UserSettings, error)
SettingsOrErr returns the Settings value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) 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 (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddDatasetIDs ¶
func (m *UserMutation) AddDatasetIDs(ids ...int)
AddDatasetIDs adds the "datasets" edge to the Dataset entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddIndicatorIDs ¶
func (m *UserMutation) AddIndicatorIDs(ids ...int)
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by ids.
func (*UserMutation) AddSettingIDs ¶
func (m *UserMutation) AddSettingIDs(ids ...int)
AddSettingIDs adds the "settings" edge to the UserSettings entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDatasets ¶
func (m *UserMutation) ClearDatasets()
ClearDatasets clears the "datasets" edge to the Dataset entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearIndicators ¶
func (m *UserMutation) ClearIndicators()
ClearIndicators clears the "indicators" edge to the Indicator entity.
func (*UserMutation) ClearSettings ¶
func (m *UserMutation) ClearSettings()
ClearSettings clears the "settings" edge to the UserSettings entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) DatasetsCleared ¶
func (m *UserMutation) DatasetsCleared() bool
DatasetsCleared returns if the "datasets" edge to the Dataset entity was cleared.
func (*UserMutation) DatasetsIDs ¶
func (m *UserMutation) DatasetsIDs() (ids []int)
DatasetsIDs returns the "datasets" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) 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 (*UserMutation) IndicatorsCleared ¶
func (m *UserMutation) IndicatorsCleared() bool
IndicatorsCleared returns if the "indicators" edge to the Indicator entity was cleared.
func (*UserMutation) IndicatorsIDs ¶
func (m *UserMutation) IndicatorsIDs() (ids []int)
IndicatorsIDs returns the "indicators" edge IDs in the mutation.
func (*UserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User entity. If the User 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 (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldPasswordHash ¶
func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
OldPasswordHash returns the old "password_hash" field's value of the User entity. If the User 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 (*UserMutation) OldService ¶
func (m *UserMutation) OldService(ctx context.Context) (v bool, err error)
OldService returns the old "service" field's value of the User entity. If the User 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 (*UserMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User 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 (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User 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 (*UserMutation) PasswordHash ¶
func (m *UserMutation) PasswordHash() (r string, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*UserMutation) RemoveDatasetIDs ¶
func (m *UserMutation) RemoveDatasetIDs(ids ...int)
RemoveDatasetIDs removes the "datasets" edge to the Dataset entity by IDs.
func (*UserMutation) RemoveIndicatorIDs ¶
func (m *UserMutation) RemoveIndicatorIDs(ids ...int)
RemoveIndicatorIDs removes the "indicators" edge to the Indicator entity by IDs.
func (*UserMutation) RemoveSettingIDs ¶
func (m *UserMutation) RemoveSettingIDs(ids ...int)
RemoveSettingIDs removes the "settings" edge to the UserSettings entity by IDs.
func (*UserMutation) RemovedDatasetsIDs ¶
func (m *UserMutation) RemovedDatasetsIDs() (ids []int)
RemovedDatasets returns the removed IDs of the "datasets" edge to the Dataset entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) RemovedIndicatorsIDs ¶
func (m *UserMutation) RemovedIndicatorsIDs() (ids []int)
RemovedIndicators returns the removed IDs of the "indicators" edge to the Indicator entity.
func (*UserMutation) RemovedSettingsIDs ¶
func (m *UserMutation) RemovedSettingsIDs() (ids []int)
RemovedSettings returns the removed IDs of the "settings" edge to the UserSettings entity.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetDatasets ¶
func (m *UserMutation) ResetDatasets()
ResetDatasets resets all changes to the "datasets" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetIndicators ¶
func (m *UserMutation) ResetIndicators()
ResetIndicators resets all changes to the "indicators" edge.
func (*UserMutation) ResetPasswordHash ¶
func (m *UserMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*UserMutation) ResetService ¶
func (m *UserMutation) ResetService()
ResetService resets all changes to the "service" field.
func (*UserMutation) ResetSettings ¶
func (m *UserMutation) ResetSettings()
ResetSettings resets all changes to the "settings" edge.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) Service ¶
func (m *UserMutation) Service() (r bool, exists bool)
Service returns the value of the "service" field in the mutation.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetPasswordHash ¶
func (m *UserMutation) SetPasswordHash(s string)
SetPasswordHash sets the "password_hash" field.
func (*UserMutation) SetService ¶
func (m *UserMutation) SetService(b bool)
SetService sets the "service" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) SettingsCleared ¶
func (m *UserMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" edge to the UserSettings entity was cleared.
func (*UserMutation) SettingsIDs ¶
func (m *UserMutation) SettingsIDs() (ids []int)
SettingsIDs returns the "settings" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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.User.Query().
GroupBy(user.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryDatasets ¶
func (uq *UserQuery) QueryDatasets() *DatasetQuery
QueryDatasets chains the current query on the "datasets" edge.
func (*UserQuery) QueryIndicators ¶
func (uq *UserQuery) QueryIndicators() *IndicatorQuery
QueryIndicators chains the current query on the "indicators" edge.
func (*UserQuery) QuerySettings ¶
func (uq *UserQuery) QuerySettings() *UserSettingsQuery
QuerySettings chains the current query on the "settings" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
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.User.Query().
Select(user.FieldCreateTime).
Scan(ctx, &v)
func (*UserQuery) WithDatasets ¶
func (uq *UserQuery) WithDatasets(opts ...func(*DatasetQuery)) *UserQuery
WithDatasets tells the query-builder to eager-load the nodes that are connected to the "datasets" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithIndicators ¶
func (uq *UserQuery) WithIndicators(opts ...func(*IndicatorQuery)) *UserQuery
WithIndicators tells the query-builder to eager-load the nodes that are connected to the "indicators" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSettings ¶
func (uq *UserQuery) WithSettings(opts ...func(*UserSettingsQuery)) *UserQuery
WithSettings tells the query-builder to eager-load the nodes that are connected to the "settings" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettings ¶
type UserSettings struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserSettingsQuery when eager-loading is set.
Edges UserSettingsEdges `json:"edges"`
// contains filtered or unexported fields
}
UserSettings is the model entity for the UserSettings schema.
func (*UserSettings) QueryUser ¶
func (us *UserSettings) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserSettings entity.
func (*UserSettings) String ¶
func (us *UserSettings) String() string
String implements the fmt.Stringer.
func (*UserSettings) Unwrap ¶
func (us *UserSettings) Unwrap() *UserSettings
Unwrap unwraps the UserSettings 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 (*UserSettings) Update ¶
func (us *UserSettings) Update() *UserSettingsUpdateOne
Update returns a builder for updating this UserSettings. Note that you need to call UserSettings.Unwrap() before calling this method if this UserSettings was returned from a transaction, and the transaction was committed or rolled back.
type UserSettingsClient ¶
type UserSettingsClient struct {
// contains filtered or unexported fields
}
UserSettingsClient is a client for the UserSettings schema.
func NewUserSettingsClient ¶
func NewUserSettingsClient(c config) *UserSettingsClient
NewUserSettingsClient returns a client for the UserSettings from the given config.
func (*UserSettingsClient) Create ¶
func (c *UserSettingsClient) Create() *UserSettingsCreate
Create returns a create builder for UserSettings.
func (*UserSettingsClient) CreateBulk ¶
func (c *UserSettingsClient) CreateBulk(builders ...*UserSettingsCreate) *UserSettingsCreateBulk
CreateBulk returns a builder for creating a bulk of UserSettings entities.
func (*UserSettingsClient) Delete ¶
func (c *UserSettingsClient) Delete() *UserSettingsDelete
Delete returns a delete builder for UserSettings.
func (*UserSettingsClient) DeleteOne ¶
func (c *UserSettingsClient) DeleteOne(us *UserSettings) *UserSettingsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserSettingsClient) DeleteOneID ¶
func (c *UserSettingsClient) DeleteOneID(id int) *UserSettingsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserSettingsClient) Get ¶
func (c *UserSettingsClient) Get(ctx context.Context, id int) (*UserSettings, error)
Get returns a UserSettings entity by its id.
func (*UserSettingsClient) GetX ¶
func (c *UserSettingsClient) GetX(ctx context.Context, id int) *UserSettings
GetX is like Get, but panics if an error occurs.
func (*UserSettingsClient) Hooks ¶
func (c *UserSettingsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSettingsClient) Query ¶
func (c *UserSettingsClient) Query() *UserSettingsQuery
Query returns a query builder for UserSettings.
func (*UserSettingsClient) QueryUser ¶
func (c *UserSettingsClient) QueryUser(us *UserSettings) *UserQuery
QueryUser queries the user edge of a UserSettings.
func (*UserSettingsClient) Update ¶
func (c *UserSettingsClient) Update() *UserSettingsUpdate
Update returns an update builder for UserSettings.
func (*UserSettingsClient) UpdateOne ¶
func (c *UserSettingsClient) UpdateOne(us *UserSettings) *UserSettingsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSettingsClient) UpdateOneID ¶
func (c *UserSettingsClient) UpdateOneID(id int) *UserSettingsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSettingsClient) Use ¶
func (c *UserSettingsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersettings.Hooks(f(g(h())))`.
type UserSettingsCreate ¶
type UserSettingsCreate struct {
// contains filtered or unexported fields
}
UserSettingsCreate is the builder for creating a UserSettings entity.
func (*UserSettingsCreate) Mutation ¶
func (usc *UserSettingsCreate) Mutation() *UserSettingsMutation
Mutation returns the UserSettingsMutation object of the builder.
func (*UserSettingsCreate) Save ¶
func (usc *UserSettingsCreate) Save(ctx context.Context) (*UserSettings, error)
Save creates the UserSettings in the database.
func (*UserSettingsCreate) SaveX ¶
func (usc *UserSettingsCreate) SaveX(ctx context.Context) *UserSettings
SaveX calls Save and panics if Save returns an error.
func (*UserSettingsCreate) SetUser ¶
func (usc *UserSettingsCreate) SetUser(u *User) *UserSettingsCreate
SetUser sets the "user" edge to the User entity.
func (*UserSettingsCreate) SetUserID ¶
func (usc *UserSettingsCreate) SetUserID(id int) *UserSettingsCreate
SetUserID sets the "user" edge to the User entity by ID.
type UserSettingsCreateBulk ¶
type UserSettingsCreateBulk struct {
// contains filtered or unexported fields
}
UserSettingsCreateBulk is the builder for creating many UserSettings entities in bulk.
func (*UserSettingsCreateBulk) Save ¶
func (uscb *UserSettingsCreateBulk) Save(ctx context.Context) ([]*UserSettings, error)
Save creates the UserSettings entities in the database.
func (*UserSettingsCreateBulk) SaveX ¶
func (uscb *UserSettingsCreateBulk) SaveX(ctx context.Context) []*UserSettings
SaveX is like Save, but panics if an error occurs.
type UserSettingsDelete ¶
type UserSettingsDelete struct {
// contains filtered or unexported fields
}
UserSettingsDelete is the builder for deleting a UserSettings entity.
func (*UserSettingsDelete) Exec ¶
func (usd *UserSettingsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSettingsDelete) ExecX ¶
func (usd *UserSettingsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingsDelete) Where ¶
func (usd *UserSettingsDelete) Where(ps ...predicate.UserSettings) *UserSettingsDelete
Where adds a new predicate to the UserSettingsDelete builder.
type UserSettingsDeleteOne ¶
type UserSettingsDeleteOne struct {
// contains filtered or unexported fields
}
UserSettingsDeleteOne is the builder for deleting a single UserSettings entity.
func (*UserSettingsDeleteOne) Exec ¶
func (usdo *UserSettingsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSettingsDeleteOne) ExecX ¶
func (usdo *UserSettingsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSettingsEdges ¶
type UserSettingsEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
UserSettingsEdges holds the relations/edges for other nodes in the graph.
func (UserSettingsEdges) UserOrErr ¶
func (e UserSettingsEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSettingsGroupBy ¶
type UserSettingsGroupBy struct {
// contains filtered or unexported fields
}
UserSettingsGroupBy is the group-by builder for UserSettings entities.
func (*UserSettingsGroupBy) Aggregate ¶
func (usgb *UserSettingsGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSettingsGroupBy) Bool ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) BoolX ¶
func (usgb *UserSettingsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingsGroupBy) Bools ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) BoolsX ¶
func (usgb *UserSettingsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingsGroupBy) Float64 ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) Float64X ¶
func (usgb *UserSettingsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingsGroupBy) Float64s ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) Float64sX ¶
func (usgb *UserSettingsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingsGroupBy) Int ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) IntX ¶
func (usgb *UserSettingsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingsGroupBy) Ints ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) IntsX ¶
func (usgb *UserSettingsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingsGroupBy) Scan ¶
func (usgb *UserSettingsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSettingsGroupBy) ScanX ¶
func (usgb *UserSettingsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingsGroupBy) String ¶
func (usgb *UserSettingsGroupBy) 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 (*UserSettingsGroupBy) StringX ¶
func (usgb *UserSettingsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingsMutation ¶
type UserSettingsMutation struct {
// contains filtered or unexported fields
}
UserSettingsMutation represents an operation that mutates the UserSettings nodes in the graph.
func (*UserSettingsMutation) AddField ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) AddedEdges ¶
func (m *UserSettingsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSettingsMutation) AddedField ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) AddedFields ¶
func (m *UserSettingsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSettingsMutation) AddedIDs ¶
func (m *UserSettingsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSettingsMutation) ClearEdge ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ClearField ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ClearUser ¶
func (m *UserSettingsMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserSettingsMutation) ClearedEdges ¶
func (m *UserSettingsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSettingsMutation) ClearedFields ¶
func (m *UserSettingsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSettingsMutation) Client ¶
func (m UserSettingsMutation) 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 (*UserSettingsMutation) EdgeCleared ¶
func (m *UserSettingsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSettingsMutation) Field ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) FieldCleared ¶
func (m *UserSettingsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSettingsMutation) Fields ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ID ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) 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 (*UserSettingsMutation) Op ¶
func (m *UserSettingsMutation) Op() Op
Op returns the operation name.
func (*UserSettingsMutation) RemovedEdges ¶
func (m *UserSettingsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSettingsMutation) RemovedIDs ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ResetEdge ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ResetField ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) ResetUser ¶
func (m *UserSettingsMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserSettingsMutation) SetField ¶
func (m *UserSettingsMutation) 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 (*UserSettingsMutation) SetUserID ¶
func (m *UserSettingsMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (UserSettingsMutation) Tx ¶
func (m UserSettingsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSettingsMutation) Type ¶
func (m *UserSettingsMutation) Type() string
Type returns the node type of this mutation (UserSettings).
func (*UserSettingsMutation) UserCleared ¶
func (m *UserSettingsMutation) UserCleared() bool
UserCleared returns if the "user" edge to the User entity was cleared.
func (*UserSettingsMutation) UserID ¶
func (m *UserSettingsMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*UserSettingsMutation) UserIDs ¶
func (m *UserSettingsMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
type UserSettingsQuery ¶
type UserSettingsQuery struct {
// contains filtered or unexported fields
}
UserSettingsQuery is the builder for querying UserSettings entities.
func (*UserSettingsQuery) All ¶
func (usq *UserSettingsQuery) All(ctx context.Context) ([]*UserSettings, error)
All executes the query and returns a list of UserSettingsSlice.
func (*UserSettingsQuery) AllX ¶
func (usq *UserSettingsQuery) AllX(ctx context.Context) []*UserSettings
AllX is like All, but panics if an error occurs.
func (*UserSettingsQuery) Clone ¶
func (usq *UserSettingsQuery) Clone() *UserSettingsQuery
Clone returns a duplicate of the UserSettingsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSettingsQuery) Count ¶
func (usq *UserSettingsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSettingsQuery) CountX ¶
func (usq *UserSettingsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSettingsQuery) Exist ¶
func (usq *UserSettingsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSettingsQuery) ExistX ¶
func (usq *UserSettingsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSettingsQuery) First ¶
func (usq *UserSettingsQuery) First(ctx context.Context) (*UserSettings, error)
First returns the first UserSettings entity from the query. Returns a *NotFoundError when no UserSettings was found.
func (*UserSettingsQuery) FirstID ¶
func (usq *UserSettingsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSettings ID from the query. Returns a *NotFoundError when no UserSettings ID was found.
func (*UserSettingsQuery) FirstIDX ¶
func (usq *UserSettingsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSettingsQuery) FirstX ¶
func (usq *UserSettingsQuery) FirstX(ctx context.Context) *UserSettings
FirstX is like First, but panics if an error occurs.
func (*UserSettingsQuery) GroupBy ¶
func (usq *UserSettingsQuery) GroupBy(field string, fields ...string) *UserSettingsGroupBy
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.
func (*UserSettingsQuery) IDs ¶
func (usq *UserSettingsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSettings IDs.
func (*UserSettingsQuery) IDsX ¶
func (usq *UserSettingsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSettingsQuery) Limit ¶
func (usq *UserSettingsQuery) Limit(limit int) *UserSettingsQuery
Limit adds a limit step to the query.
func (*UserSettingsQuery) Offset ¶
func (usq *UserSettingsQuery) Offset(offset int) *UserSettingsQuery
Offset adds an offset step to the query.
func (*UserSettingsQuery) Only ¶
func (usq *UserSettingsQuery) Only(ctx context.Context) (*UserSettings, error)
Only returns a single UserSettings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserSettings entity is not found. Returns a *NotFoundError when no UserSettings entities are found.
func (*UserSettingsQuery) OnlyID ¶
func (usq *UserSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSettings ID in the query. Returns a *NotSingularError when exactly one UserSettings ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserSettingsQuery) OnlyIDX ¶
func (usq *UserSettingsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSettingsQuery) OnlyX ¶
func (usq *UserSettingsQuery) OnlyX(ctx context.Context) *UserSettings
OnlyX is like Only, but panics if an error occurs.
func (*UserSettingsQuery) Order ¶
func (usq *UserSettingsQuery) Order(o ...OrderFunc) *UserSettingsQuery
Order adds an order step to the query.
func (*UserSettingsQuery) QueryUser ¶
func (usq *UserSettingsQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserSettingsQuery) Select ¶
func (usq *UserSettingsQuery) Select(field string, fields ...string) *UserSettingsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*UserSettingsQuery) Where ¶
func (usq *UserSettingsQuery) Where(ps ...predicate.UserSettings) *UserSettingsQuery
Where adds a new predicate for the UserSettingsQuery builder.
func (*UserSettingsQuery) WithUser ¶
func (usq *UserSettingsQuery) WithUser(opts ...func(*UserQuery)) *UserSettingsQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserSettingsSelect ¶
type UserSettingsSelect struct {
*UserSettingsQuery
// contains filtered or unexported fields
}
UserSettingsSelect is the builder for selecting fields of UserSettings entities.
func (*UserSettingsSelect) Bool ¶
func (uss *UserSettingsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) BoolX ¶
func (uss *UserSettingsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingsSelect) Bools ¶
func (uss *UserSettingsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) BoolsX ¶
func (uss *UserSettingsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingsSelect) Float64 ¶
func (uss *UserSettingsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) Float64X ¶
func (uss *UserSettingsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingsSelect) Float64s ¶
func (uss *UserSettingsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) Float64sX ¶
func (uss *UserSettingsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingsSelect) Int ¶
func (uss *UserSettingsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) IntX ¶
func (uss *UserSettingsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingsSelect) Ints ¶
func (uss *UserSettingsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) IntsX ¶
func (uss *UserSettingsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingsSelect) Scan ¶
func (uss *UserSettingsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSettingsSelect) ScanX ¶
func (uss *UserSettingsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingsSelect) String ¶
func (uss *UserSettingsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSettingsSelect) StringX ¶
func (uss *UserSettingsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingsSlice ¶
type UserSettingsSlice []*UserSettings
UserSettingsSlice is a parsable slice of UserSettings.
type UserSettingsUpdate ¶
type UserSettingsUpdate struct {
// contains filtered or unexported fields
}
UserSettingsUpdate is the builder for updating UserSettings entities.
func (*UserSettingsUpdate) ClearUser ¶
func (usu *UserSettingsUpdate) ClearUser() *UserSettingsUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserSettingsUpdate) Exec ¶
func (usu *UserSettingsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSettingsUpdate) ExecX ¶
func (usu *UserSettingsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingsUpdate) Mutation ¶
func (usu *UserSettingsUpdate) Mutation() *UserSettingsMutation
Mutation returns the UserSettingsMutation object of the builder.
func (*UserSettingsUpdate) Save ¶
func (usu *UserSettingsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSettingsUpdate) SaveX ¶
func (usu *UserSettingsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSettingsUpdate) SetUser ¶
func (usu *UserSettingsUpdate) SetUser(u *User) *UserSettingsUpdate
SetUser sets the "user" edge to the User entity.
func (*UserSettingsUpdate) SetUserID ¶
func (usu *UserSettingsUpdate) SetUserID(id int) *UserSettingsUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserSettingsUpdate) Where ¶
func (usu *UserSettingsUpdate) Where(ps ...predicate.UserSettings) *UserSettingsUpdate
Where adds a new predicate for the UserSettingsUpdate builder.
type UserSettingsUpdateOne ¶
type UserSettingsUpdateOne struct {
// contains filtered or unexported fields
}
UserSettingsUpdateOne is the builder for updating a single UserSettings entity.
func (*UserSettingsUpdateOne) ClearUser ¶
func (usuo *UserSettingsUpdateOne) ClearUser() *UserSettingsUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserSettingsUpdateOne) Exec ¶
func (usuo *UserSettingsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSettingsUpdateOne) ExecX ¶
func (usuo *UserSettingsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingsUpdateOne) Mutation ¶
func (usuo *UserSettingsUpdateOne) Mutation() *UserSettingsMutation
Mutation returns the UserSettingsMutation object of the builder.
func (*UserSettingsUpdateOne) Save ¶
func (usuo *UserSettingsUpdateOne) Save(ctx context.Context) (*UserSettings, error)
Save executes the query and returns the updated UserSettings entity.
func (*UserSettingsUpdateOne) SaveX ¶
func (usuo *UserSettingsUpdateOne) SaveX(ctx context.Context) *UserSettings
SaveX is like Save, but panics if an error occurs.
func (*UserSettingsUpdateOne) SetUser ¶
func (usuo *UserSettingsUpdateOne) SetUser(u *User) *UserSettingsUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserSettingsUpdateOne) SetUserID ¶
func (usuo *UserSettingsUpdateOne) SetUserID(id int) *UserSettingsUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddDatasetIDs ¶
func (uu *UserUpdate) AddDatasetIDs(ids ...int) *UserUpdate
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*UserUpdate) AddDatasets ¶
func (uu *UserUpdate) AddDatasets(d ...*Dataset) *UserUpdate
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*UserUpdate) AddIndicatorIDs ¶
func (uu *UserUpdate) AddIndicatorIDs(ids ...int) *UserUpdate
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*UserUpdate) AddIndicators ¶
func (uu *UserUpdate) AddIndicators(i ...*Indicator) *UserUpdate
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*UserUpdate) AddSettingIDs ¶
func (uu *UserUpdate) AddSettingIDs(ids ...int) *UserUpdate
AddSettingIDs adds the "settings" edge to the UserSettings entity by IDs.
func (*UserUpdate) AddSettings ¶
func (uu *UserUpdate) AddSettings(u ...*UserSettings) *UserUpdate
AddSettings adds the "settings" edges to the UserSettings entity.
func (*UserUpdate) ClearDatasets ¶
func (uu *UserUpdate) ClearDatasets() *UserUpdate
ClearDatasets clears all "datasets" edges to the Dataset entity.
func (*UserUpdate) ClearIndicators ¶
func (uu *UserUpdate) ClearIndicators() *UserUpdate
ClearIndicators clears all "indicators" edges to the Indicator entity.
func (*UserUpdate) ClearSettings ¶
func (uu *UserUpdate) ClearSettings() *UserUpdate
ClearSettings clears all "settings" edges to the UserSettings entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveDatasetIDs ¶
func (uu *UserUpdate) RemoveDatasetIDs(ids ...int) *UserUpdate
RemoveDatasetIDs removes the "datasets" edge to Dataset entities by IDs.
func (*UserUpdate) RemoveDatasets ¶
func (uu *UserUpdate) RemoveDatasets(d ...*Dataset) *UserUpdate
RemoveDatasets removes "datasets" edges to Dataset entities.
func (*UserUpdate) RemoveIndicatorIDs ¶
func (uu *UserUpdate) RemoveIndicatorIDs(ids ...int) *UserUpdate
RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.
func (*UserUpdate) RemoveIndicators ¶
func (uu *UserUpdate) RemoveIndicators(i ...*Indicator) *UserUpdate
RemoveIndicators removes "indicators" edges to Indicator entities.
func (*UserUpdate) RemoveSettingIDs ¶
func (uu *UserUpdate) RemoveSettingIDs(ids ...int) *UserUpdate
RemoveSettingIDs removes the "settings" edge to UserSettings entities by IDs.
func (*UserUpdate) RemoveSettings ¶
func (uu *UserUpdate) RemoveSettings(u ...*UserSettings) *UserUpdate
RemoveSettings removes "settings" edges to UserSettings entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetNillableService ¶
func (uu *UserUpdate) SetNillableService(b *bool) *UserUpdate
SetNillableService sets the "service" field if the given value is not nil.
func (*UserUpdate) SetPasswordHash ¶
func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
SetPasswordHash sets the "password_hash" field.
func (*UserUpdate) SetService ¶
func (uu *UserUpdate) SetService(b bool) *UserUpdate
SetService sets the "service" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddDatasetIDs ¶
func (uuo *UserUpdateOne) AddDatasetIDs(ids ...int) *UserUpdateOne
AddDatasetIDs adds the "datasets" edge to the Dataset entity by IDs.
func (*UserUpdateOne) AddDatasets ¶
func (uuo *UserUpdateOne) AddDatasets(d ...*Dataset) *UserUpdateOne
AddDatasets adds the "datasets" edges to the Dataset entity.
func (*UserUpdateOne) AddIndicatorIDs ¶
func (uuo *UserUpdateOne) AddIndicatorIDs(ids ...int) *UserUpdateOne
AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.
func (*UserUpdateOne) AddIndicators ¶
func (uuo *UserUpdateOne) AddIndicators(i ...*Indicator) *UserUpdateOne
AddIndicators adds the "indicators" edges to the Indicator entity.
func (*UserUpdateOne) AddSettingIDs ¶
func (uuo *UserUpdateOne) AddSettingIDs(ids ...int) *UserUpdateOne
AddSettingIDs adds the "settings" edge to the UserSettings entity by IDs.
func (*UserUpdateOne) AddSettings ¶
func (uuo *UserUpdateOne) AddSettings(u ...*UserSettings) *UserUpdateOne
AddSettings adds the "settings" edges to the UserSettings entity.
func (*UserUpdateOne) ClearDatasets ¶
func (uuo *UserUpdateOne) ClearDatasets() *UserUpdateOne
ClearDatasets clears all "datasets" edges to the Dataset entity.
func (*UserUpdateOne) ClearIndicators ¶
func (uuo *UserUpdateOne) ClearIndicators() *UserUpdateOne
ClearIndicators clears all "indicators" edges to the Indicator entity.
func (*UserUpdateOne) ClearSettings ¶
func (uuo *UserUpdateOne) ClearSettings() *UserUpdateOne
ClearSettings clears all "settings" edges to the UserSettings entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveDatasetIDs ¶
func (uuo *UserUpdateOne) RemoveDatasetIDs(ids ...int) *UserUpdateOne
RemoveDatasetIDs removes the "datasets" edge to Dataset entities by IDs.
func (*UserUpdateOne) RemoveDatasets ¶
func (uuo *UserUpdateOne) RemoveDatasets(d ...*Dataset) *UserUpdateOne
RemoveDatasets removes "datasets" edges to Dataset entities.
func (*UserUpdateOne) RemoveIndicatorIDs ¶
func (uuo *UserUpdateOne) RemoveIndicatorIDs(ids ...int) *UserUpdateOne
RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.
func (*UserUpdateOne) RemoveIndicators ¶
func (uuo *UserUpdateOne) RemoveIndicators(i ...*Indicator) *UserUpdateOne
RemoveIndicators removes "indicators" edges to Indicator entities.
func (*UserUpdateOne) RemoveSettingIDs ¶
func (uuo *UserUpdateOne) RemoveSettingIDs(ids ...int) *UserUpdateOne
RemoveSettingIDs removes the "settings" edge to UserSettings entities by IDs.
func (*UserUpdateOne) RemoveSettings ¶
func (uuo *UserUpdateOne) RemoveSettings(u ...*UserSettings) *UserUpdateOne
RemoveSettings removes "settings" edges to UserSettings entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetNillableService ¶
func (uuo *UserUpdateOne) SetNillableService(b *bool) *UserUpdateOne
SetNillableService sets the "service" field if the given value is not nil.
func (*UserUpdateOne) SetPasswordHash ¶
func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*UserUpdateOne) SetService ¶
func (uuo *UserUpdateOne) SetService(b bool) *UserUpdateOne
SetService sets the "service" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
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
¶
- client.go
- config.go
- context.go
- correlation.go
- correlation_create.go
- correlation_delete.go
- correlation_query.go
- correlation_update.go
- dataset.go
- dataset_create.go
- dataset_delete.go
- dataset_query.go
- dataset_update.go
- datasetparams.go
- datasetparams_create.go
- datasetparams_delete.go
- datasetparams_query.go
- datasetparams_update.go
- dictionary.go
- dictionary_create.go
- dictionary_delete.go
- dictionary_query.go
- dictionary_update.go
- dictionaryentry.go
- dictionaryentry_create.go
- dictionaryentry_delete.go
- dictionaryentry_query.go
- dictionaryentry_update.go
- ent.go
- generate.go
- indicator.go
- indicator_create.go
- indicator_delete.go
- indicator_query.go
- indicator_update.go
- indicatorparams.go
- indicatorparams_create.go
- indicatorparams_delete.go
- indicatorparams_query.go
- indicatorparams_update.go
- mutation.go
- observation.go
- observation_create.go
- observation_delete.go
- observation_query.go
- observation_update.go
- runtime.go
- scale.go
- scale_create.go
- scale_delete.go
- scale_query.go
- scale_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- usersettings.go
- usersettings_create.go
- usersettings_delete.go
- usersettings_query.go
- usersettings_update.go