ent

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2021 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
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

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validaton error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector, func(string) bool) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Correlation.
	Query().
	Count(ctx)

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Committer method.

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

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

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

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

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

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

SetP sets the "p" field.

func (*CorrelationCreate) SetR2

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

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.

func (*CorrelationGroupBy) Strings

func (cgb *CorrelationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*CorrelationGroupBy) StringsX

func (cgb *CorrelationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *CorrelationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

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

func (m *CorrelationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *CorrelationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

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

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.

func (*CorrelationSelect) Strings

func (cs *CorrelationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CorrelationSelect) StringsX

func (cs *CorrelationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

AddCoef adds f to the "coef" field.

func (*CorrelationUpdate) AddP

AddP adds f to the "p" field.

func (*CorrelationUpdate) AddR2

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

SetCoef sets the "coef" field.

func (*CorrelationUpdate) SetGranularity

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

SetP sets the "p" field.

func (*CorrelationUpdate) SetR2

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

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

AddCoef adds f to the "coef" field.

func (*CorrelationUpdateOne) AddP

AddP adds f to the "p" field.

func (*CorrelationUpdateOne) AddR2

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

Save executes the query and returns the updated Correlation entity.

func (*CorrelationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CorrelationUpdateOne) SetCoef

SetCoef sets the "coef" field.

func (*CorrelationUpdateOne) SetGranularity

SetGranularity sets the "granularity" field.

func (*CorrelationUpdateOne) SetLeft

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

SetP sets the "p" field.

func (*CorrelationUpdateOne) SetR2

SetR2 sets the "r2" field.

func (*CorrelationUpdateOne) SetRight

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 holds the value of the "shared" field.
	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) QueryUser

func (d *Dataset) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Dataset entity.

func (*Dataset) String

func (d *Dataset) String() string

String implements the fmt.Stringer.

func (*Dataset) Unwrap

func (d *Dataset) Unwrap() *Dataset

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) Get

func (c *DatasetClient) Get(ctx context.Context, id int) (*Dataset, error)

Get returns a Dataset entity by its 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.

func (*DatasetCreateBulk) Save

func (dcb *DatasetCreateBulk) Save(ctx context.Context) ([]*Dataset, error)

Save creates the Dataset entities in the database.

func (*DatasetCreateBulk) SaveX

func (dcb *DatasetCreateBulk) SaveX(ctx context.Context) []*Dataset

SaveX is like Save, but panics if an error occurs.

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.

func (*DatasetGroupBy) Strings

func (dgb *DatasetGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DatasetGroupBy) StringsX

func (dgb *DatasetGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *DatasetMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

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

func (m *DatasetMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *DatasetMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

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) Op

func (m *DatasetMutation) Op() Op

Op returns the operation name.

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

Create returns a create builder for DatasetParams.

func (*DatasetParamsClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DatasetParams entities.

func (*DatasetParamsClient) Delete

Delete returns a delete builder for DatasetParams.

func (*DatasetParamsClient) DeleteOne

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

Get returns a DatasetParams entity by its id.

func (*DatasetParamsClient) GetX

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

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

Update returns an update builder for DatasetParams.

func (*DatasetParamsClient) UpdateOne

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

Save creates the DatasetParams in the database.

func (*DatasetParamsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DatasetParamsCreate) SetAggregation

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

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

Save creates the DatasetParams entities in the database.

func (*DatasetParamsCreateBulk) SaveX

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

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.

func (*DatasetParamsGroupBy) Strings

func (dpgb *DatasetParamsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DatasetParamsGroupBy) StringsX

func (dpgb *DatasetParamsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *DatasetParamsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*DatasetParamsQuery) Order

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

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.

func (*DatasetParamsSelect) Strings

func (dps *DatasetParamsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DatasetParamsSelect) StringsX

func (dps *DatasetParamsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

SetStyle sets the "style" field.

func (*DatasetParamsUpdate) Where

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

Mutation returns the DatasetParamsMutation object of the builder.

func (*DatasetParamsUpdateOne) Save

Save executes the query and returns the updated DatasetParams entity.

func (*DatasetParamsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DatasetParamsUpdateOne) SetAggregation

SetAggregation sets the "aggregation" field.

func (*DatasetParamsUpdateOne) SetDataset

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

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.

func (*DatasetSelect) Strings

func (ds *DatasetSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DatasetSelect) StringsX

func (ds *DatasetSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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 Datasets

type Datasets []*Dataset

Datasets is a parsable slice of Dataset.

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

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

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

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

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

Create returns a create builder for DictionaryEntry.

func (*DictionaryEntryClient) CreateBulk added in v0.0.8

CreateBulk returns a builder for creating a bulk of DictionaryEntry entities.

func (*DictionaryEntryClient) Delete added in v0.0.8

Delete returns a delete builder for DictionaryEntry.

func (*DictionaryEntryClient) DeleteOne added in v0.0.8

DeleteOne returns a delete builder for the given entity.

func (*DictionaryEntryClient) DeleteOneID added in v0.0.8

DeleteOneID returns a delete builder for the given id.

func (*DictionaryEntryClient) Get added in v0.0.8

Get returns a DictionaryEntry entity by its id.

func (*DictionaryEntryClient) GetX added in v0.0.8

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

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

Update returns an update builder for DictionaryEntry.

func (*DictionaryEntryClient) UpdateOne added in v0.0.8

UpdateOne returns an update builder for the given entity.

func (*DictionaryEntryClient) UpdateOneID added in v0.0.8

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

Mutation returns the DictionaryEntryMutation object of the builder.

func (*DictionaryEntryCreate) Save added in v0.0.8

Save creates the DictionaryEntry in the database.

func (*DictionaryEntryCreate) SaveX added in v0.0.8

SaveX calls Save and panics if Save returns an error.

func (*DictionaryEntryCreate) SetCode added in v0.0.8

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

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

Save creates the DictionaryEntry entities in the database.

func (*DictionaryEntryCreateBulk) SaveX added in v0.0.8

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

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

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

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.

func (*DictionaryEntryGroupBy) Strings added in v0.0.8

func (degb *DictionaryEntryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DictionaryEntryGroupBy) StringsX added in v0.0.8

func (degb *DictionaryEntryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *DictionaryEntryMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

All executes the query and returns a list of DictionaryEntries.

func (*DictionaryEntryQuery) AllX added in v0.0.8

AllX is like All, but panics if an error occurs.

func (*DictionaryEntryQuery) Clone added in v0.0.8

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*DictionaryEntryQuery) Order added in v0.0.8

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

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.

func (*DictionaryEntrySelect) Strings added in v0.0.8

func (des *DictionaryEntrySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DictionaryEntrySelect) StringsX added in v0.0.8

func (des *DictionaryEntrySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

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

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

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

Mutation returns the DictionaryEntryMutation object of the builder.

func (*DictionaryEntryUpdateOne) Save added in v0.0.8

Save executes the query and returns the updated DictionaryEntry entity.

func (*DictionaryEntryUpdateOne) SaveX added in v0.0.8

SaveX is like Save, but panics if an error occurs.

func (*DictionaryEntryUpdateOne) SetCode added in v0.0.8

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

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.

func (*DictionaryGroupBy) Strings added in v0.0.8

func (dgb *DictionaryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DictionaryGroupBy) StringsX added in v0.0.8

func (dgb *DictionaryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *DictionaryMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

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.

func (*DictionarySelect) Strings added in v0.0.8

func (ds *DictionarySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DictionarySelect) StringsX added in v0.0.8

func (ds *DictionarySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

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

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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

func (i *Indicator) QueryAuthor() *UserQuery

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) String

func (i *Indicator) String() string

String implements the fmt.Stringer.

func (*Indicator) Unwrap

func (i *Indicator) Unwrap() *Indicator

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) Get

func (c *IndicatorClient) Get(ctx context.Context, id int) (*Indicator, error)

Get returns a Indicator entity by its 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.

func (*IndicatorCreateBulk) Save

func (icb *IndicatorCreateBulk) Save(ctx context.Context) ([]*Indicator, error)

Save creates the Indicator entities in the database.

func (*IndicatorCreateBulk) SaveX

func (icb *IndicatorCreateBulk) SaveX(ctx context.Context) []*Indicator

SaveX is like Save, but panics if an error occurs.

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

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.

func (*IndicatorGroupBy) Strings

func (igb *IndicatorGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*IndicatorGroupBy) StringsX

func (igb *IndicatorGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *IndicatorMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

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

func (m *IndicatorMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *IndicatorMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

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) Op

func (m *IndicatorMutation) Op() Op

Op returns the operation name.

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

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

Create returns a create builder for IndicatorParams.

func (*IndicatorParamsClient) CreateBulk added in v0.0.8

CreateBulk returns a builder for creating a bulk of IndicatorParams entities.

func (*IndicatorParamsClient) Delete added in v0.0.8

Delete returns a delete builder for IndicatorParams.

func (*IndicatorParamsClient) DeleteOne added in v0.0.8

DeleteOne returns a delete builder for the given entity.

func (*IndicatorParamsClient) DeleteOneID added in v0.0.8

DeleteOneID returns a delete builder for the given id.

func (*IndicatorParamsClient) Get added in v0.0.8

Get returns a IndicatorParams entity by its id.

func (*IndicatorParamsClient) GetX added in v0.0.8

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

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

Update returns an update builder for IndicatorParams.

func (*IndicatorParamsClient) UpdateOne added in v0.0.8

UpdateOne returns an update builder for the given entity.

func (*IndicatorParamsClient) UpdateOneID added in v0.0.8

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

Mutation returns the IndicatorParamsMutation object of the builder.

func (*IndicatorParamsCreate) Save added in v0.0.8

Save creates the IndicatorParams in the database.

func (*IndicatorParamsCreate) SaveX added in v0.0.8

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

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

Save creates the IndicatorParams entities in the database.

func (*IndicatorParamsCreateBulk) SaveX added in v0.0.8

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

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

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

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.

func (*IndicatorParamsGroupBy) Strings added in v0.0.8

func (ipgb *IndicatorParamsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*IndicatorParamsGroupBy) StringsX added in v0.0.8

func (ipgb *IndicatorParamsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *IndicatorParamsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

All executes the query and returns a list of IndicatorParamsSlice.

func (*IndicatorParamsQuery) AllX added in v0.0.8

AllX is like All, but panics if an error occurs.

func (*IndicatorParamsQuery) Clone added in v0.0.8

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*IndicatorParamsQuery) Order added in v0.0.8

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

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.

func (*IndicatorParamsSelect) Strings added in v0.0.8

func (ips *IndicatorParamsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IndicatorParamsSelect) StringsX added in v0.0.8

func (ips *IndicatorParamsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

SetValueParams sets the "value_params" field.

func (*IndicatorParamsUpdate) Where added in v0.0.8

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

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

Mutation returns the IndicatorParamsMutation object of the builder.

func (*IndicatorParamsUpdateOne) Save added in v0.0.8

Save executes the query and returns the updated IndicatorParams entity.

func (*IndicatorParamsUpdateOne) SaveX added in v0.0.8

SaveX is like Save, but panics if an error occurs.

func (*IndicatorParamsUpdateOne) SetIndicator added in v0.0.8

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

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

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.

func (*IndicatorSelect) Strings

func (is *IndicatorSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IndicatorSelect) StringsX

func (is *IndicatorSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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 Indicators

type Indicators []*Indicator

Indicators is a parsable slice of Indicator.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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

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

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

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

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

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.

func (*ObservationGroupBy) Strings

func (ogb *ObservationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ObservationGroupBy) StringsX

func (ogb *ObservationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *ObservationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

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

func (m *ObservationMutation) OldDate(ctx context.Context) (v time.Time, err error)

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

func (m *ObservationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *ObservationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

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

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.

func (*ObservationSelect) Strings

func (os *ObservationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ObservationSelect) StringsX

func (os *ObservationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

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

Save executes the query and returns the updated Observation entity.

func (*ObservationUpdateOne) SaveX

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

SetDate sets the "date" field.

func (*ObservationUpdateOne) SetValue

SetValue sets the "value" field.

type Observations

type Observations []*Observation

Observations is a parsable slice of Observation.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector, func(string) bool)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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) String

func (s *Scale) String() string

String implements the fmt.Stringer.

func (*Scale) Unwrap

func (s *Scale) Unwrap() *Scale

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) Get

func (c *ScaleClient) Get(ctx context.Context, id int) (*Scale, error)

Get returns a Scale entity by its 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) Hooks

func (c *ScaleClient) Hooks() []Hook

Hooks returns the client hooks.

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.

func (*ScaleCreateBulk) Save

func (scb *ScaleCreateBulk) Save(ctx context.Context) ([]*Scale, error)

Save creates the Scale entities in the database.

func (*ScaleCreateBulk) SaveX

func (scb *ScaleCreateBulk) SaveX(ctx context.Context) []*Scale

SaveX is like Save, but panics if an error occurs.

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.

func (*ScaleGroupBy) Strings

func (sgb *ScaleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ScaleGroupBy) StringsX

func (sgb *ScaleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *ScaleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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) Op

func (m *ScaleMutation) Op() Op

Op returns the operation name.

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.

func (*ScaleSelect) Strings

func (ss *ScaleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ScaleSelect) StringsX

func (ss *ScaleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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 Scales

type Scales []*Scale

Scales is a parsable slice of Scale.

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

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) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

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) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its 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) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

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.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

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

func (e UserEdges) DatasetsOrErr() ([]*Dataset, error)

DatasetsOrErr returns the Datasets value or an error if the edge was not loaded in eager-loading.

func (UserEdges) IndicatorsOrErr

func (e UserEdges) IndicatorsOrErr() ([]*Indicator, error)

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.

func (*UserGroupBy) Strings

func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) StringsX

func (ugb *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

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

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

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) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

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) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

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) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

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) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit adds a limit step to the query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset adds an offset step to the query.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

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

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

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) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order adds an order step to the query.

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) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

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.

func (*UserSelect) Strings

func (us *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (us *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

Delete returns a delete builder for UserSettings.

func (*UserSettingsClient) DeleteOne

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

Get returns a UserSettings entity by its id.

func (*UserSettingsClient) GetX

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

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

Update returns an update builder for UserSettings.

func (*UserSettingsClient) UpdateOne

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

Save creates the UserSettings in the database.

func (*UserSettingsCreate) SaveX

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

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

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.

func (*UserSettingsGroupBy) Strings

func (usgb *UserSettingsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*UserSettingsGroupBy) StringsX

func (usgb *UserSettingsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

func (m *UserSettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

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.

func (*UserSettingsSelect) Strings

func (uss *UserSettingsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSettingsSelect) StringsX

func (uss *UserSettingsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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

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

Save executes the query and returns the updated UserSettings entity.

func (*UserSettingsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserSettingsUpdateOne) SetUser

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 Users

type Users []*User

Users is a parsable slice of User.

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.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL