ent

package
v0.0.0-...-86b7a09 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 27 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.
	TypeActiveSession = "ActiveSession"
	TypeCandle        = "Candle"
	TypeIndicator     = "Indicator"
	TypeIndicatorData = "IndicatorData"
	TypeStudySession  = "StudySession"
	TypeSymbol        = "Symbol"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

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 validation 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 ActiveSession

type ActiveSession struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// WebSocket session identifier
	SessionID string `json:"session_id,omitempty"`
	// Exchange identifier
	Exchange string `json:"exchange,omitempty"`
	// Symbol identifier
	SymbolName string `json:"symbol_name,omitempty"`
	// Type of market data subscription
	Type activesession.Type `json:"type,omitempty"`
	// Timeframe for candle subscriptions
	Timeframe *activesession.Timeframe `json:"timeframe,omitempty"`
	// Current subscription status
	Status activesession.Status `json:"status,omitempty"`
	// Whether subscription is enabled
	Enabled bool `json:"enabled,omitempty"`
	// Last time data was received
	LastUpdate time.Time `json:"last_update,omitempty"`
	// Number of messages received
	MessageCount int64 `json:"message_count,omitempty"`
	// Last error message if any
	ErrorMessage string `json:"error_message,omitempty"`
	// Additional subscription parameters
	SubscriptionParams map[string]interface{} `json:"subscription_params,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ActiveSessionQuery when eager-loading is set.
	Edges ActiveSessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

ActiveSession is the model entity for the ActiveSession schema.

func (*ActiveSession) QuerySymbol

func (as *ActiveSession) QuerySymbol() *SymbolQuery

QuerySymbol queries the "symbol" edge of the ActiveSession entity.

func (*ActiveSession) String

func (as *ActiveSession) String() string

String implements the fmt.Stringer.

func (*ActiveSession) Unwrap

func (as *ActiveSession) Unwrap() *ActiveSession

Unwrap unwraps the ActiveSession 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 (*ActiveSession) Update

func (as *ActiveSession) Update() *ActiveSessionUpdateOne

Update returns a builder for updating this ActiveSession. Note that you need to call ActiveSession.Unwrap() before calling this method if this ActiveSession was returned from a transaction, and the transaction was committed or rolled back.

func (*ActiveSession) Value

func (as *ActiveSession) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ActiveSession. This includes values selected through modifiers, order, etc.

type ActiveSessionClient

type ActiveSessionClient struct {
	// contains filtered or unexported fields
}

ActiveSessionClient is a client for the ActiveSession schema.

func NewActiveSessionClient

func NewActiveSessionClient(c config) *ActiveSessionClient

NewActiveSessionClient returns a client for the ActiveSession from the given config.

func (*ActiveSessionClient) Create

Create returns a builder for creating a ActiveSession entity.

func (*ActiveSessionClient) CreateBulk

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

func (*ActiveSessionClient) Delete

Delete returns a delete builder for ActiveSession.

func (*ActiveSessionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ActiveSessionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ActiveSessionClient) Get

Get returns a ActiveSession entity by its id.

func (*ActiveSessionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ActiveSessionClient) Hooks

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

Hooks returns the client hooks.

func (*ActiveSessionClient) Intercept

func (c *ActiveSessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `activesession.Intercept(f(g(h())))`.

func (*ActiveSessionClient) Interceptors

func (c *ActiveSessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ActiveSessionClient) MapCreateBulk

func (c *ActiveSessionClient) MapCreateBulk(slice any, setFunc func(*ActiveSessionCreate, int)) *ActiveSessionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ActiveSessionClient) Query

Query returns a query builder for ActiveSession.

func (*ActiveSessionClient) QuerySymbol

func (c *ActiveSessionClient) QuerySymbol(as *ActiveSession) *SymbolQuery

QuerySymbol queries the symbol edge of a ActiveSession.

func (*ActiveSessionClient) Update

Update returns an update builder for ActiveSession.

func (*ActiveSessionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ActiveSessionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ActiveSessionClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `activesession.Hooks(f(g(h())))`.

type ActiveSessionCreate

type ActiveSessionCreate struct {
	// contains filtered or unexported fields
}

ActiveSessionCreate is the builder for creating a ActiveSession entity.

func (*ActiveSessionCreate) Exec

func (asc *ActiveSessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ActiveSessionCreate) ExecX

func (asc *ActiveSessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionCreate) Mutation

func (asc *ActiveSessionCreate) Mutation() *ActiveSessionMutation

Mutation returns the ActiveSessionMutation object of the builder.

func (*ActiveSessionCreate) Save

Save creates the ActiveSession in the database.

func (*ActiveSessionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ActiveSessionCreate) SetCreatedAt

func (asc *ActiveSessionCreate) SetCreatedAt(t time.Time) *ActiveSessionCreate

SetCreatedAt sets the "created_at" field.

func (*ActiveSessionCreate) SetEnabled

func (asc *ActiveSessionCreate) SetEnabled(b bool) *ActiveSessionCreate

SetEnabled sets the "enabled" field.

func (*ActiveSessionCreate) SetErrorMessage

func (asc *ActiveSessionCreate) SetErrorMessage(s string) *ActiveSessionCreate

SetErrorMessage sets the "error_message" field.

func (*ActiveSessionCreate) SetExchange

func (asc *ActiveSessionCreate) SetExchange(s string) *ActiveSessionCreate

SetExchange sets the "exchange" field.

func (*ActiveSessionCreate) SetID

SetID sets the "id" field.

func (*ActiveSessionCreate) SetLastUpdate

func (asc *ActiveSessionCreate) SetLastUpdate(t time.Time) *ActiveSessionCreate

SetLastUpdate sets the "last_update" field.

func (*ActiveSessionCreate) SetMessageCount

func (asc *ActiveSessionCreate) SetMessageCount(i int64) *ActiveSessionCreate

SetMessageCount sets the "message_count" field.

func (*ActiveSessionCreate) SetNillableCreatedAt

func (asc *ActiveSessionCreate) SetNillableCreatedAt(t *time.Time) *ActiveSessionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableEnabled

func (asc *ActiveSessionCreate) SetNillableEnabled(b *bool) *ActiveSessionCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableErrorMessage

func (asc *ActiveSessionCreate) SetNillableErrorMessage(s *string) *ActiveSessionCreate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableID

func (asc *ActiveSessionCreate) SetNillableID(u *uuid.UUID) *ActiveSessionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableLastUpdate

func (asc *ActiveSessionCreate) SetNillableLastUpdate(t *time.Time) *ActiveSessionCreate

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableMessageCount

func (asc *ActiveSessionCreate) SetNillableMessageCount(i *int64) *ActiveSessionCreate

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableStatus

func (asc *ActiveSessionCreate) SetNillableStatus(a *activesession.Status) *ActiveSessionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableSymbolID

func (asc *ActiveSessionCreate) SetNillableSymbolID(id *uuid.UUID) *ActiveSessionCreate

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*ActiveSessionCreate) SetNillableTimeframe

func (asc *ActiveSessionCreate) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionCreate

SetNillableTimeframe sets the "timeframe" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableType

func (asc *ActiveSessionCreate) SetNillableType(a *activesession.Type) *ActiveSessionCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*ActiveSessionCreate) SetNillableUpdatedAt

func (asc *ActiveSessionCreate) SetNillableUpdatedAt(t *time.Time) *ActiveSessionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ActiveSessionCreate) SetSessionID

func (asc *ActiveSessionCreate) SetSessionID(s string) *ActiveSessionCreate

SetSessionID sets the "session_id" field.

func (*ActiveSessionCreate) SetStatus

SetStatus sets the "status" field.

func (*ActiveSessionCreate) SetSubscriptionParams

func (asc *ActiveSessionCreate) SetSubscriptionParams(m map[string]interface{}) *ActiveSessionCreate

SetSubscriptionParams sets the "subscription_params" field.

func (*ActiveSessionCreate) SetSymbol

func (asc *ActiveSessionCreate) SetSymbol(s *Symbol) *ActiveSessionCreate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*ActiveSessionCreate) SetSymbolID

func (asc *ActiveSessionCreate) SetSymbolID(id uuid.UUID) *ActiveSessionCreate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*ActiveSessionCreate) SetSymbolName

func (asc *ActiveSessionCreate) SetSymbolName(s string) *ActiveSessionCreate

SetSymbolName sets the "symbol_name" field.

func (*ActiveSessionCreate) SetTimeframe

SetTimeframe sets the "timeframe" field.

func (*ActiveSessionCreate) SetType

SetType sets the "type" field.

func (*ActiveSessionCreate) SetUpdatedAt

func (asc *ActiveSessionCreate) SetUpdatedAt(t time.Time) *ActiveSessionCreate

SetUpdatedAt sets the "updated_at" field.

type ActiveSessionCreateBulk

type ActiveSessionCreateBulk struct {
	// contains filtered or unexported fields
}

ActiveSessionCreateBulk is the builder for creating many ActiveSession entities in bulk.

func (*ActiveSessionCreateBulk) Exec

func (ascb *ActiveSessionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ActiveSessionCreateBulk) ExecX

func (ascb *ActiveSessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionCreateBulk) Save

Save creates the ActiveSession entities in the database.

func (*ActiveSessionCreateBulk) SaveX

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

type ActiveSessionDelete

type ActiveSessionDelete struct {
	// contains filtered or unexported fields
}

ActiveSessionDelete is the builder for deleting a ActiveSession entity.

func (*ActiveSessionDelete) Exec

func (asd *ActiveSessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ActiveSessionDelete) ExecX

func (asd *ActiveSessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionDelete) Where

Where appends a list predicates to the ActiveSessionDelete builder.

type ActiveSessionDeleteOne

type ActiveSessionDeleteOne struct {
	// contains filtered or unexported fields
}

ActiveSessionDeleteOne is the builder for deleting a single ActiveSession entity.

func (*ActiveSessionDeleteOne) Exec

func (asdo *ActiveSessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ActiveSessionDeleteOne) ExecX

func (asdo *ActiveSessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionDeleteOne) Where

Where appends a list predicates to the ActiveSessionDelete builder.

type ActiveSessionEdges

type ActiveSessionEdges struct {
	// Symbol being subscribed to
	Symbol *Symbol `json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

ActiveSessionEdges holds the relations/edges for other nodes in the graph.

func (ActiveSessionEdges) SymbolOrErr

func (e ActiveSessionEdges) SymbolOrErr() (*Symbol, error)

SymbolOrErr returns the Symbol value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ActiveSessionGroupBy

type ActiveSessionGroupBy struct {
	// contains filtered or unexported fields
}

ActiveSessionGroupBy is the group-by builder for ActiveSession entities.

func (*ActiveSessionGroupBy) Aggregate

func (asgb *ActiveSessionGroupBy) Aggregate(fns ...AggregateFunc) *ActiveSessionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ActiveSessionGroupBy) Bool

func (s *ActiveSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) BoolX

func (s *ActiveSessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ActiveSessionGroupBy) Bools

func (s *ActiveSessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) BoolsX

func (s *ActiveSessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ActiveSessionGroupBy) Float64

func (s *ActiveSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) Float64X

func (s *ActiveSessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ActiveSessionGroupBy) Float64s

func (s *ActiveSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) Float64sX

func (s *ActiveSessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ActiveSessionGroupBy) Int

func (s *ActiveSessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) IntX

func (s *ActiveSessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ActiveSessionGroupBy) Ints

func (s *ActiveSessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) IntsX

func (s *ActiveSessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ActiveSessionGroupBy) Scan

func (asgb *ActiveSessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ActiveSessionGroupBy) ScanX

func (s *ActiveSessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ActiveSessionGroupBy) String

func (s *ActiveSessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ActiveSessionGroupBy) StringX

func (s *ActiveSessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ActiveSessionGroupBy) Strings

func (s *ActiveSessionGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ActiveSessionGroupBy) StringsX

func (s *ActiveSessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ActiveSessionMutation

type ActiveSessionMutation struct {
	// contains filtered or unexported fields
}

ActiveSessionMutation represents an operation that mutates the ActiveSession nodes in the graph.

func (*ActiveSessionMutation) AddField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) AddMessageCount

func (m *ActiveSessionMutation) AddMessageCount(i int64)

AddMessageCount adds i to the "message_count" field.

func (*ActiveSessionMutation) AddedEdges

func (m *ActiveSessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ActiveSessionMutation) AddedField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) AddedFields

func (m *ActiveSessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ActiveSessionMutation) AddedIDs

func (m *ActiveSessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ActiveSessionMutation) AddedMessageCount

func (m *ActiveSessionMutation) AddedMessageCount() (r int64, exists bool)

AddedMessageCount returns the value that was added to the "message_count" field in this mutation.

func (*ActiveSessionMutation) ClearEdge

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) ClearErrorMessage

func (m *ActiveSessionMutation) ClearErrorMessage()

ClearErrorMessage clears the value of the "error_message" field.

func (*ActiveSessionMutation) ClearField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) ClearLastUpdate

func (m *ActiveSessionMutation) ClearLastUpdate()

ClearLastUpdate clears the value of the "last_update" field.

func (*ActiveSessionMutation) ClearSubscriptionParams

func (m *ActiveSessionMutation) ClearSubscriptionParams()

ClearSubscriptionParams clears the value of the "subscription_params" field.

func (*ActiveSessionMutation) ClearSymbol

func (m *ActiveSessionMutation) ClearSymbol()

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*ActiveSessionMutation) ClearTimeframe

func (m *ActiveSessionMutation) ClearTimeframe()

ClearTimeframe clears the value of the "timeframe" field.

func (*ActiveSessionMutation) ClearedEdges

func (m *ActiveSessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ActiveSessionMutation) ClearedFields

func (m *ActiveSessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ActiveSessionMutation) Client

func (m ActiveSessionMutation) 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 (*ActiveSessionMutation) CreatedAt

func (m *ActiveSessionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ActiveSessionMutation) EdgeCleared

func (m *ActiveSessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ActiveSessionMutation) Enabled

func (m *ActiveSessionMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*ActiveSessionMutation) ErrorMessage

func (m *ActiveSessionMutation) ErrorMessage() (r string, exists bool)

ErrorMessage returns the value of the "error_message" field in the mutation.

func (*ActiveSessionMutation) ErrorMessageCleared

func (m *ActiveSessionMutation) ErrorMessageCleared() bool

ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.

func (*ActiveSessionMutation) Exchange

func (m *ActiveSessionMutation) Exchange() (r string, exists bool)

Exchange returns the value of the "exchange" field in the mutation.

func (*ActiveSessionMutation) Field

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) FieldCleared

func (m *ActiveSessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ActiveSessionMutation) Fields

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) GetType

func (m *ActiveSessionMutation) GetType() (r activesession.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ActiveSessionMutation) ID

func (m *ActiveSessionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ActiveSessionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ActiveSessionMutation) LastUpdate

func (m *ActiveSessionMutation) LastUpdate() (r time.Time, exists bool)

LastUpdate returns the value of the "last_update" field in the mutation.

func (*ActiveSessionMutation) LastUpdateCleared

func (m *ActiveSessionMutation) LastUpdateCleared() bool

LastUpdateCleared returns if the "last_update" field was cleared in this mutation.

func (*ActiveSessionMutation) MessageCount

func (m *ActiveSessionMutation) MessageCount() (r int64, exists bool)

MessageCount returns the value of the "message_count" field in the mutation.

func (*ActiveSessionMutation) OldCreatedAt

func (m *ActiveSessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldEnabled

func (m *ActiveSessionMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldErrorMessage

func (m *ActiveSessionMutation) OldErrorMessage(ctx context.Context) (v string, err error)

OldErrorMessage returns the old "error_message" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldExchange

func (m *ActiveSessionMutation) OldExchange(ctx context.Context) (v string, err error)

OldExchange returns the old "exchange" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) OldLastUpdate

func (m *ActiveSessionMutation) OldLastUpdate(ctx context.Context) (v time.Time, err error)

OldLastUpdate returns the old "last_update" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldMessageCount

func (m *ActiveSessionMutation) OldMessageCount(ctx context.Context) (v int64, err error)

OldMessageCount returns the old "message_count" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldSessionID

func (m *ActiveSessionMutation) OldSessionID(ctx context.Context) (v string, err error)

OldSessionID returns the old "session_id" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldStatus

func (m *ActiveSessionMutation) OldStatus(ctx context.Context) (v activesession.Status, err error)

OldStatus returns the old "status" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldSubscriptionParams

func (m *ActiveSessionMutation) OldSubscriptionParams(ctx context.Context) (v map[string]interface{}, err error)

OldSubscriptionParams returns the old "subscription_params" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldSymbolName

func (m *ActiveSessionMutation) OldSymbolName(ctx context.Context) (v string, err error)

OldSymbolName returns the old "symbol_name" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldTimeframe

func (m *ActiveSessionMutation) OldTimeframe(ctx context.Context) (v *activesession.Timeframe, err error)

OldTimeframe returns the old "timeframe" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldType

func (m *ActiveSessionMutation) OldType(ctx context.Context) (v activesession.Type, err error)

OldType returns the old "type" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) OldUpdatedAt

func (m *ActiveSessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ActiveSession entity. If the ActiveSession 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 (*ActiveSessionMutation) Op

func (m *ActiveSessionMutation) Op() Op

Op returns the operation name.

func (*ActiveSessionMutation) RemovedEdges

func (m *ActiveSessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ActiveSessionMutation) RemovedIDs

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) ResetCreatedAt

func (m *ActiveSessionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ActiveSessionMutation) ResetEdge

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) ResetEnabled

func (m *ActiveSessionMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*ActiveSessionMutation) ResetErrorMessage

func (m *ActiveSessionMutation) ResetErrorMessage()

ResetErrorMessage resets all changes to the "error_message" field.

func (*ActiveSessionMutation) ResetExchange

func (m *ActiveSessionMutation) ResetExchange()

ResetExchange resets all changes to the "exchange" field.

func (*ActiveSessionMutation) ResetField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) ResetLastUpdate

func (m *ActiveSessionMutation) ResetLastUpdate()

ResetLastUpdate resets all changes to the "last_update" field.

func (*ActiveSessionMutation) ResetMessageCount

func (m *ActiveSessionMutation) ResetMessageCount()

ResetMessageCount resets all changes to the "message_count" field.

func (*ActiveSessionMutation) ResetSessionID

func (m *ActiveSessionMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*ActiveSessionMutation) ResetStatus

func (m *ActiveSessionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ActiveSessionMutation) ResetSubscriptionParams

func (m *ActiveSessionMutation) ResetSubscriptionParams()

ResetSubscriptionParams resets all changes to the "subscription_params" field.

func (*ActiveSessionMutation) ResetSymbol

func (m *ActiveSessionMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" edge.

func (*ActiveSessionMutation) ResetSymbolName

func (m *ActiveSessionMutation) ResetSymbolName()

ResetSymbolName resets all changes to the "symbol_name" field.

func (*ActiveSessionMutation) ResetTimeframe

func (m *ActiveSessionMutation) ResetTimeframe()

ResetTimeframe resets all changes to the "timeframe" field.

func (*ActiveSessionMutation) ResetType

func (m *ActiveSessionMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ActiveSessionMutation) ResetUpdatedAt

func (m *ActiveSessionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ActiveSessionMutation) SessionID

func (m *ActiveSessionMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*ActiveSessionMutation) SetCreatedAt

func (m *ActiveSessionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ActiveSessionMutation) SetEnabled

func (m *ActiveSessionMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*ActiveSessionMutation) SetErrorMessage

func (m *ActiveSessionMutation) SetErrorMessage(s string)

SetErrorMessage sets the "error_message" field.

func (*ActiveSessionMutation) SetExchange

func (m *ActiveSessionMutation) SetExchange(s string)

SetExchange sets the "exchange" field.

func (*ActiveSessionMutation) SetField

func (m *ActiveSessionMutation) 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 (*ActiveSessionMutation) SetID

func (m *ActiveSessionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ActiveSession entities.

func (*ActiveSessionMutation) SetLastUpdate

func (m *ActiveSessionMutation) SetLastUpdate(t time.Time)

SetLastUpdate sets the "last_update" field.

func (*ActiveSessionMutation) SetMessageCount

func (m *ActiveSessionMutation) SetMessageCount(i int64)

SetMessageCount sets the "message_count" field.

func (*ActiveSessionMutation) SetOp

func (m *ActiveSessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ActiveSessionMutation) SetSessionID

func (m *ActiveSessionMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*ActiveSessionMutation) SetStatus

func (m *ActiveSessionMutation) SetStatus(a activesession.Status)

SetStatus sets the "status" field.

func (*ActiveSessionMutation) SetSubscriptionParams

func (m *ActiveSessionMutation) SetSubscriptionParams(value map[string]interface{})

SetSubscriptionParams sets the "subscription_params" field.

func (*ActiveSessionMutation) SetSymbolID

func (m *ActiveSessionMutation) SetSymbolID(id uuid.UUID)

SetSymbolID sets the "symbol" edge to the Symbol entity by id.

func (*ActiveSessionMutation) SetSymbolName

func (m *ActiveSessionMutation) SetSymbolName(s string)

SetSymbolName sets the "symbol_name" field.

func (*ActiveSessionMutation) SetTimeframe

func (m *ActiveSessionMutation) SetTimeframe(a activesession.Timeframe)

SetTimeframe sets the "timeframe" field.

func (*ActiveSessionMutation) SetType

SetType sets the "type" field.

func (*ActiveSessionMutation) SetUpdatedAt

func (m *ActiveSessionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ActiveSessionMutation) Status

func (m *ActiveSessionMutation) Status() (r activesession.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ActiveSessionMutation) SubscriptionParams

func (m *ActiveSessionMutation) SubscriptionParams() (r map[string]interface{}, exists bool)

SubscriptionParams returns the value of the "subscription_params" field in the mutation.

func (*ActiveSessionMutation) SubscriptionParamsCleared

func (m *ActiveSessionMutation) SubscriptionParamsCleared() bool

SubscriptionParamsCleared returns if the "subscription_params" field was cleared in this mutation.

func (*ActiveSessionMutation) SymbolCleared

func (m *ActiveSessionMutation) SymbolCleared() bool

SymbolCleared reports if the "symbol" edge to the Symbol entity was cleared.

func (*ActiveSessionMutation) SymbolID

func (m *ActiveSessionMutation) SymbolID() (id uuid.UUID, exists bool)

SymbolID returns the "symbol" edge ID in the mutation.

func (*ActiveSessionMutation) SymbolIDs

func (m *ActiveSessionMutation) SymbolIDs() (ids []uuid.UUID)

SymbolIDs returns the "symbol" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SymbolID instead. It exists only for internal usage by the builders.

func (*ActiveSessionMutation) SymbolName

func (m *ActiveSessionMutation) SymbolName() (r string, exists bool)

SymbolName returns the value of the "symbol_name" field in the mutation.

func (*ActiveSessionMutation) Timeframe

func (m *ActiveSessionMutation) Timeframe() (r activesession.Timeframe, exists bool)

Timeframe returns the value of the "timeframe" field in the mutation.

func (*ActiveSessionMutation) TimeframeCleared

func (m *ActiveSessionMutation) TimeframeCleared() bool

TimeframeCleared returns if the "timeframe" field was cleared in this mutation.

func (ActiveSessionMutation) Tx

func (m ActiveSessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ActiveSessionMutation) Type

func (m *ActiveSessionMutation) Type() string

Type returns the node type of this mutation (ActiveSession).

func (*ActiveSessionMutation) UpdatedAt

func (m *ActiveSessionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ActiveSessionMutation) Where

Where appends a list predicates to the ActiveSessionMutation builder.

func (*ActiveSessionMutation) WhereP

func (m *ActiveSessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ActiveSessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ActiveSessionQuery

type ActiveSessionQuery struct {
	// contains filtered or unexported fields
}

ActiveSessionQuery is the builder for querying ActiveSession entities.

func (*ActiveSessionQuery) Aggregate

func (asq *ActiveSessionQuery) Aggregate(fns ...AggregateFunc) *ActiveSessionSelect

Aggregate returns a ActiveSessionSelect configured with the given aggregations.

func (*ActiveSessionQuery) All

All executes the query and returns a list of ActiveSessions.

func (*ActiveSessionQuery) AllX

func (asq *ActiveSessionQuery) AllX(ctx context.Context) []*ActiveSession

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

func (*ActiveSessionQuery) Clone

func (asq *ActiveSessionQuery) Clone() *ActiveSessionQuery

Clone returns a duplicate of the ActiveSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ActiveSessionQuery) Count

func (asq *ActiveSessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ActiveSessionQuery) CountX

func (asq *ActiveSessionQuery) CountX(ctx context.Context) int

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

func (*ActiveSessionQuery) Exist

func (asq *ActiveSessionQuery) Exist(ctx context.Context) (bool, error)

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

func (*ActiveSessionQuery) ExistX

func (asq *ActiveSessionQuery) ExistX(ctx context.Context) bool

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

func (*ActiveSessionQuery) First

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

func (*ActiveSessionQuery) FirstID

func (asq *ActiveSessionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ActiveSessionQuery) FirstIDX

func (asq *ActiveSessionQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*ActiveSessionQuery) FirstX

func (asq *ActiveSessionQuery) FirstX(ctx context.Context) *ActiveSession

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

func (*ActiveSessionQuery) GroupBy

func (asq *ActiveSessionQuery) GroupBy(field string, fields ...string) *ActiveSessionGroupBy

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 {
	SessionID string `json:"session_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ActiveSession.Query().
	GroupBy(activesession.FieldSessionID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ActiveSessionQuery) IDs

func (asq *ActiveSessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*ActiveSessionQuery) IDsX

func (asq *ActiveSessionQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*ActiveSessionQuery) Limit

func (asq *ActiveSessionQuery) Limit(limit int) *ActiveSessionQuery

Limit the number of records to be returned by this query.

func (*ActiveSessionQuery) Offset

func (asq *ActiveSessionQuery) Offset(offset int) *ActiveSessionQuery

Offset to start from.

func (*ActiveSessionQuery) Only

Only returns a single ActiveSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ActiveSession entity is found. Returns a *NotFoundError when no ActiveSession entities are found.

func (*ActiveSessionQuery) OnlyID

func (asq *ActiveSessionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ActiveSession ID in the query. Returns a *NotSingularError when more than one ActiveSession ID is found. Returns a *NotFoundError when no entities are found.

func (*ActiveSessionQuery) OnlyIDX

func (asq *ActiveSessionQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*ActiveSessionQuery) OnlyX

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

func (*ActiveSessionQuery) Order

Order specifies how the records should be ordered.

func (*ActiveSessionQuery) QuerySymbol

func (asq *ActiveSessionQuery) QuerySymbol() *SymbolQuery

QuerySymbol chains the current query on the "symbol" edge.

func (*ActiveSessionQuery) Select

func (asq *ActiveSessionQuery) Select(fields ...string) *ActiveSessionSelect

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 {
	SessionID string `json:"session_id,omitempty"`
}

client.ActiveSession.Query().
	Select(activesession.FieldSessionID).
	Scan(ctx, &v)

func (*ActiveSessionQuery) Unique

func (asq *ActiveSessionQuery) Unique(unique bool) *ActiveSessionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ActiveSessionQuery) Where

Where adds a new predicate for the ActiveSessionQuery builder.

func (*ActiveSessionQuery) WithSymbol

func (asq *ActiveSessionQuery) WithSymbol(opts ...func(*SymbolQuery)) *ActiveSessionQuery

WithSymbol tells the query-builder to eager-load the nodes that are connected to the "symbol" edge. The optional arguments are used to configure the query builder of the edge.

type ActiveSessionSelect

type ActiveSessionSelect struct {
	*ActiveSessionQuery
	// contains filtered or unexported fields
}

ActiveSessionSelect is the builder for selecting fields of ActiveSession entities.

func (*ActiveSessionSelect) Aggregate

func (ass *ActiveSessionSelect) Aggregate(fns ...AggregateFunc) *ActiveSessionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ActiveSessionSelect) Bool

func (s *ActiveSessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) BoolX

func (s *ActiveSessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ActiveSessionSelect) Bools

func (s *ActiveSessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) BoolsX

func (s *ActiveSessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ActiveSessionSelect) Float64

func (s *ActiveSessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) Float64X

func (s *ActiveSessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ActiveSessionSelect) Float64s

func (s *ActiveSessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) Float64sX

func (s *ActiveSessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ActiveSessionSelect) Int

func (s *ActiveSessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) IntX

func (s *ActiveSessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ActiveSessionSelect) Ints

func (s *ActiveSessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) IntsX

func (s *ActiveSessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ActiveSessionSelect) Scan

func (ass *ActiveSessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ActiveSessionSelect) ScanX

func (s *ActiveSessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ActiveSessionSelect) String

func (s *ActiveSessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ActiveSessionSelect) StringX

func (s *ActiveSessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ActiveSessionSelect) Strings

func (s *ActiveSessionSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ActiveSessionSelect) StringsX

func (s *ActiveSessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ActiveSessionUpdate

type ActiveSessionUpdate struct {
	// contains filtered or unexported fields
}

ActiveSessionUpdate is the builder for updating ActiveSession entities.

func (*ActiveSessionUpdate) AddMessageCount

func (asu *ActiveSessionUpdate) AddMessageCount(i int64) *ActiveSessionUpdate

AddMessageCount adds i to the "message_count" field.

func (*ActiveSessionUpdate) ClearErrorMessage

func (asu *ActiveSessionUpdate) ClearErrorMessage() *ActiveSessionUpdate

ClearErrorMessage clears the value of the "error_message" field.

func (*ActiveSessionUpdate) ClearLastUpdate

func (asu *ActiveSessionUpdate) ClearLastUpdate() *ActiveSessionUpdate

ClearLastUpdate clears the value of the "last_update" field.

func (*ActiveSessionUpdate) ClearSubscriptionParams

func (asu *ActiveSessionUpdate) ClearSubscriptionParams() *ActiveSessionUpdate

ClearSubscriptionParams clears the value of the "subscription_params" field.

func (*ActiveSessionUpdate) ClearSymbol

func (asu *ActiveSessionUpdate) ClearSymbol() *ActiveSessionUpdate

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*ActiveSessionUpdate) ClearTimeframe

func (asu *ActiveSessionUpdate) ClearTimeframe() *ActiveSessionUpdate

ClearTimeframe clears the value of the "timeframe" field.

func (*ActiveSessionUpdate) Exec

func (asu *ActiveSessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ActiveSessionUpdate) ExecX

func (asu *ActiveSessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionUpdate) Mutation

func (asu *ActiveSessionUpdate) Mutation() *ActiveSessionMutation

Mutation returns the ActiveSessionMutation object of the builder.

func (*ActiveSessionUpdate) Save

func (asu *ActiveSessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ActiveSessionUpdate) SaveX

func (asu *ActiveSessionUpdate) SaveX(ctx context.Context) int

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

func (*ActiveSessionUpdate) SetEnabled

func (asu *ActiveSessionUpdate) SetEnabled(b bool) *ActiveSessionUpdate

SetEnabled sets the "enabled" field.

func (*ActiveSessionUpdate) SetErrorMessage

func (asu *ActiveSessionUpdate) SetErrorMessage(s string) *ActiveSessionUpdate

SetErrorMessage sets the "error_message" field.

func (*ActiveSessionUpdate) SetExchange

func (asu *ActiveSessionUpdate) SetExchange(s string) *ActiveSessionUpdate

SetExchange sets the "exchange" field.

func (*ActiveSessionUpdate) SetLastUpdate

func (asu *ActiveSessionUpdate) SetLastUpdate(t time.Time) *ActiveSessionUpdate

SetLastUpdate sets the "last_update" field.

func (*ActiveSessionUpdate) SetMessageCount

func (asu *ActiveSessionUpdate) SetMessageCount(i int64) *ActiveSessionUpdate

SetMessageCount sets the "message_count" field.

func (*ActiveSessionUpdate) SetNillableEnabled

func (asu *ActiveSessionUpdate) SetNillableEnabled(b *bool) *ActiveSessionUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableErrorMessage

func (asu *ActiveSessionUpdate) SetNillableErrorMessage(s *string) *ActiveSessionUpdate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableExchange

func (asu *ActiveSessionUpdate) SetNillableExchange(s *string) *ActiveSessionUpdate

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableLastUpdate

func (asu *ActiveSessionUpdate) SetNillableLastUpdate(t *time.Time) *ActiveSessionUpdate

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableMessageCount

func (asu *ActiveSessionUpdate) SetNillableMessageCount(i *int64) *ActiveSessionUpdate

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableSessionID

func (asu *ActiveSessionUpdate) SetNillableSessionID(s *string) *ActiveSessionUpdate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableStatus

func (asu *ActiveSessionUpdate) SetNillableStatus(a *activesession.Status) *ActiveSessionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableSymbolID

func (asu *ActiveSessionUpdate) SetNillableSymbolID(id *uuid.UUID) *ActiveSessionUpdate

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableSymbolName

func (asu *ActiveSessionUpdate) SetNillableSymbolName(s *string) *ActiveSessionUpdate

SetNillableSymbolName sets the "symbol_name" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableTimeframe

func (asu *ActiveSessionUpdate) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionUpdate

SetNillableTimeframe sets the "timeframe" field if the given value is not nil.

func (*ActiveSessionUpdate) SetNillableType

func (asu *ActiveSessionUpdate) SetNillableType(a *activesession.Type) *ActiveSessionUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*ActiveSessionUpdate) SetSessionID

func (asu *ActiveSessionUpdate) SetSessionID(s string) *ActiveSessionUpdate

SetSessionID sets the "session_id" field.

func (*ActiveSessionUpdate) SetStatus

SetStatus sets the "status" field.

func (*ActiveSessionUpdate) SetSubscriptionParams

func (asu *ActiveSessionUpdate) SetSubscriptionParams(m map[string]interface{}) *ActiveSessionUpdate

SetSubscriptionParams sets the "subscription_params" field.

func (*ActiveSessionUpdate) SetSymbol

func (asu *ActiveSessionUpdate) SetSymbol(s *Symbol) *ActiveSessionUpdate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*ActiveSessionUpdate) SetSymbolID

func (asu *ActiveSessionUpdate) SetSymbolID(id uuid.UUID) *ActiveSessionUpdate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*ActiveSessionUpdate) SetSymbolName

func (asu *ActiveSessionUpdate) SetSymbolName(s string) *ActiveSessionUpdate

SetSymbolName sets the "symbol_name" field.

func (*ActiveSessionUpdate) SetTimeframe

SetTimeframe sets the "timeframe" field.

func (*ActiveSessionUpdate) SetType

SetType sets the "type" field.

func (*ActiveSessionUpdate) SetUpdatedAt

func (asu *ActiveSessionUpdate) SetUpdatedAt(t time.Time) *ActiveSessionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ActiveSessionUpdate) Where

Where appends a list predicates to the ActiveSessionUpdate builder.

type ActiveSessionUpdateOne

type ActiveSessionUpdateOne struct {
	// contains filtered or unexported fields
}

ActiveSessionUpdateOne is the builder for updating a single ActiveSession entity.

func (*ActiveSessionUpdateOne) AddMessageCount

func (asuo *ActiveSessionUpdateOne) AddMessageCount(i int64) *ActiveSessionUpdateOne

AddMessageCount adds i to the "message_count" field.

func (*ActiveSessionUpdateOne) ClearErrorMessage

func (asuo *ActiveSessionUpdateOne) ClearErrorMessage() *ActiveSessionUpdateOne

ClearErrorMessage clears the value of the "error_message" field.

func (*ActiveSessionUpdateOne) ClearLastUpdate

func (asuo *ActiveSessionUpdateOne) ClearLastUpdate() *ActiveSessionUpdateOne

ClearLastUpdate clears the value of the "last_update" field.

func (*ActiveSessionUpdateOne) ClearSubscriptionParams

func (asuo *ActiveSessionUpdateOne) ClearSubscriptionParams() *ActiveSessionUpdateOne

ClearSubscriptionParams clears the value of the "subscription_params" field.

func (*ActiveSessionUpdateOne) ClearSymbol

func (asuo *ActiveSessionUpdateOne) ClearSymbol() *ActiveSessionUpdateOne

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*ActiveSessionUpdateOne) ClearTimeframe

func (asuo *ActiveSessionUpdateOne) ClearTimeframe() *ActiveSessionUpdateOne

ClearTimeframe clears the value of the "timeframe" field.

func (*ActiveSessionUpdateOne) Exec

func (asuo *ActiveSessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ActiveSessionUpdateOne) ExecX

func (asuo *ActiveSessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ActiveSessionUpdateOne) Mutation

Mutation returns the ActiveSessionMutation object of the builder.

func (*ActiveSessionUpdateOne) Save

Save executes the query and returns the updated ActiveSession entity.

func (*ActiveSessionUpdateOne) SaveX

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

func (*ActiveSessionUpdateOne) Select

func (asuo *ActiveSessionUpdateOne) Select(field string, fields ...string) *ActiveSessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ActiveSessionUpdateOne) SetEnabled

func (asuo *ActiveSessionUpdateOne) SetEnabled(b bool) *ActiveSessionUpdateOne

SetEnabled sets the "enabled" field.

func (*ActiveSessionUpdateOne) SetErrorMessage

func (asuo *ActiveSessionUpdateOne) SetErrorMessage(s string) *ActiveSessionUpdateOne

SetErrorMessage sets the "error_message" field.

func (*ActiveSessionUpdateOne) SetExchange

SetExchange sets the "exchange" field.

func (*ActiveSessionUpdateOne) SetLastUpdate

func (asuo *ActiveSessionUpdateOne) SetLastUpdate(t time.Time) *ActiveSessionUpdateOne

SetLastUpdate sets the "last_update" field.

func (*ActiveSessionUpdateOne) SetMessageCount

func (asuo *ActiveSessionUpdateOne) SetMessageCount(i int64) *ActiveSessionUpdateOne

SetMessageCount sets the "message_count" field.

func (*ActiveSessionUpdateOne) SetNillableEnabled

func (asuo *ActiveSessionUpdateOne) SetNillableEnabled(b *bool) *ActiveSessionUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableErrorMessage

func (asuo *ActiveSessionUpdateOne) SetNillableErrorMessage(s *string) *ActiveSessionUpdateOne

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableExchange

func (asuo *ActiveSessionUpdateOne) SetNillableExchange(s *string) *ActiveSessionUpdateOne

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableLastUpdate

func (asuo *ActiveSessionUpdateOne) SetNillableLastUpdate(t *time.Time) *ActiveSessionUpdateOne

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableMessageCount

func (asuo *ActiveSessionUpdateOne) SetNillableMessageCount(i *int64) *ActiveSessionUpdateOne

SetNillableMessageCount sets the "message_count" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableSessionID

func (asuo *ActiveSessionUpdateOne) SetNillableSessionID(s *string) *ActiveSessionUpdateOne

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableSymbolID

func (asuo *ActiveSessionUpdateOne) SetNillableSymbolID(id *uuid.UUID) *ActiveSessionUpdateOne

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableSymbolName

func (asuo *ActiveSessionUpdateOne) SetNillableSymbolName(s *string) *ActiveSessionUpdateOne

SetNillableSymbolName sets the "symbol_name" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableTimeframe

func (asuo *ActiveSessionUpdateOne) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionUpdateOne

SetNillableTimeframe sets the "timeframe" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*ActiveSessionUpdateOne) SetSessionID

func (asuo *ActiveSessionUpdateOne) SetSessionID(s string) *ActiveSessionUpdateOne

SetSessionID sets the "session_id" field.

func (*ActiveSessionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*ActiveSessionUpdateOne) SetSubscriptionParams

func (asuo *ActiveSessionUpdateOne) SetSubscriptionParams(m map[string]interface{}) *ActiveSessionUpdateOne

SetSubscriptionParams sets the "subscription_params" field.

func (*ActiveSessionUpdateOne) SetSymbol

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*ActiveSessionUpdateOne) SetSymbolID

func (asuo *ActiveSessionUpdateOne) SetSymbolID(id uuid.UUID) *ActiveSessionUpdateOne

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*ActiveSessionUpdateOne) SetSymbolName

func (asuo *ActiveSessionUpdateOne) SetSymbolName(s string) *ActiveSessionUpdateOne

SetSymbolName sets the "symbol_name" field.

func (*ActiveSessionUpdateOne) SetTimeframe

SetTimeframe sets the "timeframe" field.

func (*ActiveSessionUpdateOne) SetType

SetType sets the "type" field.

func (*ActiveSessionUpdateOne) SetUpdatedAt

func (asuo *ActiveSessionUpdateOne) SetUpdatedAt(t time.Time) *ActiveSessionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ActiveSessionUpdateOne) Where

Where appends a list predicates to the ActiveSessionUpdate builder.

type ActiveSessions

type ActiveSessions []*ActiveSession

ActiveSessions is a parsable slice of ActiveSession.

type AggregateFunc

type AggregateFunc func(*sql.Selector) 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 Candle

type Candle struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Exchange identifier
	Exchange string `json:"exchange,omitempty"`
	// Symbol identifier
	SymbolName string `json:"symbol_name,omitempty"`
	// Timeframe of the candle
	Timeframe candle.Timeframe `json:"timeframe,omitempty"`
	// Unix timestamp of candle open time
	Timestamp int64 `json:"timestamp,omitempty"`
	// Human-readable bar time
	BarTime time.Time `json:"bar_time,omitempty"`
	// Opening price
	Open float64 `json:"open,omitempty"`
	// Highest price
	High float64 `json:"high,omitempty"`
	// Lowest price
	Low float64 `json:"low,omitempty"`
	// Closing price
	Close float64 `json:"close,omitempty"`
	// Split/dividend adjusted closing price
	AdjustedClose float64 `json:"adjusted_close,omitempty"`
	// Trading volume
	Volume float64 `json:"volume,omitempty"`
	// Volume weighted average price
	VolumeWeightedPrice float64 `json:"volume_weighted_price,omitempty"`
	// Number of trades in this period
	TradeCount int64 `json:"trade_count,omitempty"`
	// Bid price at close
	Bid float64 `json:"bid,omitempty"`
	// Ask price at close
	Ask float64 `json:"ask,omitempty"`
	// Bid-ask spread
	Spread float64 `json:"spread,omitempty"`
	// Data quality indicator
	Quality candle.Quality `json:"quality,omitempty"`
	// Whether this candle is finalized
	IsComplete bool `json:"is_complete,omitempty"`
	// Data source identifier
	Source string `json:"source,omitempty"`
	// Additional candle metadata
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CandleQuery when eager-loading is set.
	Edges CandleEdges `json:"edges"`
	// contains filtered or unexported fields
}

Candle is the model entity for the Candle schema.

func (*Candle) QuerySymbol

func (c *Candle) QuerySymbol() *SymbolQuery

QuerySymbol queries the "symbol" edge of the Candle entity.

func (*Candle) String

func (c *Candle) String() string

String implements the fmt.Stringer.

func (*Candle) Unwrap

func (c *Candle) Unwrap() *Candle

Unwrap unwraps the Candle 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 (*Candle) Update

func (c *Candle) Update() *CandleUpdateOne

Update returns a builder for updating this Candle. Note that you need to call Candle.Unwrap() before calling this method if this Candle was returned from a transaction, and the transaction was committed or rolled back.

func (*Candle) Value

func (c *Candle) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Candle. This includes values selected through modifiers, order, etc.

type CandleClient

type CandleClient struct {
	// contains filtered or unexported fields
}

CandleClient is a client for the Candle schema.

func NewCandleClient

func NewCandleClient(c config) *CandleClient

NewCandleClient returns a client for the Candle from the given config.

func (*CandleClient) Create

func (c *CandleClient) Create() *CandleCreate

Create returns a builder for creating a Candle entity.

func (*CandleClient) CreateBulk

func (c *CandleClient) CreateBulk(builders ...*CandleCreate) *CandleCreateBulk

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

func (*CandleClient) Delete

func (c *CandleClient) Delete() *CandleDelete

Delete returns a delete builder for Candle.

func (*CandleClient) DeleteOne

func (c *CandleClient) DeleteOne(ca *Candle) *CandleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CandleClient) DeleteOneID

func (c *CandleClient) DeleteOneID(id uuid.UUID) *CandleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CandleClient) Get

func (c *CandleClient) Get(ctx context.Context, id uuid.UUID) (*Candle, error)

Get returns a Candle entity by its id.

func (*CandleClient) GetX

func (c *CandleClient) GetX(ctx context.Context, id uuid.UUID) *Candle

GetX is like Get, but panics if an error occurs.

func (*CandleClient) Hooks

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

Hooks returns the client hooks.

func (*CandleClient) Intercept

func (c *CandleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `candle.Intercept(f(g(h())))`.

func (*CandleClient) Interceptors

func (c *CandleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CandleClient) MapCreateBulk

func (c *CandleClient) MapCreateBulk(slice any, setFunc func(*CandleCreate, int)) *CandleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CandleClient) Query

func (c *CandleClient) Query() *CandleQuery

Query returns a query builder for Candle.

func (*CandleClient) QuerySymbol

func (c *CandleClient) QuerySymbol(ca *Candle) *SymbolQuery

QuerySymbol queries the symbol edge of a Candle.

func (*CandleClient) Update

func (c *CandleClient) Update() *CandleUpdate

Update returns an update builder for Candle.

func (*CandleClient) UpdateOne

func (c *CandleClient) UpdateOne(ca *Candle) *CandleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CandleClient) UpdateOneID

func (c *CandleClient) UpdateOneID(id uuid.UUID) *CandleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CandleClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `candle.Hooks(f(g(h())))`.

type CandleCreate

type CandleCreate struct {
	// contains filtered or unexported fields
}

CandleCreate is the builder for creating a Candle entity.

func (*CandleCreate) Exec

func (cc *CandleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CandleCreate) ExecX

func (cc *CandleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CandleCreate) Mutation

func (cc *CandleCreate) Mutation() *CandleMutation

Mutation returns the CandleMutation object of the builder.

func (*CandleCreate) Save

func (cc *CandleCreate) Save(ctx context.Context) (*Candle, error)

Save creates the Candle in the database.

func (*CandleCreate) SaveX

func (cc *CandleCreate) SaveX(ctx context.Context) *Candle

SaveX calls Save and panics if Save returns an error.

func (*CandleCreate) SetAdjustedClose

func (cc *CandleCreate) SetAdjustedClose(f float64) *CandleCreate

SetAdjustedClose sets the "adjusted_close" field.

func (*CandleCreate) SetAsk

func (cc *CandleCreate) SetAsk(f float64) *CandleCreate

SetAsk sets the "ask" field.

func (*CandleCreate) SetBarTime

func (cc *CandleCreate) SetBarTime(t time.Time) *CandleCreate

SetBarTime sets the "bar_time" field.

func (*CandleCreate) SetBid

func (cc *CandleCreate) SetBid(f float64) *CandleCreate

SetBid sets the "bid" field.

func (*CandleCreate) SetClose

func (cc *CandleCreate) SetClose(f float64) *CandleCreate

SetClose sets the "close" field.

func (*CandleCreate) SetCreatedAt

func (cc *CandleCreate) SetCreatedAt(t time.Time) *CandleCreate

SetCreatedAt sets the "created_at" field.

func (*CandleCreate) SetExchange

func (cc *CandleCreate) SetExchange(s string) *CandleCreate

SetExchange sets the "exchange" field.

func (*CandleCreate) SetHigh

func (cc *CandleCreate) SetHigh(f float64) *CandleCreate

SetHigh sets the "high" field.

func (*CandleCreate) SetID

func (cc *CandleCreate) SetID(u uuid.UUID) *CandleCreate

SetID sets the "id" field.

func (*CandleCreate) SetIsComplete

func (cc *CandleCreate) SetIsComplete(b bool) *CandleCreate

SetIsComplete sets the "is_complete" field.

func (*CandleCreate) SetLow

func (cc *CandleCreate) SetLow(f float64) *CandleCreate

SetLow sets the "low" field.

func (*CandleCreate) SetMetadata

func (cc *CandleCreate) SetMetadata(m map[string]interface{}) *CandleCreate

SetMetadata sets the "metadata" field.

func (*CandleCreate) SetNillableAdjustedClose

func (cc *CandleCreate) SetNillableAdjustedClose(f *float64) *CandleCreate

SetNillableAdjustedClose sets the "adjusted_close" field if the given value is not nil.

func (*CandleCreate) SetNillableAsk

func (cc *CandleCreate) SetNillableAsk(f *float64) *CandleCreate

SetNillableAsk sets the "ask" field if the given value is not nil.

func (*CandleCreate) SetNillableBid

func (cc *CandleCreate) SetNillableBid(f *float64) *CandleCreate

SetNillableBid sets the "bid" field if the given value is not nil.

func (*CandleCreate) SetNillableCreatedAt

func (cc *CandleCreate) SetNillableCreatedAt(t *time.Time) *CandleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*CandleCreate) SetNillableID

func (cc *CandleCreate) SetNillableID(u *uuid.UUID) *CandleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CandleCreate) SetNillableIsComplete

func (cc *CandleCreate) SetNillableIsComplete(b *bool) *CandleCreate

SetNillableIsComplete sets the "is_complete" field if the given value is not nil.

func (*CandleCreate) SetNillableQuality

func (cc *CandleCreate) SetNillableQuality(c *candle.Quality) *CandleCreate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*CandleCreate) SetNillableSource

func (cc *CandleCreate) SetNillableSource(s *string) *CandleCreate

SetNillableSource sets the "source" field if the given value is not nil.

func (*CandleCreate) SetNillableSpread

func (cc *CandleCreate) SetNillableSpread(f *float64) *CandleCreate

SetNillableSpread sets the "spread" field if the given value is not nil.

func (*CandleCreate) SetNillableSymbolID

func (cc *CandleCreate) SetNillableSymbolID(id *uuid.UUID) *CandleCreate

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*CandleCreate) SetNillableTradeCount

func (cc *CandleCreate) SetNillableTradeCount(i *int64) *CandleCreate

SetNillableTradeCount sets the "trade_count" field if the given value is not nil.

func (*CandleCreate) SetNillableUpdatedAt

func (cc *CandleCreate) SetNillableUpdatedAt(t *time.Time) *CandleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*CandleCreate) SetNillableVolumeWeightedPrice

func (cc *CandleCreate) SetNillableVolumeWeightedPrice(f *float64) *CandleCreate

SetNillableVolumeWeightedPrice sets the "volume_weighted_price" field if the given value is not nil.

func (*CandleCreate) SetOpen

func (cc *CandleCreate) SetOpen(f float64) *CandleCreate

SetOpen sets the "open" field.

func (*CandleCreate) SetQuality

func (cc *CandleCreate) SetQuality(c candle.Quality) *CandleCreate

SetQuality sets the "quality" field.

func (*CandleCreate) SetSource

func (cc *CandleCreate) SetSource(s string) *CandleCreate

SetSource sets the "source" field.

func (*CandleCreate) SetSpread

func (cc *CandleCreate) SetSpread(f float64) *CandleCreate

SetSpread sets the "spread" field.

func (*CandleCreate) SetSymbol

func (cc *CandleCreate) SetSymbol(s *Symbol) *CandleCreate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*CandleCreate) SetSymbolID

func (cc *CandleCreate) SetSymbolID(id uuid.UUID) *CandleCreate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*CandleCreate) SetSymbolName

func (cc *CandleCreate) SetSymbolName(s string) *CandleCreate

SetSymbolName sets the "symbol_name" field.

func (*CandleCreate) SetTimeframe

func (cc *CandleCreate) SetTimeframe(c candle.Timeframe) *CandleCreate

SetTimeframe sets the "timeframe" field.

func (*CandleCreate) SetTimestamp

func (cc *CandleCreate) SetTimestamp(i int64) *CandleCreate

SetTimestamp sets the "timestamp" field.

func (*CandleCreate) SetTradeCount

func (cc *CandleCreate) SetTradeCount(i int64) *CandleCreate

SetTradeCount sets the "trade_count" field.

func (*CandleCreate) SetUpdatedAt

func (cc *CandleCreate) SetUpdatedAt(t time.Time) *CandleCreate

SetUpdatedAt sets the "updated_at" field.

func (*CandleCreate) SetVolume

func (cc *CandleCreate) SetVolume(f float64) *CandleCreate

SetVolume sets the "volume" field.

func (*CandleCreate) SetVolumeWeightedPrice

func (cc *CandleCreate) SetVolumeWeightedPrice(f float64) *CandleCreate

SetVolumeWeightedPrice sets the "volume_weighted_price" field.

type CandleCreateBulk

type CandleCreateBulk struct {
	// contains filtered or unexported fields
}

CandleCreateBulk is the builder for creating many Candle entities in bulk.

func (*CandleCreateBulk) Exec

func (ccb *CandleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CandleCreateBulk) ExecX

func (ccb *CandleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CandleCreateBulk) Save

func (ccb *CandleCreateBulk) Save(ctx context.Context) ([]*Candle, error)

Save creates the Candle entities in the database.

func (*CandleCreateBulk) SaveX

func (ccb *CandleCreateBulk) SaveX(ctx context.Context) []*Candle

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

type CandleDelete

type CandleDelete struct {
	// contains filtered or unexported fields
}

CandleDelete is the builder for deleting a Candle entity.

func (*CandleDelete) Exec

func (cd *CandleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CandleDelete) ExecX

func (cd *CandleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CandleDelete) Where

func (cd *CandleDelete) Where(ps ...predicate.Candle) *CandleDelete

Where appends a list predicates to the CandleDelete builder.

type CandleDeleteOne

type CandleDeleteOne struct {
	// contains filtered or unexported fields
}

CandleDeleteOne is the builder for deleting a single Candle entity.

func (*CandleDeleteOne) Exec

func (cdo *CandleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CandleDeleteOne) ExecX

func (cdo *CandleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CandleDeleteOne) Where

func (cdo *CandleDeleteOne) Where(ps ...predicate.Candle) *CandleDeleteOne

Where appends a list predicates to the CandleDelete builder.

type CandleEdges

type CandleEdges struct {
	// Symbol this candle belongs to
	Symbol *Symbol `json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

CandleEdges holds the relations/edges for other nodes in the graph.

func (CandleEdges) SymbolOrErr

func (e CandleEdges) SymbolOrErr() (*Symbol, error)

SymbolOrErr returns the Symbol value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CandleGroupBy

type CandleGroupBy struct {
	// contains filtered or unexported fields
}

CandleGroupBy is the group-by builder for Candle entities.

func (*CandleGroupBy) Aggregate

func (cgb *CandleGroupBy) Aggregate(fns ...AggregateFunc) *CandleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CandleGroupBy) Bool

func (s *CandleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) BoolX

func (s *CandleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CandleGroupBy) Bools

func (s *CandleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) BoolsX

func (s *CandleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CandleGroupBy) Float64

func (s *CandleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) Float64X

func (s *CandleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CandleGroupBy) Float64s

func (s *CandleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) Float64sX

func (s *CandleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CandleGroupBy) Int

func (s *CandleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) IntX

func (s *CandleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CandleGroupBy) Ints

func (s *CandleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) IntsX

func (s *CandleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CandleGroupBy) Scan

func (cgb *CandleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CandleGroupBy) ScanX

func (s *CandleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CandleGroupBy) String

func (s *CandleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CandleGroupBy) StringX

func (s *CandleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CandleGroupBy) Strings

func (s *CandleGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*CandleGroupBy) StringsX

func (s *CandleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CandleMutation

type CandleMutation struct {
	// contains filtered or unexported fields
}

CandleMutation represents an operation that mutates the Candle nodes in the graph.

func (*CandleMutation) AddAdjustedClose

func (m *CandleMutation) AddAdjustedClose(f float64)

AddAdjustedClose adds f to the "adjusted_close" field.

func (*CandleMutation) AddAsk

func (m *CandleMutation) AddAsk(f float64)

AddAsk adds f to the "ask" field.

func (*CandleMutation) AddBid

func (m *CandleMutation) AddBid(f float64)

AddBid adds f to the "bid" field.

func (*CandleMutation) AddClose

func (m *CandleMutation) AddClose(f float64)

AddClose adds f to the "close" field.

func (*CandleMutation) AddField

func (m *CandleMutation) 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 (*CandleMutation) AddHigh

func (m *CandleMutation) AddHigh(f float64)

AddHigh adds f to the "high" field.

func (*CandleMutation) AddLow

func (m *CandleMutation) AddLow(f float64)

AddLow adds f to the "low" field.

func (*CandleMutation) AddOpen

func (m *CandleMutation) AddOpen(f float64)

AddOpen adds f to the "open" field.

func (*CandleMutation) AddSpread

func (m *CandleMutation) AddSpread(f float64)

AddSpread adds f to the "spread" field.

func (*CandleMutation) AddTimestamp

func (m *CandleMutation) AddTimestamp(i int64)

AddTimestamp adds i to the "timestamp" field.

func (*CandleMutation) AddTradeCount

func (m *CandleMutation) AddTradeCount(i int64)

AddTradeCount adds i to the "trade_count" field.

func (*CandleMutation) AddVolume

func (m *CandleMutation) AddVolume(f float64)

AddVolume adds f to the "volume" field.

func (*CandleMutation) AddVolumeWeightedPrice

func (m *CandleMutation) AddVolumeWeightedPrice(f float64)

AddVolumeWeightedPrice adds f to the "volume_weighted_price" field.

func (*CandleMutation) AddedAdjustedClose

func (m *CandleMutation) AddedAdjustedClose() (r float64, exists bool)

AddedAdjustedClose returns the value that was added to the "adjusted_close" field in this mutation.

func (*CandleMutation) AddedAsk

func (m *CandleMutation) AddedAsk() (r float64, exists bool)

AddedAsk returns the value that was added to the "ask" field in this mutation.

func (*CandleMutation) AddedBid

func (m *CandleMutation) AddedBid() (r float64, exists bool)

AddedBid returns the value that was added to the "bid" field in this mutation.

func (*CandleMutation) AddedClose

func (m *CandleMutation) AddedClose() (r float64, exists bool)

AddedClose returns the value that was added to the "close" field in this mutation.

func (*CandleMutation) AddedEdges

func (m *CandleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CandleMutation) AddedField

func (m *CandleMutation) 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 (*CandleMutation) AddedFields

func (m *CandleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CandleMutation) AddedHigh

func (m *CandleMutation) AddedHigh() (r float64, exists bool)

AddedHigh returns the value that was added to the "high" field in this mutation.

func (*CandleMutation) AddedIDs

func (m *CandleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CandleMutation) AddedLow

func (m *CandleMutation) AddedLow() (r float64, exists bool)

AddedLow returns the value that was added to the "low" field in this mutation.

func (*CandleMutation) AddedOpen

func (m *CandleMutation) AddedOpen() (r float64, exists bool)

AddedOpen returns the value that was added to the "open" field in this mutation.

func (*CandleMutation) AddedSpread

func (m *CandleMutation) AddedSpread() (r float64, exists bool)

AddedSpread returns the value that was added to the "spread" field in this mutation.

func (*CandleMutation) AddedTimestamp

func (m *CandleMutation) AddedTimestamp() (r int64, exists bool)

AddedTimestamp returns the value that was added to the "timestamp" field in this mutation.

func (*CandleMutation) AddedTradeCount

func (m *CandleMutation) AddedTradeCount() (r int64, exists bool)

AddedTradeCount returns the value that was added to the "trade_count" field in this mutation.

func (*CandleMutation) AddedVolume

func (m *CandleMutation) AddedVolume() (r float64, exists bool)

AddedVolume returns the value that was added to the "volume" field in this mutation.

func (*CandleMutation) AddedVolumeWeightedPrice

func (m *CandleMutation) AddedVolumeWeightedPrice() (r float64, exists bool)

AddedVolumeWeightedPrice returns the value that was added to the "volume_weighted_price" field in this mutation.

func (*CandleMutation) AdjustedClose

func (m *CandleMutation) AdjustedClose() (r float64, exists bool)

AdjustedClose returns the value of the "adjusted_close" field in the mutation.

func (*CandleMutation) AdjustedCloseCleared

func (m *CandleMutation) AdjustedCloseCleared() bool

AdjustedCloseCleared returns if the "adjusted_close" field was cleared in this mutation.

func (*CandleMutation) Ask

func (m *CandleMutation) Ask() (r float64, exists bool)

Ask returns the value of the "ask" field in the mutation.

func (*CandleMutation) AskCleared

func (m *CandleMutation) AskCleared() bool

AskCleared returns if the "ask" field was cleared in this mutation.

func (*CandleMutation) BarTime

func (m *CandleMutation) BarTime() (r time.Time, exists bool)

BarTime returns the value of the "bar_time" field in the mutation.

func (*CandleMutation) Bid

func (m *CandleMutation) Bid() (r float64, exists bool)

Bid returns the value of the "bid" field in the mutation.

func (*CandleMutation) BidCleared

func (m *CandleMutation) BidCleared() bool

BidCleared returns if the "bid" field was cleared in this mutation.

func (*CandleMutation) ClearAdjustedClose

func (m *CandleMutation) ClearAdjustedClose()

ClearAdjustedClose clears the value of the "adjusted_close" field.

func (*CandleMutation) ClearAsk

func (m *CandleMutation) ClearAsk()

ClearAsk clears the value of the "ask" field.

func (*CandleMutation) ClearBid

func (m *CandleMutation) ClearBid()

ClearBid clears the value of the "bid" field.

func (*CandleMutation) ClearEdge

func (m *CandleMutation) 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 (*CandleMutation) ClearField

func (m *CandleMutation) 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 (*CandleMutation) ClearMetadata

func (m *CandleMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*CandleMutation) ClearSource

func (m *CandleMutation) ClearSource()

ClearSource clears the value of the "source" field.

func (*CandleMutation) ClearSpread

func (m *CandleMutation) ClearSpread()

ClearSpread clears the value of the "spread" field.

func (*CandleMutation) ClearSymbol

func (m *CandleMutation) ClearSymbol()

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*CandleMutation) ClearTradeCount

func (m *CandleMutation) ClearTradeCount()

ClearTradeCount clears the value of the "trade_count" field.

func (*CandleMutation) ClearVolumeWeightedPrice

func (m *CandleMutation) ClearVolumeWeightedPrice()

ClearVolumeWeightedPrice clears the value of the "volume_weighted_price" field.

func (*CandleMutation) ClearedEdges

func (m *CandleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CandleMutation) ClearedFields

func (m *CandleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CandleMutation) Client

func (m CandleMutation) 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 (*CandleMutation) Close

func (m *CandleMutation) Close() (r float64, exists bool)

Close returns the value of the "close" field in the mutation.

func (*CandleMutation) CreatedAt

func (m *CandleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*CandleMutation) EdgeCleared

func (m *CandleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CandleMutation) Exchange

func (m *CandleMutation) Exchange() (r string, exists bool)

Exchange returns the value of the "exchange" field in the mutation.

func (*CandleMutation) Field

func (m *CandleMutation) 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 (*CandleMutation) FieldCleared

func (m *CandleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CandleMutation) Fields

func (m *CandleMutation) 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 (*CandleMutation) High

func (m *CandleMutation) High() (r float64, exists bool)

High returns the value of the "high" field in the mutation.

func (*CandleMutation) ID

func (m *CandleMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CandleMutation) IDs

func (m *CandleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CandleMutation) IsComplete

func (m *CandleMutation) IsComplete() (r bool, exists bool)

IsComplete returns the value of the "is_complete" field in the mutation.

func (*CandleMutation) Low

func (m *CandleMutation) Low() (r float64, exists bool)

Low returns the value of the "low" field in the mutation.

func (*CandleMutation) Metadata

func (m *CandleMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*CandleMutation) MetadataCleared

func (m *CandleMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*CandleMutation) OldAdjustedClose

func (m *CandleMutation) OldAdjustedClose(ctx context.Context) (v float64, err error)

OldAdjustedClose returns the old "adjusted_close" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldAsk

func (m *CandleMutation) OldAsk(ctx context.Context) (v float64, err error)

OldAsk returns the old "ask" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldBarTime

func (m *CandleMutation) OldBarTime(ctx context.Context) (v time.Time, err error)

OldBarTime returns the old "bar_time" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldBid

func (m *CandleMutation) OldBid(ctx context.Context) (v float64, err error)

OldBid returns the old "bid" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldClose

func (m *CandleMutation) OldClose(ctx context.Context) (v float64, err error)

OldClose returns the old "close" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldCreatedAt

func (m *CandleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldExchange

func (m *CandleMutation) OldExchange(ctx context.Context) (v string, err error)

OldExchange returns the old "exchange" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldField

func (m *CandleMutation) 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 (*CandleMutation) OldHigh

func (m *CandleMutation) OldHigh(ctx context.Context) (v float64, err error)

OldHigh returns the old "high" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldIsComplete

func (m *CandleMutation) OldIsComplete(ctx context.Context) (v bool, err error)

OldIsComplete returns the old "is_complete" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldLow

func (m *CandleMutation) OldLow(ctx context.Context) (v float64, err error)

OldLow returns the old "low" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldMetadata

func (m *CandleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldOpen

func (m *CandleMutation) OldOpen(ctx context.Context) (v float64, err error)

OldOpen returns the old "open" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldQuality

func (m *CandleMutation) OldQuality(ctx context.Context) (v candle.Quality, err error)

OldQuality returns the old "quality" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldSource

func (m *CandleMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldSpread

func (m *CandleMutation) OldSpread(ctx context.Context) (v float64, err error)

OldSpread returns the old "spread" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldSymbolName

func (m *CandleMutation) OldSymbolName(ctx context.Context) (v string, err error)

OldSymbolName returns the old "symbol_name" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldTimeframe

func (m *CandleMutation) OldTimeframe(ctx context.Context) (v candle.Timeframe, err error)

OldTimeframe returns the old "timeframe" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldTimestamp

func (m *CandleMutation) OldTimestamp(ctx context.Context) (v int64, err error)

OldTimestamp returns the old "timestamp" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldTradeCount

func (m *CandleMutation) OldTradeCount(ctx context.Context) (v int64, err error)

OldTradeCount returns the old "trade_count" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldUpdatedAt

func (m *CandleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldVolume

func (m *CandleMutation) OldVolume(ctx context.Context) (v float64, err error)

OldVolume returns the old "volume" field's value of the Candle entity. If the Candle 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 (*CandleMutation) OldVolumeWeightedPrice

func (m *CandleMutation) OldVolumeWeightedPrice(ctx context.Context) (v float64, err error)

OldVolumeWeightedPrice returns the old "volume_weighted_price" field's value of the Candle entity. If the Candle 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 (*CandleMutation) Op

func (m *CandleMutation) Op() Op

Op returns the operation name.

func (*CandleMutation) Open

func (m *CandleMutation) Open() (r float64, exists bool)

Open returns the value of the "open" field in the mutation.

func (*CandleMutation) Quality

func (m *CandleMutation) Quality() (r candle.Quality, exists bool)

Quality returns the value of the "quality" field in the mutation.

func (*CandleMutation) RemovedEdges

func (m *CandleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CandleMutation) RemovedIDs

func (m *CandleMutation) 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 (*CandleMutation) ResetAdjustedClose

func (m *CandleMutation) ResetAdjustedClose()

ResetAdjustedClose resets all changes to the "adjusted_close" field.

func (*CandleMutation) ResetAsk

func (m *CandleMutation) ResetAsk()

ResetAsk resets all changes to the "ask" field.

func (*CandleMutation) ResetBarTime

func (m *CandleMutation) ResetBarTime()

ResetBarTime resets all changes to the "bar_time" field.

func (*CandleMutation) ResetBid

func (m *CandleMutation) ResetBid()

ResetBid resets all changes to the "bid" field.

func (*CandleMutation) ResetClose

func (m *CandleMutation) ResetClose()

ResetClose resets all changes to the "close" field.

func (*CandleMutation) ResetCreatedAt

func (m *CandleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CandleMutation) ResetEdge

func (m *CandleMutation) 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 (*CandleMutation) ResetExchange

func (m *CandleMutation) ResetExchange()

ResetExchange resets all changes to the "exchange" field.

func (*CandleMutation) ResetField

func (m *CandleMutation) 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 (*CandleMutation) ResetHigh

func (m *CandleMutation) ResetHigh()

ResetHigh resets all changes to the "high" field.

func (*CandleMutation) ResetIsComplete

func (m *CandleMutation) ResetIsComplete()

ResetIsComplete resets all changes to the "is_complete" field.

func (*CandleMutation) ResetLow

func (m *CandleMutation) ResetLow()

ResetLow resets all changes to the "low" field.

func (*CandleMutation) ResetMetadata

func (m *CandleMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*CandleMutation) ResetOpen

func (m *CandleMutation) ResetOpen()

ResetOpen resets all changes to the "open" field.

func (*CandleMutation) ResetQuality

func (m *CandleMutation) ResetQuality()

ResetQuality resets all changes to the "quality" field.

func (*CandleMutation) ResetSource

func (m *CandleMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*CandleMutation) ResetSpread

func (m *CandleMutation) ResetSpread()

ResetSpread resets all changes to the "spread" field.

func (*CandleMutation) ResetSymbol

func (m *CandleMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" edge.

func (*CandleMutation) ResetSymbolName

func (m *CandleMutation) ResetSymbolName()

ResetSymbolName resets all changes to the "symbol_name" field.

func (*CandleMutation) ResetTimeframe

func (m *CandleMutation) ResetTimeframe()

ResetTimeframe resets all changes to the "timeframe" field.

func (*CandleMutation) ResetTimestamp

func (m *CandleMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*CandleMutation) ResetTradeCount

func (m *CandleMutation) ResetTradeCount()

ResetTradeCount resets all changes to the "trade_count" field.

func (*CandleMutation) ResetUpdatedAt

func (m *CandleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CandleMutation) ResetVolume

func (m *CandleMutation) ResetVolume()

ResetVolume resets all changes to the "volume" field.

func (*CandleMutation) ResetVolumeWeightedPrice

func (m *CandleMutation) ResetVolumeWeightedPrice()

ResetVolumeWeightedPrice resets all changes to the "volume_weighted_price" field.

func (*CandleMutation) SetAdjustedClose

func (m *CandleMutation) SetAdjustedClose(f float64)

SetAdjustedClose sets the "adjusted_close" field.

func (*CandleMutation) SetAsk

func (m *CandleMutation) SetAsk(f float64)

SetAsk sets the "ask" field.

func (*CandleMutation) SetBarTime

func (m *CandleMutation) SetBarTime(t time.Time)

SetBarTime sets the "bar_time" field.

func (*CandleMutation) SetBid

func (m *CandleMutation) SetBid(f float64)

SetBid sets the "bid" field.

func (*CandleMutation) SetClose

func (m *CandleMutation) SetClose(f float64)

SetClose sets the "close" field.

func (*CandleMutation) SetCreatedAt

func (m *CandleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*CandleMutation) SetExchange

func (m *CandleMutation) SetExchange(s string)

SetExchange sets the "exchange" field.

func (*CandleMutation) SetField

func (m *CandleMutation) 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 (*CandleMutation) SetHigh

func (m *CandleMutation) SetHigh(f float64)

SetHigh sets the "high" field.

func (*CandleMutation) SetID

func (m *CandleMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Candle entities.

func (*CandleMutation) SetIsComplete

func (m *CandleMutation) SetIsComplete(b bool)

SetIsComplete sets the "is_complete" field.

func (*CandleMutation) SetLow

func (m *CandleMutation) SetLow(f float64)

SetLow sets the "low" field.

func (*CandleMutation) SetMetadata

func (m *CandleMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*CandleMutation) SetOp

func (m *CandleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CandleMutation) SetOpen

func (m *CandleMutation) SetOpen(f float64)

SetOpen sets the "open" field.

func (*CandleMutation) SetQuality

func (m *CandleMutation) SetQuality(c candle.Quality)

SetQuality sets the "quality" field.

func (*CandleMutation) SetSource

func (m *CandleMutation) SetSource(s string)

SetSource sets the "source" field.

func (*CandleMutation) SetSpread

func (m *CandleMutation) SetSpread(f float64)

SetSpread sets the "spread" field.

func (*CandleMutation) SetSymbolID

func (m *CandleMutation) SetSymbolID(id uuid.UUID)

SetSymbolID sets the "symbol" edge to the Symbol entity by id.

func (*CandleMutation) SetSymbolName

func (m *CandleMutation) SetSymbolName(s string)

SetSymbolName sets the "symbol_name" field.

func (*CandleMutation) SetTimeframe

func (m *CandleMutation) SetTimeframe(c candle.Timeframe)

SetTimeframe sets the "timeframe" field.

func (*CandleMutation) SetTimestamp

func (m *CandleMutation) SetTimestamp(i int64)

SetTimestamp sets the "timestamp" field.

func (*CandleMutation) SetTradeCount

func (m *CandleMutation) SetTradeCount(i int64)

SetTradeCount sets the "trade_count" field.

func (*CandleMutation) SetUpdatedAt

func (m *CandleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*CandleMutation) SetVolume

func (m *CandleMutation) SetVolume(f float64)

SetVolume sets the "volume" field.

func (*CandleMutation) SetVolumeWeightedPrice

func (m *CandleMutation) SetVolumeWeightedPrice(f float64)

SetVolumeWeightedPrice sets the "volume_weighted_price" field.

func (*CandleMutation) Source

func (m *CandleMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*CandleMutation) SourceCleared

func (m *CandleMutation) SourceCleared() bool

SourceCleared returns if the "source" field was cleared in this mutation.

func (*CandleMutation) Spread

func (m *CandleMutation) Spread() (r float64, exists bool)

Spread returns the value of the "spread" field in the mutation.

func (*CandleMutation) SpreadCleared

func (m *CandleMutation) SpreadCleared() bool

SpreadCleared returns if the "spread" field was cleared in this mutation.

func (*CandleMutation) SymbolCleared

func (m *CandleMutation) SymbolCleared() bool

SymbolCleared reports if the "symbol" edge to the Symbol entity was cleared.

func (*CandleMutation) SymbolID

func (m *CandleMutation) SymbolID() (id uuid.UUID, exists bool)

SymbolID returns the "symbol" edge ID in the mutation.

func (*CandleMutation) SymbolIDs

func (m *CandleMutation) SymbolIDs() (ids []uuid.UUID)

SymbolIDs returns the "symbol" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SymbolID instead. It exists only for internal usage by the builders.

func (*CandleMutation) SymbolName

func (m *CandleMutation) SymbolName() (r string, exists bool)

SymbolName returns the value of the "symbol_name" field in the mutation.

func (*CandleMutation) Timeframe

func (m *CandleMutation) Timeframe() (r candle.Timeframe, exists bool)

Timeframe returns the value of the "timeframe" field in the mutation.

func (*CandleMutation) Timestamp

func (m *CandleMutation) Timestamp() (r int64, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (*CandleMutation) TradeCount

func (m *CandleMutation) TradeCount() (r int64, exists bool)

TradeCount returns the value of the "trade_count" field in the mutation.

func (*CandleMutation) TradeCountCleared

func (m *CandleMutation) TradeCountCleared() bool

TradeCountCleared returns if the "trade_count" field was cleared in this mutation.

func (CandleMutation) Tx

func (m CandleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CandleMutation) Type

func (m *CandleMutation) Type() string

Type returns the node type of this mutation (Candle).

func (*CandleMutation) UpdatedAt

func (m *CandleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*CandleMutation) Volume

func (m *CandleMutation) Volume() (r float64, exists bool)

Volume returns the value of the "volume" field in the mutation.

func (*CandleMutation) VolumeWeightedPrice

func (m *CandleMutation) VolumeWeightedPrice() (r float64, exists bool)

VolumeWeightedPrice returns the value of the "volume_weighted_price" field in the mutation.

func (*CandleMutation) VolumeWeightedPriceCleared

func (m *CandleMutation) VolumeWeightedPriceCleared() bool

VolumeWeightedPriceCleared returns if the "volume_weighted_price" field was cleared in this mutation.

func (*CandleMutation) Where

func (m *CandleMutation) Where(ps ...predicate.Candle)

Where appends a list predicates to the CandleMutation builder.

func (*CandleMutation) WhereP

func (m *CandleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CandleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CandleQuery

type CandleQuery struct {
	// contains filtered or unexported fields
}

CandleQuery is the builder for querying Candle entities.

func (*CandleQuery) Aggregate

func (cq *CandleQuery) Aggregate(fns ...AggregateFunc) *CandleSelect

Aggregate returns a CandleSelect configured with the given aggregations.

func (*CandleQuery) All

func (cq *CandleQuery) All(ctx context.Context) ([]*Candle, error)

All executes the query and returns a list of Candles.

func (*CandleQuery) AllX

func (cq *CandleQuery) AllX(ctx context.Context) []*Candle

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

func (*CandleQuery) Clone

func (cq *CandleQuery) Clone() *CandleQuery

Clone returns a duplicate of the CandleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CandleQuery) Count

func (cq *CandleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CandleQuery) CountX

func (cq *CandleQuery) CountX(ctx context.Context) int

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

func (*CandleQuery) Exist

func (cq *CandleQuery) Exist(ctx context.Context) (bool, error)

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

func (*CandleQuery) ExistX

func (cq *CandleQuery) ExistX(ctx context.Context) bool

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

func (*CandleQuery) First

func (cq *CandleQuery) First(ctx context.Context) (*Candle, error)

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

func (*CandleQuery) FirstID

func (cq *CandleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CandleQuery) FirstIDX

func (cq *CandleQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*CandleQuery) FirstX

func (cq *CandleQuery) FirstX(ctx context.Context) *Candle

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

func (*CandleQuery) GroupBy

func (cq *CandleQuery) GroupBy(field string, fields ...string) *CandleGroupBy

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 {
	Exchange string `json:"exchange,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Candle.Query().
	GroupBy(candle.FieldExchange).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CandleQuery) IDs

func (cq *CandleQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*CandleQuery) IDsX

func (cq *CandleQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*CandleQuery) Limit

func (cq *CandleQuery) Limit(limit int) *CandleQuery

Limit the number of records to be returned by this query.

func (*CandleQuery) Offset

func (cq *CandleQuery) Offset(offset int) *CandleQuery

Offset to start from.

func (*CandleQuery) Only

func (cq *CandleQuery) Only(ctx context.Context) (*Candle, error)

Only returns a single Candle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Candle entity is found. Returns a *NotFoundError when no Candle entities are found.

func (*CandleQuery) OnlyID

func (cq *CandleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Candle ID in the query. Returns a *NotSingularError when more than one Candle ID is found. Returns a *NotFoundError when no entities are found.

func (*CandleQuery) OnlyIDX

func (cq *CandleQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*CandleQuery) OnlyX

func (cq *CandleQuery) OnlyX(ctx context.Context) *Candle

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

func (*CandleQuery) Order

func (cq *CandleQuery) Order(o ...candle.OrderOption) *CandleQuery

Order specifies how the records should be ordered.

func (*CandleQuery) QuerySymbol

func (cq *CandleQuery) QuerySymbol() *SymbolQuery

QuerySymbol chains the current query on the "symbol" edge.

func (*CandleQuery) Select

func (cq *CandleQuery) Select(fields ...string) *CandleSelect

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 {
	Exchange string `json:"exchange,omitempty"`
}

client.Candle.Query().
	Select(candle.FieldExchange).
	Scan(ctx, &v)

func (*CandleQuery) Unique

func (cq *CandleQuery) Unique(unique bool) *CandleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CandleQuery) Where

func (cq *CandleQuery) Where(ps ...predicate.Candle) *CandleQuery

Where adds a new predicate for the CandleQuery builder.

func (*CandleQuery) WithSymbol

func (cq *CandleQuery) WithSymbol(opts ...func(*SymbolQuery)) *CandleQuery

WithSymbol tells the query-builder to eager-load the nodes that are connected to the "symbol" edge. The optional arguments are used to configure the query builder of the edge.

type CandleSelect

type CandleSelect struct {
	*CandleQuery
	// contains filtered or unexported fields
}

CandleSelect is the builder for selecting fields of Candle entities.

func (*CandleSelect) Aggregate

func (cs *CandleSelect) Aggregate(fns ...AggregateFunc) *CandleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CandleSelect) Bool

func (s *CandleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CandleSelect) BoolX

func (s *CandleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CandleSelect) Bools

func (s *CandleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CandleSelect) BoolsX

func (s *CandleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CandleSelect) Float64

func (s *CandleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CandleSelect) Float64X

func (s *CandleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CandleSelect) Float64s

func (s *CandleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CandleSelect) Float64sX

func (s *CandleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CandleSelect) Int

func (s *CandleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CandleSelect) IntX

func (s *CandleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CandleSelect) Ints

func (s *CandleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CandleSelect) IntsX

func (s *CandleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CandleSelect) Scan

func (cs *CandleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CandleSelect) ScanX

func (s *CandleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CandleSelect) String

func (s *CandleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CandleSelect) StringX

func (s *CandleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CandleSelect) Strings

func (s *CandleSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CandleSelect) StringsX

func (s *CandleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CandleUpdate

type CandleUpdate struct {
	// contains filtered or unexported fields
}

CandleUpdate is the builder for updating Candle entities.

func (*CandleUpdate) AddAdjustedClose

func (cu *CandleUpdate) AddAdjustedClose(f float64) *CandleUpdate

AddAdjustedClose adds f to the "adjusted_close" field.

func (*CandleUpdate) AddAsk

func (cu *CandleUpdate) AddAsk(f float64) *CandleUpdate

AddAsk adds f to the "ask" field.

func (*CandleUpdate) AddBid

func (cu *CandleUpdate) AddBid(f float64) *CandleUpdate

AddBid adds f to the "bid" field.

func (*CandleUpdate) AddClose

func (cu *CandleUpdate) AddClose(f float64) *CandleUpdate

AddClose adds f to the "close" field.

func (*CandleUpdate) AddHigh

func (cu *CandleUpdate) AddHigh(f float64) *CandleUpdate

AddHigh adds f to the "high" field.

func (*CandleUpdate) AddLow

func (cu *CandleUpdate) AddLow(f float64) *CandleUpdate

AddLow adds f to the "low" field.

func (*CandleUpdate) AddOpen

func (cu *CandleUpdate) AddOpen(f float64) *CandleUpdate

AddOpen adds f to the "open" field.

func (*CandleUpdate) AddSpread

func (cu *CandleUpdate) AddSpread(f float64) *CandleUpdate

AddSpread adds f to the "spread" field.

func (*CandleUpdate) AddTimestamp

func (cu *CandleUpdate) AddTimestamp(i int64) *CandleUpdate

AddTimestamp adds i to the "timestamp" field.

func (*CandleUpdate) AddTradeCount

func (cu *CandleUpdate) AddTradeCount(i int64) *CandleUpdate

AddTradeCount adds i to the "trade_count" field.

func (*CandleUpdate) AddVolume

func (cu *CandleUpdate) AddVolume(f float64) *CandleUpdate

AddVolume adds f to the "volume" field.

func (*CandleUpdate) AddVolumeWeightedPrice

func (cu *CandleUpdate) AddVolumeWeightedPrice(f float64) *CandleUpdate

AddVolumeWeightedPrice adds f to the "volume_weighted_price" field.

func (*CandleUpdate) ClearAdjustedClose

func (cu *CandleUpdate) ClearAdjustedClose() *CandleUpdate

ClearAdjustedClose clears the value of the "adjusted_close" field.

func (*CandleUpdate) ClearAsk

func (cu *CandleUpdate) ClearAsk() *CandleUpdate

ClearAsk clears the value of the "ask" field.

func (*CandleUpdate) ClearBid

func (cu *CandleUpdate) ClearBid() *CandleUpdate

ClearBid clears the value of the "bid" field.

func (*CandleUpdate) ClearMetadata

func (cu *CandleUpdate) ClearMetadata() *CandleUpdate

ClearMetadata clears the value of the "metadata" field.

func (*CandleUpdate) ClearSource

func (cu *CandleUpdate) ClearSource() *CandleUpdate

ClearSource clears the value of the "source" field.

func (*CandleUpdate) ClearSpread

func (cu *CandleUpdate) ClearSpread() *CandleUpdate

ClearSpread clears the value of the "spread" field.

func (*CandleUpdate) ClearSymbol

func (cu *CandleUpdate) ClearSymbol() *CandleUpdate

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*CandleUpdate) ClearTradeCount

func (cu *CandleUpdate) ClearTradeCount() *CandleUpdate

ClearTradeCount clears the value of the "trade_count" field.

func (*CandleUpdate) ClearVolumeWeightedPrice

func (cu *CandleUpdate) ClearVolumeWeightedPrice() *CandleUpdate

ClearVolumeWeightedPrice clears the value of the "volume_weighted_price" field.

func (*CandleUpdate) Exec

func (cu *CandleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CandleUpdate) ExecX

func (cu *CandleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CandleUpdate) Mutation

func (cu *CandleUpdate) Mutation() *CandleMutation

Mutation returns the CandleMutation object of the builder.

func (*CandleUpdate) Save

func (cu *CandleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CandleUpdate) SaveX

func (cu *CandleUpdate) SaveX(ctx context.Context) int

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

func (*CandleUpdate) SetAdjustedClose

func (cu *CandleUpdate) SetAdjustedClose(f float64) *CandleUpdate

SetAdjustedClose sets the "adjusted_close" field.

func (*CandleUpdate) SetAsk

func (cu *CandleUpdate) SetAsk(f float64) *CandleUpdate

SetAsk sets the "ask" field.

func (*CandleUpdate) SetBarTime

func (cu *CandleUpdate) SetBarTime(t time.Time) *CandleUpdate

SetBarTime sets the "bar_time" field.

func (*CandleUpdate) SetBid

func (cu *CandleUpdate) SetBid(f float64) *CandleUpdate

SetBid sets the "bid" field.

func (*CandleUpdate) SetClose

func (cu *CandleUpdate) SetClose(f float64) *CandleUpdate

SetClose sets the "close" field.

func (*CandleUpdate) SetExchange

func (cu *CandleUpdate) SetExchange(s string) *CandleUpdate

SetExchange sets the "exchange" field.

func (*CandleUpdate) SetHigh

func (cu *CandleUpdate) SetHigh(f float64) *CandleUpdate

SetHigh sets the "high" field.

func (*CandleUpdate) SetIsComplete

func (cu *CandleUpdate) SetIsComplete(b bool) *CandleUpdate

SetIsComplete sets the "is_complete" field.

func (*CandleUpdate) SetLow

func (cu *CandleUpdate) SetLow(f float64) *CandleUpdate

SetLow sets the "low" field.

func (*CandleUpdate) SetMetadata

func (cu *CandleUpdate) SetMetadata(m map[string]interface{}) *CandleUpdate

SetMetadata sets the "metadata" field.

func (*CandleUpdate) SetNillableAdjustedClose

func (cu *CandleUpdate) SetNillableAdjustedClose(f *float64) *CandleUpdate

SetNillableAdjustedClose sets the "adjusted_close" field if the given value is not nil.

func (*CandleUpdate) SetNillableAsk

func (cu *CandleUpdate) SetNillableAsk(f *float64) *CandleUpdate

SetNillableAsk sets the "ask" field if the given value is not nil.

func (*CandleUpdate) SetNillableBarTime

func (cu *CandleUpdate) SetNillableBarTime(t *time.Time) *CandleUpdate

SetNillableBarTime sets the "bar_time" field if the given value is not nil.

func (*CandleUpdate) SetNillableBid

func (cu *CandleUpdate) SetNillableBid(f *float64) *CandleUpdate

SetNillableBid sets the "bid" field if the given value is not nil.

func (*CandleUpdate) SetNillableClose

func (cu *CandleUpdate) SetNillableClose(f *float64) *CandleUpdate

SetNillableClose sets the "close" field if the given value is not nil.

func (*CandleUpdate) SetNillableExchange

func (cu *CandleUpdate) SetNillableExchange(s *string) *CandleUpdate

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*CandleUpdate) SetNillableHigh

func (cu *CandleUpdate) SetNillableHigh(f *float64) *CandleUpdate

SetNillableHigh sets the "high" field if the given value is not nil.

func (*CandleUpdate) SetNillableIsComplete

func (cu *CandleUpdate) SetNillableIsComplete(b *bool) *CandleUpdate

SetNillableIsComplete sets the "is_complete" field if the given value is not nil.

func (*CandleUpdate) SetNillableLow

func (cu *CandleUpdate) SetNillableLow(f *float64) *CandleUpdate

SetNillableLow sets the "low" field if the given value is not nil.

func (*CandleUpdate) SetNillableOpen

func (cu *CandleUpdate) SetNillableOpen(f *float64) *CandleUpdate

SetNillableOpen sets the "open" field if the given value is not nil.

func (*CandleUpdate) SetNillableQuality

func (cu *CandleUpdate) SetNillableQuality(c *candle.Quality) *CandleUpdate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*CandleUpdate) SetNillableSource

func (cu *CandleUpdate) SetNillableSource(s *string) *CandleUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*CandleUpdate) SetNillableSpread

func (cu *CandleUpdate) SetNillableSpread(f *float64) *CandleUpdate

SetNillableSpread sets the "spread" field if the given value is not nil.

func (*CandleUpdate) SetNillableSymbolID

func (cu *CandleUpdate) SetNillableSymbolID(id *uuid.UUID) *CandleUpdate

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*CandleUpdate) SetNillableSymbolName

func (cu *CandleUpdate) SetNillableSymbolName(s *string) *CandleUpdate

SetNillableSymbolName sets the "symbol_name" field if the given value is not nil.

func (*CandleUpdate) SetNillableTimeframe

func (cu *CandleUpdate) SetNillableTimeframe(c *candle.Timeframe) *CandleUpdate

SetNillableTimeframe sets the "timeframe" field if the given value is not nil.

func (*CandleUpdate) SetNillableTimestamp

func (cu *CandleUpdate) SetNillableTimestamp(i *int64) *CandleUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*CandleUpdate) SetNillableTradeCount

func (cu *CandleUpdate) SetNillableTradeCount(i *int64) *CandleUpdate

SetNillableTradeCount sets the "trade_count" field if the given value is not nil.

func (*CandleUpdate) SetNillableVolume

func (cu *CandleUpdate) SetNillableVolume(f *float64) *CandleUpdate

SetNillableVolume sets the "volume" field if the given value is not nil.

func (*CandleUpdate) SetNillableVolumeWeightedPrice

func (cu *CandleUpdate) SetNillableVolumeWeightedPrice(f *float64) *CandleUpdate

SetNillableVolumeWeightedPrice sets the "volume_weighted_price" field if the given value is not nil.

func (*CandleUpdate) SetOpen

func (cu *CandleUpdate) SetOpen(f float64) *CandleUpdate

SetOpen sets the "open" field.

func (*CandleUpdate) SetQuality

func (cu *CandleUpdate) SetQuality(c candle.Quality) *CandleUpdate

SetQuality sets the "quality" field.

func (*CandleUpdate) SetSource

func (cu *CandleUpdate) SetSource(s string) *CandleUpdate

SetSource sets the "source" field.

func (*CandleUpdate) SetSpread

func (cu *CandleUpdate) SetSpread(f float64) *CandleUpdate

SetSpread sets the "spread" field.

func (*CandleUpdate) SetSymbol

func (cu *CandleUpdate) SetSymbol(s *Symbol) *CandleUpdate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*CandleUpdate) SetSymbolID

func (cu *CandleUpdate) SetSymbolID(id uuid.UUID) *CandleUpdate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*CandleUpdate) SetSymbolName

func (cu *CandleUpdate) SetSymbolName(s string) *CandleUpdate

SetSymbolName sets the "symbol_name" field.

func (*CandleUpdate) SetTimeframe

func (cu *CandleUpdate) SetTimeframe(c candle.Timeframe) *CandleUpdate

SetTimeframe sets the "timeframe" field.

func (*CandleUpdate) SetTimestamp

func (cu *CandleUpdate) SetTimestamp(i int64) *CandleUpdate

SetTimestamp sets the "timestamp" field.

func (*CandleUpdate) SetTradeCount

func (cu *CandleUpdate) SetTradeCount(i int64) *CandleUpdate

SetTradeCount sets the "trade_count" field.

func (*CandleUpdate) SetUpdatedAt

func (cu *CandleUpdate) SetUpdatedAt(t time.Time) *CandleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CandleUpdate) SetVolume

func (cu *CandleUpdate) SetVolume(f float64) *CandleUpdate

SetVolume sets the "volume" field.

func (*CandleUpdate) SetVolumeWeightedPrice

func (cu *CandleUpdate) SetVolumeWeightedPrice(f float64) *CandleUpdate

SetVolumeWeightedPrice sets the "volume_weighted_price" field.

func (*CandleUpdate) Where

func (cu *CandleUpdate) Where(ps ...predicate.Candle) *CandleUpdate

Where appends a list predicates to the CandleUpdate builder.

type CandleUpdateOne

type CandleUpdateOne struct {
	// contains filtered or unexported fields
}

CandleUpdateOne is the builder for updating a single Candle entity.

func (*CandleUpdateOne) AddAdjustedClose

func (cuo *CandleUpdateOne) AddAdjustedClose(f float64) *CandleUpdateOne

AddAdjustedClose adds f to the "adjusted_close" field.

func (*CandleUpdateOne) AddAsk

func (cuo *CandleUpdateOne) AddAsk(f float64) *CandleUpdateOne

AddAsk adds f to the "ask" field.

func (*CandleUpdateOne) AddBid

func (cuo *CandleUpdateOne) AddBid(f float64) *CandleUpdateOne

AddBid adds f to the "bid" field.

func (*CandleUpdateOne) AddClose

func (cuo *CandleUpdateOne) AddClose(f float64) *CandleUpdateOne

AddClose adds f to the "close" field.

func (*CandleUpdateOne) AddHigh

func (cuo *CandleUpdateOne) AddHigh(f float64) *CandleUpdateOne

AddHigh adds f to the "high" field.

func (*CandleUpdateOne) AddLow

func (cuo *CandleUpdateOne) AddLow(f float64) *CandleUpdateOne

AddLow adds f to the "low" field.

func (*CandleUpdateOne) AddOpen

func (cuo *CandleUpdateOne) AddOpen(f float64) *CandleUpdateOne

AddOpen adds f to the "open" field.

func (*CandleUpdateOne) AddSpread

func (cuo *CandleUpdateOne) AddSpread(f float64) *CandleUpdateOne

AddSpread adds f to the "spread" field.

func (*CandleUpdateOne) AddTimestamp

func (cuo *CandleUpdateOne) AddTimestamp(i int64) *CandleUpdateOne

AddTimestamp adds i to the "timestamp" field.

func (*CandleUpdateOne) AddTradeCount

func (cuo *CandleUpdateOne) AddTradeCount(i int64) *CandleUpdateOne

AddTradeCount adds i to the "trade_count" field.

func (*CandleUpdateOne) AddVolume

func (cuo *CandleUpdateOne) AddVolume(f float64) *CandleUpdateOne

AddVolume adds f to the "volume" field.

func (*CandleUpdateOne) AddVolumeWeightedPrice

func (cuo *CandleUpdateOne) AddVolumeWeightedPrice(f float64) *CandleUpdateOne

AddVolumeWeightedPrice adds f to the "volume_weighted_price" field.

func (*CandleUpdateOne) ClearAdjustedClose

func (cuo *CandleUpdateOne) ClearAdjustedClose() *CandleUpdateOne

ClearAdjustedClose clears the value of the "adjusted_close" field.

func (*CandleUpdateOne) ClearAsk

func (cuo *CandleUpdateOne) ClearAsk() *CandleUpdateOne

ClearAsk clears the value of the "ask" field.

func (*CandleUpdateOne) ClearBid

func (cuo *CandleUpdateOne) ClearBid() *CandleUpdateOne

ClearBid clears the value of the "bid" field.

func (*CandleUpdateOne) ClearMetadata

func (cuo *CandleUpdateOne) ClearMetadata() *CandleUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*CandleUpdateOne) ClearSource

func (cuo *CandleUpdateOne) ClearSource() *CandleUpdateOne

ClearSource clears the value of the "source" field.

func (*CandleUpdateOne) ClearSpread

func (cuo *CandleUpdateOne) ClearSpread() *CandleUpdateOne

ClearSpread clears the value of the "spread" field.

func (*CandleUpdateOne) ClearSymbol

func (cuo *CandleUpdateOne) ClearSymbol() *CandleUpdateOne

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*CandleUpdateOne) ClearTradeCount

func (cuo *CandleUpdateOne) ClearTradeCount() *CandleUpdateOne

ClearTradeCount clears the value of the "trade_count" field.

func (*CandleUpdateOne) ClearVolumeWeightedPrice

func (cuo *CandleUpdateOne) ClearVolumeWeightedPrice() *CandleUpdateOne

ClearVolumeWeightedPrice clears the value of the "volume_weighted_price" field.

func (*CandleUpdateOne) Exec

func (cuo *CandleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CandleUpdateOne) ExecX

func (cuo *CandleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CandleUpdateOne) Mutation

func (cuo *CandleUpdateOne) Mutation() *CandleMutation

Mutation returns the CandleMutation object of the builder.

func (*CandleUpdateOne) Save

func (cuo *CandleUpdateOne) Save(ctx context.Context) (*Candle, error)

Save executes the query and returns the updated Candle entity.

func (*CandleUpdateOne) SaveX

func (cuo *CandleUpdateOne) SaveX(ctx context.Context) *Candle

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

func (*CandleUpdateOne) Select

func (cuo *CandleUpdateOne) Select(field string, fields ...string) *CandleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CandleUpdateOne) SetAdjustedClose

func (cuo *CandleUpdateOne) SetAdjustedClose(f float64) *CandleUpdateOne

SetAdjustedClose sets the "adjusted_close" field.

func (*CandleUpdateOne) SetAsk

func (cuo *CandleUpdateOne) SetAsk(f float64) *CandleUpdateOne

SetAsk sets the "ask" field.

func (*CandleUpdateOne) SetBarTime

func (cuo *CandleUpdateOne) SetBarTime(t time.Time) *CandleUpdateOne

SetBarTime sets the "bar_time" field.

func (*CandleUpdateOne) SetBid

func (cuo *CandleUpdateOne) SetBid(f float64) *CandleUpdateOne

SetBid sets the "bid" field.

func (*CandleUpdateOne) SetClose

func (cuo *CandleUpdateOne) SetClose(f float64) *CandleUpdateOne

SetClose sets the "close" field.

func (*CandleUpdateOne) SetExchange

func (cuo *CandleUpdateOne) SetExchange(s string) *CandleUpdateOne

SetExchange sets the "exchange" field.

func (*CandleUpdateOne) SetHigh

func (cuo *CandleUpdateOne) SetHigh(f float64) *CandleUpdateOne

SetHigh sets the "high" field.

func (*CandleUpdateOne) SetIsComplete

func (cuo *CandleUpdateOne) SetIsComplete(b bool) *CandleUpdateOne

SetIsComplete sets the "is_complete" field.

func (*CandleUpdateOne) SetLow

func (cuo *CandleUpdateOne) SetLow(f float64) *CandleUpdateOne

SetLow sets the "low" field.

func (*CandleUpdateOne) SetMetadata

func (cuo *CandleUpdateOne) SetMetadata(m map[string]interface{}) *CandleUpdateOne

SetMetadata sets the "metadata" field.

func (*CandleUpdateOne) SetNillableAdjustedClose

func (cuo *CandleUpdateOne) SetNillableAdjustedClose(f *float64) *CandleUpdateOne

SetNillableAdjustedClose sets the "adjusted_close" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableAsk

func (cuo *CandleUpdateOne) SetNillableAsk(f *float64) *CandleUpdateOne

SetNillableAsk sets the "ask" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableBarTime

func (cuo *CandleUpdateOne) SetNillableBarTime(t *time.Time) *CandleUpdateOne

SetNillableBarTime sets the "bar_time" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableBid

func (cuo *CandleUpdateOne) SetNillableBid(f *float64) *CandleUpdateOne

SetNillableBid sets the "bid" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableClose

func (cuo *CandleUpdateOne) SetNillableClose(f *float64) *CandleUpdateOne

SetNillableClose sets the "close" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableExchange

func (cuo *CandleUpdateOne) SetNillableExchange(s *string) *CandleUpdateOne

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableHigh

func (cuo *CandleUpdateOne) SetNillableHigh(f *float64) *CandleUpdateOne

SetNillableHigh sets the "high" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableIsComplete

func (cuo *CandleUpdateOne) SetNillableIsComplete(b *bool) *CandleUpdateOne

SetNillableIsComplete sets the "is_complete" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableLow

func (cuo *CandleUpdateOne) SetNillableLow(f *float64) *CandleUpdateOne

SetNillableLow sets the "low" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableOpen

func (cuo *CandleUpdateOne) SetNillableOpen(f *float64) *CandleUpdateOne

SetNillableOpen sets the "open" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableQuality

func (cuo *CandleUpdateOne) SetNillableQuality(c *candle.Quality) *CandleUpdateOne

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableSource

func (cuo *CandleUpdateOne) SetNillableSource(s *string) *CandleUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableSpread

func (cuo *CandleUpdateOne) SetNillableSpread(f *float64) *CandleUpdateOne

SetNillableSpread sets the "spread" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableSymbolID

func (cuo *CandleUpdateOne) SetNillableSymbolID(id *uuid.UUID) *CandleUpdateOne

SetNillableSymbolID sets the "symbol" edge to the Symbol entity by ID if the given value is not nil.

func (*CandleUpdateOne) SetNillableSymbolName

func (cuo *CandleUpdateOne) SetNillableSymbolName(s *string) *CandleUpdateOne

SetNillableSymbolName sets the "symbol_name" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableTimeframe

func (cuo *CandleUpdateOne) SetNillableTimeframe(c *candle.Timeframe) *CandleUpdateOne

SetNillableTimeframe sets the "timeframe" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableTimestamp

func (cuo *CandleUpdateOne) SetNillableTimestamp(i *int64) *CandleUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableTradeCount

func (cuo *CandleUpdateOne) SetNillableTradeCount(i *int64) *CandleUpdateOne

SetNillableTradeCount sets the "trade_count" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableVolume

func (cuo *CandleUpdateOne) SetNillableVolume(f *float64) *CandleUpdateOne

SetNillableVolume sets the "volume" field if the given value is not nil.

func (*CandleUpdateOne) SetNillableVolumeWeightedPrice

func (cuo *CandleUpdateOne) SetNillableVolumeWeightedPrice(f *float64) *CandleUpdateOne

SetNillableVolumeWeightedPrice sets the "volume_weighted_price" field if the given value is not nil.

func (*CandleUpdateOne) SetOpen

func (cuo *CandleUpdateOne) SetOpen(f float64) *CandleUpdateOne

SetOpen sets the "open" field.

func (*CandleUpdateOne) SetQuality

func (cuo *CandleUpdateOne) SetQuality(c candle.Quality) *CandleUpdateOne

SetQuality sets the "quality" field.

func (*CandleUpdateOne) SetSource

func (cuo *CandleUpdateOne) SetSource(s string) *CandleUpdateOne

SetSource sets the "source" field.

func (*CandleUpdateOne) SetSpread

func (cuo *CandleUpdateOne) SetSpread(f float64) *CandleUpdateOne

SetSpread sets the "spread" field.

func (*CandleUpdateOne) SetSymbol

func (cuo *CandleUpdateOne) SetSymbol(s *Symbol) *CandleUpdateOne

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*CandleUpdateOne) SetSymbolID

func (cuo *CandleUpdateOne) SetSymbolID(id uuid.UUID) *CandleUpdateOne

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*CandleUpdateOne) SetSymbolName

func (cuo *CandleUpdateOne) SetSymbolName(s string) *CandleUpdateOne

SetSymbolName sets the "symbol_name" field.

func (*CandleUpdateOne) SetTimeframe

func (cuo *CandleUpdateOne) SetTimeframe(c candle.Timeframe) *CandleUpdateOne

SetTimeframe sets the "timeframe" field.

func (*CandleUpdateOne) SetTimestamp

func (cuo *CandleUpdateOne) SetTimestamp(i int64) *CandleUpdateOne

SetTimestamp sets the "timestamp" field.

func (*CandleUpdateOne) SetTradeCount

func (cuo *CandleUpdateOne) SetTradeCount(i int64) *CandleUpdateOne

SetTradeCount sets the "trade_count" field.

func (*CandleUpdateOne) SetUpdatedAt

func (cuo *CandleUpdateOne) SetUpdatedAt(t time.Time) *CandleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CandleUpdateOne) SetVolume

func (cuo *CandleUpdateOne) SetVolume(f float64) *CandleUpdateOne

SetVolume sets the "volume" field.

func (*CandleUpdateOne) SetVolumeWeightedPrice

func (cuo *CandleUpdateOne) SetVolumeWeightedPrice(f float64) *CandleUpdateOne

SetVolumeWeightedPrice sets the "volume_weighted_price" field.

func (*CandleUpdateOne) Where

func (cuo *CandleUpdateOne) Where(ps ...predicate.Candle) *CandleUpdateOne

Where appends a list predicates to the CandleUpdate builder.

type Candles

type Candles []*Candle

Candles is a parsable slice of Candle.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ActiveSession is the client for interacting with the ActiveSession builders.
	ActiveSession *ActiveSessionClient
	// Candle is the client for interacting with the Candle builders.
	Candle *CandleClient
	// Indicator is the client for interacting with the Indicator builders.
	Indicator *IndicatorClient
	// IndicatorData is the client for interacting with the IndicatorData builders.
	IndicatorData *IndicatorDataClient
	// StudySession is the client for interacting with the StudySession builders.
	StudySession *StudySessionClient
	// Symbol is the client for interacting with the Symbol builders.
	Symbol *SymbolClient
	// 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().
	ActiveSession.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

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(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

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

Committer is the interface that wraps the Commit 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 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 uuid.UUID `json:"id,omitempty"`
	// Unique identifier for the indicator within session
	IndicatorID string `json:"indicator_id,omitempty"`
	// Type of technical indicator
	Type indicator.Type `json:"type,omitempty"`
	// Display name for the indicator
	Name string `json:"name,omitempty"`
	// TradingView script identifier
	ScriptID string `json:"script_id,omitempty"`
	// Indicator version
	Version string `json:"version,omitempty"`
	// Indicator configuration parameters
	Parameters map[string]interface{} `json:"parameters,omitempty"`
	// Output field names for this indicator
	Outputs []string `json:"outputs,omitempty"`
	// Whether indicator is active
	Enabled bool `json:"enabled,omitempty"`
	// Current indicator status
	Status indicator.Status `json:"status,omitempty"`
	// Last error message if any
	ErrorMessage string `json:"error_message,omitempty"`
	// Last time indicator was calculated
	LastCalculated time.Time `json:"last_calculated,omitempty"`
	// Number of times indicator has been calculated
	CalculationCount int `json:"calculation_count,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,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) QueryData

func (i *Indicator) QueryData() *IndicatorDataQuery

QueryData queries the "data" edge of the Indicator entity.

func (*Indicator) QueryStudySession

func (i *Indicator) QueryStudySession() *StudySessionQuery

QueryStudySession queries the "study_session" 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.

func (*Indicator) Value

func (i *Indicator) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Indicator. This includes values selected through modifiers, order, etc.

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 builder for creating a Indicator entity.

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 builder for deleting the given entity.

func (*IndicatorClient) DeleteOneID

func (c *IndicatorClient) DeleteOneID(id uuid.UUID) *IndicatorDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IndicatorClient) Get

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

Get returns a Indicator entity by its id.

func (*IndicatorClient) GetX

func (c *IndicatorClient) GetX(ctx context.Context, id uuid.UUID) *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) Intercept

func (c *IndicatorClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `indicator.Intercept(f(g(h())))`.

func (*IndicatorClient) Interceptors

func (c *IndicatorClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IndicatorClient) MapCreateBulk

func (c *IndicatorClient) MapCreateBulk(slice any, setFunc func(*IndicatorCreate, int)) *IndicatorCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IndicatorClient) Query

func (c *IndicatorClient) Query() *IndicatorQuery

Query returns a query builder for Indicator.

func (*IndicatorClient) QueryData

func (c *IndicatorClient) QueryData(i *Indicator) *IndicatorDataQuery

QueryData queries the data edge of a Indicator.

func (*IndicatorClient) QueryStudySession

func (c *IndicatorClient) QueryStudySession(i *Indicator) *StudySessionQuery

QueryStudySession queries the study_session 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 uuid.UUID) *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) AddData

func (ic *IndicatorCreate) AddData(i ...*IndicatorData) *IndicatorCreate

AddData adds the "data" edges to the IndicatorData entity.

func (*IndicatorCreate) AddDatumIDs

func (ic *IndicatorCreate) AddDatumIDs(ids ...uuid.UUID) *IndicatorCreate

AddDatumIDs adds the "data" edge to the IndicatorData entity by IDs.

func (*IndicatorCreate) Exec

func (ic *IndicatorCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IndicatorCreate) ExecX

func (ic *IndicatorCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

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

func (ic *IndicatorCreate) SetCalculationCount(i int) *IndicatorCreate

SetCalculationCount sets the "calculation_count" field.

func (*IndicatorCreate) SetCreatedAt

func (ic *IndicatorCreate) SetCreatedAt(t time.Time) *IndicatorCreate

SetCreatedAt sets the "created_at" field.

func (*IndicatorCreate) SetEnabled

func (ic *IndicatorCreate) SetEnabled(b bool) *IndicatorCreate

SetEnabled sets the "enabled" field.

func (*IndicatorCreate) SetErrorMessage

func (ic *IndicatorCreate) SetErrorMessage(s string) *IndicatorCreate

SetErrorMessage sets the "error_message" field.

func (*IndicatorCreate) SetID

func (ic *IndicatorCreate) SetID(u uuid.UUID) *IndicatorCreate

SetID sets the "id" field.

func (*IndicatorCreate) SetIndicatorID

func (ic *IndicatorCreate) SetIndicatorID(s string) *IndicatorCreate

SetIndicatorID sets the "indicator_id" field.

func (*IndicatorCreate) SetLastCalculated

func (ic *IndicatorCreate) SetLastCalculated(t time.Time) *IndicatorCreate

SetLastCalculated sets the "last_calculated" field.

func (*IndicatorCreate) SetName

func (ic *IndicatorCreate) SetName(s string) *IndicatorCreate

SetName sets the "name" field.

func (*IndicatorCreate) SetNillableCalculationCount

func (ic *IndicatorCreate) SetNillableCalculationCount(i *int) *IndicatorCreate

SetNillableCalculationCount sets the "calculation_count" field if the given value is not nil.

func (*IndicatorCreate) SetNillableCreatedAt

func (ic *IndicatorCreate) SetNillableCreatedAt(t *time.Time) *IndicatorCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IndicatorCreate) SetNillableEnabled

func (ic *IndicatorCreate) SetNillableEnabled(b *bool) *IndicatorCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*IndicatorCreate) SetNillableErrorMessage

func (ic *IndicatorCreate) SetNillableErrorMessage(s *string) *IndicatorCreate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*IndicatorCreate) SetNillableID

func (ic *IndicatorCreate) SetNillableID(u *uuid.UUID) *IndicatorCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*IndicatorCreate) SetNillableLastCalculated

func (ic *IndicatorCreate) SetNillableLastCalculated(t *time.Time) *IndicatorCreate

SetNillableLastCalculated sets the "last_calculated" field if the given value is not nil.

func (*IndicatorCreate) SetNillableScriptID

func (ic *IndicatorCreate) SetNillableScriptID(s *string) *IndicatorCreate

SetNillableScriptID sets the "script_id" field if the given value is not nil.

func (*IndicatorCreate) SetNillableStatus

func (ic *IndicatorCreate) SetNillableStatus(i *indicator.Status) *IndicatorCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IndicatorCreate) SetNillableUpdatedAt

func (ic *IndicatorCreate) SetNillableUpdatedAt(t *time.Time) *IndicatorCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IndicatorCreate) SetNillableVersion

func (ic *IndicatorCreate) SetNillableVersion(s *string) *IndicatorCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*IndicatorCreate) SetOutputs

func (ic *IndicatorCreate) SetOutputs(s []string) *IndicatorCreate

SetOutputs sets the "outputs" field.

func (*IndicatorCreate) SetParameters

func (ic *IndicatorCreate) SetParameters(m map[string]interface{}) *IndicatorCreate

SetParameters sets the "parameters" field.

func (*IndicatorCreate) SetScriptID

func (ic *IndicatorCreate) SetScriptID(s string) *IndicatorCreate

SetScriptID sets the "script_id" field.

func (*IndicatorCreate) SetStatus

func (ic *IndicatorCreate) SetStatus(i indicator.Status) *IndicatorCreate

SetStatus sets the "status" field.

func (*IndicatorCreate) SetStudySession

func (ic *IndicatorCreate) SetStudySession(s *StudySession) *IndicatorCreate

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorCreate) SetStudySessionID

func (ic *IndicatorCreate) SetStudySessionID(id uuid.UUID) *IndicatorCreate

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorCreate) SetType

SetType sets the "type" field.

func (*IndicatorCreate) SetUpdatedAt

func (ic *IndicatorCreate) SetUpdatedAt(t time.Time) *IndicatorCreate

SetUpdatedAt sets the "updated_at" field.

func (*IndicatorCreate) SetVersion

func (ic *IndicatorCreate) SetVersion(s string) *IndicatorCreate

SetVersion sets the "version" field.

type IndicatorCreateBulk

type IndicatorCreateBulk struct {
	// contains filtered or unexported fields
}

IndicatorCreateBulk is the builder for creating many Indicator entities in bulk.

func (*IndicatorCreateBulk) Exec

func (icb *IndicatorCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IndicatorCreateBulk) ExecX

func (icb *IndicatorCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

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 IndicatorData

type IndicatorData struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Unix timestamp of the data point
	Timestamp int64 `json:"timestamp,omitempty"`
	// Bar/candle time this indicator value corresponds to
	BarTime time.Time `json:"bar_time,omitempty"`
	// Calculated indicator values (e.g., {"rsi": 65.23})
	Values map[string]interface{} `json:"values,omitempty"`
	// Primary indicator value for quick queries
	PrimaryValue float64 `json:"primary_value,omitempty"`
	// Additional metadata about the calculation
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// Data quality indicator
	Quality indicatordata.Quality `json:"quality,omitempty"`
	// Unique ID for this calculation batch
	CalculationID string `json:"calculation_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the IndicatorDataQuery when eager-loading is set.
	Edges IndicatorDataEdges `json:"edges"`
	// contains filtered or unexported fields
}

IndicatorData is the model entity for the IndicatorData schema.

func (*IndicatorData) QueryIndicator

func (id *IndicatorData) QueryIndicator() *IndicatorQuery

QueryIndicator queries the "indicator" edge of the IndicatorData entity.

func (*IndicatorData) QueryStudySession

func (id *IndicatorData) QueryStudySession() *StudySessionQuery

QueryStudySession queries the "study_session" edge of the IndicatorData entity.

func (*IndicatorData) String

func (id *IndicatorData) String() string

String implements the fmt.Stringer.

func (*IndicatorData) Unwrap

func (id *IndicatorData) Unwrap() *IndicatorData

Unwrap unwraps the IndicatorData 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 (*IndicatorData) Update

func (id *IndicatorData) Update() *IndicatorDataUpdateOne

Update returns a builder for updating this IndicatorData. Note that you need to call IndicatorData.Unwrap() before calling this method if this IndicatorData was returned from a transaction, and the transaction was committed or rolled back.

func (*IndicatorData) Value

func (id *IndicatorData) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the IndicatorData. This includes values selected through modifiers, order, etc.

type IndicatorDataClient

type IndicatorDataClient struct {
	// contains filtered or unexported fields
}

IndicatorDataClient is a client for the IndicatorData schema.

func NewIndicatorDataClient

func NewIndicatorDataClient(c config) *IndicatorDataClient

NewIndicatorDataClient returns a client for the IndicatorData from the given config.

func (*IndicatorDataClient) Create

Create returns a builder for creating a IndicatorData entity.

func (*IndicatorDataClient) CreateBulk

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

func (*IndicatorDataClient) Delete

Delete returns a delete builder for IndicatorData.

func (*IndicatorDataClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IndicatorDataClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IndicatorDataClient) Get

Get returns a IndicatorData entity by its id.

func (*IndicatorDataClient) GetX

GetX is like Get, but panics if an error occurs.

func (*IndicatorDataClient) Hooks

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

Hooks returns the client hooks.

func (*IndicatorDataClient) Intercept

func (c *IndicatorDataClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `indicatordata.Intercept(f(g(h())))`.

func (*IndicatorDataClient) Interceptors

func (c *IndicatorDataClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IndicatorDataClient) MapCreateBulk

func (c *IndicatorDataClient) MapCreateBulk(slice any, setFunc func(*IndicatorDataCreate, int)) *IndicatorDataCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*IndicatorDataClient) Query

Query returns a query builder for IndicatorData.

func (*IndicatorDataClient) QueryIndicator

func (c *IndicatorDataClient) QueryIndicator(node *IndicatorData) *IndicatorQuery

QueryIndicator queries the indicator edge of a IndicatorData.

func (*IndicatorDataClient) QueryStudySession

func (c *IndicatorDataClient) QueryStudySession(node *IndicatorData) *StudySessionQuery

QueryStudySession queries the study_session edge of a IndicatorData.

func (*IndicatorDataClient) Update

Update returns an update builder for IndicatorData.

func (*IndicatorDataClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IndicatorDataClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*IndicatorDataClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `indicatordata.Hooks(f(g(h())))`.

type IndicatorDataCreate

type IndicatorDataCreate struct {
	// contains filtered or unexported fields
}

IndicatorDataCreate is the builder for creating a IndicatorData entity.

func (*IndicatorDataCreate) Exec

func (idc *IndicatorDataCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IndicatorDataCreate) ExecX

func (idc *IndicatorDataCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataCreate) Mutation

func (idc *IndicatorDataCreate) Mutation() *IndicatorDataMutation

Mutation returns the IndicatorDataMutation object of the builder.

func (*IndicatorDataCreate) Save

Save creates the IndicatorData in the database.

func (*IndicatorDataCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IndicatorDataCreate) SetBarTime

func (idc *IndicatorDataCreate) SetBarTime(t time.Time) *IndicatorDataCreate

SetBarTime sets the "bar_time" field.

func (*IndicatorDataCreate) SetCalculationID

func (idc *IndicatorDataCreate) SetCalculationID(s string) *IndicatorDataCreate

SetCalculationID sets the "calculation_id" field.

func (*IndicatorDataCreate) SetCreatedAt

func (idc *IndicatorDataCreate) SetCreatedAt(t time.Time) *IndicatorDataCreate

SetCreatedAt sets the "created_at" field.

func (*IndicatorDataCreate) SetID

SetID sets the "id" field.

func (*IndicatorDataCreate) SetIndicator

func (idc *IndicatorDataCreate) SetIndicator(i *Indicator) *IndicatorDataCreate

SetIndicator sets the "indicator" edge to the Indicator entity.

func (*IndicatorDataCreate) SetIndicatorID

func (idc *IndicatorDataCreate) SetIndicatorID(id uuid.UUID) *IndicatorDataCreate

SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.

func (*IndicatorDataCreate) SetMetadata

func (idc *IndicatorDataCreate) SetMetadata(m map[string]interface{}) *IndicatorDataCreate

SetMetadata sets the "metadata" field.

func (*IndicatorDataCreate) SetNillableCalculationID

func (idc *IndicatorDataCreate) SetNillableCalculationID(s *string) *IndicatorDataCreate

SetNillableCalculationID sets the "calculation_id" field if the given value is not nil.

func (*IndicatorDataCreate) SetNillableCreatedAt

func (idc *IndicatorDataCreate) SetNillableCreatedAt(t *time.Time) *IndicatorDataCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IndicatorDataCreate) SetNillableID

func (idc *IndicatorDataCreate) SetNillableID(u *uuid.UUID) *IndicatorDataCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*IndicatorDataCreate) SetNillablePrimaryValue

func (idc *IndicatorDataCreate) SetNillablePrimaryValue(f *float64) *IndicatorDataCreate

SetNillablePrimaryValue sets the "primary_value" field if the given value is not nil.

func (*IndicatorDataCreate) SetNillableQuality

func (idc *IndicatorDataCreate) SetNillableQuality(i *indicatordata.Quality) *IndicatorDataCreate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*IndicatorDataCreate) SetPrimaryValue

func (idc *IndicatorDataCreate) SetPrimaryValue(f float64) *IndicatorDataCreate

SetPrimaryValue sets the "primary_value" field.

func (*IndicatorDataCreate) SetQuality

SetQuality sets the "quality" field.

func (*IndicatorDataCreate) SetStudySession

func (idc *IndicatorDataCreate) SetStudySession(s *StudySession) *IndicatorDataCreate

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorDataCreate) SetStudySessionID

func (idc *IndicatorDataCreate) SetStudySessionID(id uuid.UUID) *IndicatorDataCreate

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorDataCreate) SetTimestamp

func (idc *IndicatorDataCreate) SetTimestamp(i int64) *IndicatorDataCreate

SetTimestamp sets the "timestamp" field.

func (*IndicatorDataCreate) SetValues

func (idc *IndicatorDataCreate) SetValues(m map[string]interface{}) *IndicatorDataCreate

SetValues sets the "values" field.

type IndicatorDataCreateBulk

type IndicatorDataCreateBulk struct {
	// contains filtered or unexported fields
}

IndicatorDataCreateBulk is the builder for creating many IndicatorData entities in bulk.

func (*IndicatorDataCreateBulk) Exec

func (idcb *IndicatorDataCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IndicatorDataCreateBulk) ExecX

func (idcb *IndicatorDataCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataCreateBulk) Save

Save creates the IndicatorData entities in the database.

func (*IndicatorDataCreateBulk) SaveX

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

type IndicatorDataDelete

type IndicatorDataDelete struct {
	// contains filtered or unexported fields
}

IndicatorDataDelete is the builder for deleting a IndicatorData entity.

func (*IndicatorDataDelete) Exec

func (idd *IndicatorDataDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IndicatorDataDelete) ExecX

func (idd *IndicatorDataDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataDelete) Where

Where appends a list predicates to the IndicatorDataDelete builder.

type IndicatorDataDeleteOne

type IndicatorDataDeleteOne struct {
	// contains filtered or unexported fields
}

IndicatorDataDeleteOne is the builder for deleting a single IndicatorData entity.

func (*IndicatorDataDeleteOne) Exec

func (iddo *IndicatorDataDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IndicatorDataDeleteOne) ExecX

func (iddo *IndicatorDataDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataDeleteOne) Where

Where appends a list predicates to the IndicatorDataDelete builder.

type IndicatorDataEdges

type IndicatorDataEdges struct {
	// Study session this data belongs to
	StudySession *StudySession `json:"study_session,omitempty"`
	// Indicator that generated this data
	Indicator *Indicator `json:"indicator,omitempty"`
	// contains filtered or unexported fields
}

IndicatorDataEdges holds the relations/edges for other nodes in the graph.

func (IndicatorDataEdges) IndicatorOrErr

func (e IndicatorDataEdges) 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 (IndicatorDataEdges) StudySessionOrErr

func (e IndicatorDataEdges) StudySessionOrErr() (*StudySession, error)

StudySessionOrErr returns the StudySession value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type IndicatorDataGroupBy

type IndicatorDataGroupBy struct {
	// contains filtered or unexported fields
}

IndicatorDataGroupBy is the group-by builder for IndicatorData entities.

func (*IndicatorDataGroupBy) Aggregate

func (idgb *IndicatorDataGroupBy) Aggregate(fns ...AggregateFunc) *IndicatorDataGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*IndicatorDataGroupBy) Bool

func (s *IndicatorDataGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) BoolX

func (s *IndicatorDataGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IndicatorDataGroupBy) Bools

func (s *IndicatorDataGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) BoolsX

func (s *IndicatorDataGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IndicatorDataGroupBy) Float64

func (s *IndicatorDataGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) Float64X

func (s *IndicatorDataGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IndicatorDataGroupBy) Float64s

func (s *IndicatorDataGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) Float64sX

func (s *IndicatorDataGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IndicatorDataGroupBy) Int

func (s *IndicatorDataGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) IntX

func (s *IndicatorDataGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IndicatorDataGroupBy) Ints

func (s *IndicatorDataGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) IntsX

func (s *IndicatorDataGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IndicatorDataGroupBy) Scan

func (idgb *IndicatorDataGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IndicatorDataGroupBy) ScanX

func (s *IndicatorDataGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IndicatorDataGroupBy) String

func (s *IndicatorDataGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IndicatorDataGroupBy) StringX

func (s *IndicatorDataGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IndicatorDataGroupBy) Strings

func (s *IndicatorDataGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*IndicatorDataGroupBy) StringsX

func (s *IndicatorDataGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IndicatorDataMutation

type IndicatorDataMutation struct {
	// contains filtered or unexported fields
}

IndicatorDataMutation represents an operation that mutates the IndicatorData nodes in the graph.

func (*IndicatorDataMutation) AddField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) AddPrimaryValue

func (m *IndicatorDataMutation) AddPrimaryValue(f float64)

AddPrimaryValue adds f to the "primary_value" field.

func (*IndicatorDataMutation) AddTimestamp

func (m *IndicatorDataMutation) AddTimestamp(i int64)

AddTimestamp adds i to the "timestamp" field.

func (*IndicatorDataMutation) AddedEdges

func (m *IndicatorDataMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IndicatorDataMutation) AddedField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) AddedFields

func (m *IndicatorDataMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IndicatorDataMutation) AddedIDs

func (m *IndicatorDataMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IndicatorDataMutation) AddedPrimaryValue

func (m *IndicatorDataMutation) AddedPrimaryValue() (r float64, exists bool)

AddedPrimaryValue returns the value that was added to the "primary_value" field in this mutation.

func (*IndicatorDataMutation) AddedTimestamp

func (m *IndicatorDataMutation) AddedTimestamp() (r int64, exists bool)

AddedTimestamp returns the value that was added to the "timestamp" field in this mutation.

func (*IndicatorDataMutation) BarTime

func (m *IndicatorDataMutation) BarTime() (r time.Time, exists bool)

BarTime returns the value of the "bar_time" field in the mutation.

func (*IndicatorDataMutation) CalculationID

func (m *IndicatorDataMutation) CalculationID() (r string, exists bool)

CalculationID returns the value of the "calculation_id" field in the mutation.

func (*IndicatorDataMutation) CalculationIDCleared

func (m *IndicatorDataMutation) CalculationIDCleared() bool

CalculationIDCleared returns if the "calculation_id" field was cleared in this mutation.

func (*IndicatorDataMutation) ClearCalculationID

func (m *IndicatorDataMutation) ClearCalculationID()

ClearCalculationID clears the value of the "calculation_id" field.

func (*IndicatorDataMutation) ClearEdge

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ClearField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ClearIndicator

func (m *IndicatorDataMutation) ClearIndicator()

ClearIndicator clears the "indicator" edge to the Indicator entity.

func (*IndicatorDataMutation) ClearMetadata

func (m *IndicatorDataMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*IndicatorDataMutation) ClearPrimaryValue

func (m *IndicatorDataMutation) ClearPrimaryValue()

ClearPrimaryValue clears the value of the "primary_value" field.

func (*IndicatorDataMutation) ClearStudySession

func (m *IndicatorDataMutation) ClearStudySession()

ClearStudySession clears the "study_session" edge to the StudySession entity.

func (*IndicatorDataMutation) ClearedEdges

func (m *IndicatorDataMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IndicatorDataMutation) ClearedFields

func (m *IndicatorDataMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IndicatorDataMutation) Client

func (m IndicatorDataMutation) 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 (*IndicatorDataMutation) CreatedAt

func (m *IndicatorDataMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IndicatorDataMutation) EdgeCleared

func (m *IndicatorDataMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IndicatorDataMutation) Field

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) FieldCleared

func (m *IndicatorDataMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IndicatorDataMutation) Fields

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ID

func (m *IndicatorDataMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*IndicatorDataMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*IndicatorDataMutation) IndicatorCleared

func (m *IndicatorDataMutation) IndicatorCleared() bool

IndicatorCleared reports if the "indicator" edge to the Indicator entity was cleared.

func (*IndicatorDataMutation) IndicatorID

func (m *IndicatorDataMutation) IndicatorID() (id uuid.UUID, exists bool)

IndicatorID returns the "indicator" edge ID in the mutation.

func (*IndicatorDataMutation) IndicatorIDs

func (m *IndicatorDataMutation) IndicatorIDs() (ids []uuid.UUID)

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 (*IndicatorDataMutation) Metadata

func (m *IndicatorDataMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*IndicatorDataMutation) MetadataCleared

func (m *IndicatorDataMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*IndicatorDataMutation) OldBarTime

func (m *IndicatorDataMutation) OldBarTime(ctx context.Context) (v time.Time, err error)

OldBarTime returns the old "bar_time" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldCalculationID

func (m *IndicatorDataMutation) OldCalculationID(ctx context.Context) (v string, err error)

OldCalculationID returns the old "calculation_id" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldCreatedAt

func (m *IndicatorDataMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) OldMetadata

func (m *IndicatorDataMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldPrimaryValue

func (m *IndicatorDataMutation) OldPrimaryValue(ctx context.Context) (v float64, err error)

OldPrimaryValue returns the old "primary_value" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldQuality

func (m *IndicatorDataMutation) OldQuality(ctx context.Context) (v indicatordata.Quality, err error)

OldQuality returns the old "quality" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldTimestamp

func (m *IndicatorDataMutation) OldTimestamp(ctx context.Context) (v int64, err error)

OldTimestamp returns the old "timestamp" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) OldValues

func (m *IndicatorDataMutation) OldValues(ctx context.Context) (v map[string]interface{}, err error)

OldValues returns the old "values" field's value of the IndicatorData entity. If the IndicatorData 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 (*IndicatorDataMutation) Op

func (m *IndicatorDataMutation) Op() Op

Op returns the operation name.

func (*IndicatorDataMutation) PrimaryValue

func (m *IndicatorDataMutation) PrimaryValue() (r float64, exists bool)

PrimaryValue returns the value of the "primary_value" field in the mutation.

func (*IndicatorDataMutation) PrimaryValueCleared

func (m *IndicatorDataMutation) PrimaryValueCleared() bool

PrimaryValueCleared returns if the "primary_value" field was cleared in this mutation.

func (*IndicatorDataMutation) Quality

func (m *IndicatorDataMutation) Quality() (r indicatordata.Quality, exists bool)

Quality returns the value of the "quality" field in the mutation.

func (*IndicatorDataMutation) RemovedEdges

func (m *IndicatorDataMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IndicatorDataMutation) RemovedIDs

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ResetBarTime

func (m *IndicatorDataMutation) ResetBarTime()

ResetBarTime resets all changes to the "bar_time" field.

func (*IndicatorDataMutation) ResetCalculationID

func (m *IndicatorDataMutation) ResetCalculationID()

ResetCalculationID resets all changes to the "calculation_id" field.

func (*IndicatorDataMutation) ResetCreatedAt

func (m *IndicatorDataMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IndicatorDataMutation) ResetEdge

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ResetField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) ResetIndicator

func (m *IndicatorDataMutation) ResetIndicator()

ResetIndicator resets all changes to the "indicator" edge.

func (*IndicatorDataMutation) ResetMetadata

func (m *IndicatorDataMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*IndicatorDataMutation) ResetPrimaryValue

func (m *IndicatorDataMutation) ResetPrimaryValue()

ResetPrimaryValue resets all changes to the "primary_value" field.

func (*IndicatorDataMutation) ResetQuality

func (m *IndicatorDataMutation) ResetQuality()

ResetQuality resets all changes to the "quality" field.

func (*IndicatorDataMutation) ResetStudySession

func (m *IndicatorDataMutation) ResetStudySession()

ResetStudySession resets all changes to the "study_session" edge.

func (*IndicatorDataMutation) ResetTimestamp

func (m *IndicatorDataMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*IndicatorDataMutation) ResetValues

func (m *IndicatorDataMutation) ResetValues()

ResetValues resets all changes to the "values" field.

func (*IndicatorDataMutation) SetBarTime

func (m *IndicatorDataMutation) SetBarTime(t time.Time)

SetBarTime sets the "bar_time" field.

func (*IndicatorDataMutation) SetCalculationID

func (m *IndicatorDataMutation) SetCalculationID(s string)

SetCalculationID sets the "calculation_id" field.

func (*IndicatorDataMutation) SetCreatedAt

func (m *IndicatorDataMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IndicatorDataMutation) SetField

func (m *IndicatorDataMutation) 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 (*IndicatorDataMutation) SetID

func (m *IndicatorDataMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IndicatorData entities.

func (*IndicatorDataMutation) SetIndicatorID

func (m *IndicatorDataMutation) SetIndicatorID(id uuid.UUID)

SetIndicatorID sets the "indicator" edge to the Indicator entity by id.

func (*IndicatorDataMutation) SetMetadata

func (m *IndicatorDataMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*IndicatorDataMutation) SetOp

func (m *IndicatorDataMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IndicatorDataMutation) SetPrimaryValue

func (m *IndicatorDataMutation) SetPrimaryValue(f float64)

SetPrimaryValue sets the "primary_value" field.

func (*IndicatorDataMutation) SetQuality

func (m *IndicatorDataMutation) SetQuality(i indicatordata.Quality)

SetQuality sets the "quality" field.

func (*IndicatorDataMutation) SetStudySessionID

func (m *IndicatorDataMutation) SetStudySessionID(id uuid.UUID)

SetStudySessionID sets the "study_session" edge to the StudySession entity by id.

func (*IndicatorDataMutation) SetTimestamp

func (m *IndicatorDataMutation) SetTimestamp(i int64)

SetTimestamp sets the "timestamp" field.

func (*IndicatorDataMutation) SetValues

func (m *IndicatorDataMutation) SetValues(value map[string]interface{})

SetValues sets the "values" field.

func (*IndicatorDataMutation) StudySessionCleared

func (m *IndicatorDataMutation) StudySessionCleared() bool

StudySessionCleared reports if the "study_session" edge to the StudySession entity was cleared.

func (*IndicatorDataMutation) StudySessionID

func (m *IndicatorDataMutation) StudySessionID() (id uuid.UUID, exists bool)

StudySessionID returns the "study_session" edge ID in the mutation.

func (*IndicatorDataMutation) StudySessionIDs

func (m *IndicatorDataMutation) StudySessionIDs() (ids []uuid.UUID)

StudySessionIDs returns the "study_session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StudySessionID instead. It exists only for internal usage by the builders.

func (*IndicatorDataMutation) Timestamp

func (m *IndicatorDataMutation) Timestamp() (r int64, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (IndicatorDataMutation) Tx

func (m IndicatorDataMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IndicatorDataMutation) Type

func (m *IndicatorDataMutation) Type() string

Type returns the node type of this mutation (IndicatorData).

func (*IndicatorDataMutation) Values

func (m *IndicatorDataMutation) Values() (r map[string]interface{}, exists bool)

Values returns the value of the "values" field in the mutation.

func (*IndicatorDataMutation) Where

Where appends a list predicates to the IndicatorDataMutation builder.

func (*IndicatorDataMutation) WhereP

func (m *IndicatorDataMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IndicatorDataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IndicatorDataQuery

type IndicatorDataQuery struct {
	// contains filtered or unexported fields
}

IndicatorDataQuery is the builder for querying IndicatorData entities.

func (*IndicatorDataQuery) Aggregate

func (idq *IndicatorDataQuery) Aggregate(fns ...AggregateFunc) *IndicatorDataSelect

Aggregate returns a IndicatorDataSelect configured with the given aggregations.

func (*IndicatorDataQuery) All

All executes the query and returns a list of IndicatorDataSlice.

func (*IndicatorDataQuery) AllX

func (idq *IndicatorDataQuery) AllX(ctx context.Context) []*IndicatorData

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

func (*IndicatorDataQuery) Clone

func (idq *IndicatorDataQuery) Clone() *IndicatorDataQuery

Clone returns a duplicate of the IndicatorDataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IndicatorDataQuery) Count

func (idq *IndicatorDataQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IndicatorDataQuery) CountX

func (idq *IndicatorDataQuery) CountX(ctx context.Context) int

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

func (*IndicatorDataQuery) Exist

func (idq *IndicatorDataQuery) Exist(ctx context.Context) (bool, error)

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

func (*IndicatorDataQuery) ExistX

func (idq *IndicatorDataQuery) ExistX(ctx context.Context) bool

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

func (*IndicatorDataQuery) First

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

func (*IndicatorDataQuery) FirstID

func (idq *IndicatorDataQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*IndicatorDataQuery) FirstIDX

func (idq *IndicatorDataQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*IndicatorDataQuery) FirstX

func (idq *IndicatorDataQuery) FirstX(ctx context.Context) *IndicatorData

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

func (*IndicatorDataQuery) GroupBy

func (idq *IndicatorDataQuery) GroupBy(field string, fields ...string) *IndicatorDataGroupBy

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 {
	Timestamp int64 `json:"timestamp,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IndicatorData.Query().
	GroupBy(indicatordata.FieldTimestamp).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IndicatorDataQuery) IDs

func (idq *IndicatorDataQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*IndicatorDataQuery) IDsX

func (idq *IndicatorDataQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*IndicatorDataQuery) Limit

func (idq *IndicatorDataQuery) Limit(limit int) *IndicatorDataQuery

Limit the number of records to be returned by this query.

func (*IndicatorDataQuery) Offset

func (idq *IndicatorDataQuery) Offset(offset int) *IndicatorDataQuery

Offset to start from.

func (*IndicatorDataQuery) Only

Only returns a single IndicatorData entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IndicatorData entity is found. Returns a *NotFoundError when no IndicatorData entities are found.

func (*IndicatorDataQuery) OnlyID

func (idq *IndicatorDataQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only IndicatorData ID in the query. Returns a *NotSingularError when more than one IndicatorData ID is found. Returns a *NotFoundError when no entities are found.

func (*IndicatorDataQuery) OnlyIDX

func (idq *IndicatorDataQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*IndicatorDataQuery) OnlyX

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

func (*IndicatorDataQuery) Order

Order specifies how the records should be ordered.

func (*IndicatorDataQuery) QueryIndicator

func (idq *IndicatorDataQuery) QueryIndicator() *IndicatorQuery

QueryIndicator chains the current query on the "indicator" edge.

func (*IndicatorDataQuery) QueryStudySession

func (idq *IndicatorDataQuery) QueryStudySession() *StudySessionQuery

QueryStudySession chains the current query on the "study_session" edge.

func (*IndicatorDataQuery) Select

func (idq *IndicatorDataQuery) Select(fields ...string) *IndicatorDataSelect

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 {
	Timestamp int64 `json:"timestamp,omitempty"`
}

client.IndicatorData.Query().
	Select(indicatordata.FieldTimestamp).
	Scan(ctx, &v)

func (*IndicatorDataQuery) Unique

func (idq *IndicatorDataQuery) Unique(unique bool) *IndicatorDataQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*IndicatorDataQuery) Where

Where adds a new predicate for the IndicatorDataQuery builder.

func (*IndicatorDataQuery) WithIndicator

func (idq *IndicatorDataQuery) WithIndicator(opts ...func(*IndicatorQuery)) *IndicatorDataQuery

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 (*IndicatorDataQuery) WithStudySession

func (idq *IndicatorDataQuery) WithStudySession(opts ...func(*StudySessionQuery)) *IndicatorDataQuery

WithStudySession tells the query-builder to eager-load the nodes that are connected to the "study_session" edge. The optional arguments are used to configure the query builder of the edge.

type IndicatorDataSelect

type IndicatorDataSelect struct {
	*IndicatorDataQuery
	// contains filtered or unexported fields
}

IndicatorDataSelect is the builder for selecting fields of IndicatorData entities.

func (*IndicatorDataSelect) Aggregate

func (ids *IndicatorDataSelect) Aggregate(fns ...AggregateFunc) *IndicatorDataSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IndicatorDataSelect) Bool

func (s *IndicatorDataSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) BoolX

func (s *IndicatorDataSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IndicatorDataSelect) Bools

func (s *IndicatorDataSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) BoolsX

func (s *IndicatorDataSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IndicatorDataSelect) Float64

func (s *IndicatorDataSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) Float64X

func (s *IndicatorDataSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IndicatorDataSelect) Float64s

func (s *IndicatorDataSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) Float64sX

func (s *IndicatorDataSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IndicatorDataSelect) Int

func (s *IndicatorDataSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) IntX

func (s *IndicatorDataSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IndicatorDataSelect) Ints

func (s *IndicatorDataSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) IntsX

func (s *IndicatorDataSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IndicatorDataSelect) Scan

func (ids *IndicatorDataSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IndicatorDataSelect) ScanX

func (s *IndicatorDataSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IndicatorDataSelect) String

func (s *IndicatorDataSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IndicatorDataSelect) StringX

func (s *IndicatorDataSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IndicatorDataSelect) Strings

func (s *IndicatorDataSelect) Strings(ctx context.Context) ([]string, error)

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

func (*IndicatorDataSelect) StringsX

func (s *IndicatorDataSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IndicatorDataSlice

type IndicatorDataSlice []*IndicatorData

IndicatorDataSlice is a parsable slice of IndicatorData.

type IndicatorDataUpdate

type IndicatorDataUpdate struct {
	// contains filtered or unexported fields
}

IndicatorDataUpdate is the builder for updating IndicatorData entities.

func (*IndicatorDataUpdate) AddPrimaryValue

func (idu *IndicatorDataUpdate) AddPrimaryValue(f float64) *IndicatorDataUpdate

AddPrimaryValue adds f to the "primary_value" field.

func (*IndicatorDataUpdate) AddTimestamp

func (idu *IndicatorDataUpdate) AddTimestamp(i int64) *IndicatorDataUpdate

AddTimestamp adds i to the "timestamp" field.

func (*IndicatorDataUpdate) ClearCalculationID

func (idu *IndicatorDataUpdate) ClearCalculationID() *IndicatorDataUpdate

ClearCalculationID clears the value of the "calculation_id" field.

func (*IndicatorDataUpdate) ClearIndicator

func (idu *IndicatorDataUpdate) ClearIndicator() *IndicatorDataUpdate

ClearIndicator clears the "indicator" edge to the Indicator entity.

func (*IndicatorDataUpdate) ClearMetadata

func (idu *IndicatorDataUpdate) ClearMetadata() *IndicatorDataUpdate

ClearMetadata clears the value of the "metadata" field.

func (*IndicatorDataUpdate) ClearPrimaryValue

func (idu *IndicatorDataUpdate) ClearPrimaryValue() *IndicatorDataUpdate

ClearPrimaryValue clears the value of the "primary_value" field.

func (*IndicatorDataUpdate) ClearStudySession

func (idu *IndicatorDataUpdate) ClearStudySession() *IndicatorDataUpdate

ClearStudySession clears the "study_session" edge to the StudySession entity.

func (*IndicatorDataUpdate) Exec

func (idu *IndicatorDataUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IndicatorDataUpdate) ExecX

func (idu *IndicatorDataUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataUpdate) Mutation

func (idu *IndicatorDataUpdate) Mutation() *IndicatorDataMutation

Mutation returns the IndicatorDataMutation object of the builder.

func (*IndicatorDataUpdate) Save

func (idu *IndicatorDataUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IndicatorDataUpdate) SaveX

func (idu *IndicatorDataUpdate) SaveX(ctx context.Context) int

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

func (*IndicatorDataUpdate) SetBarTime

func (idu *IndicatorDataUpdate) SetBarTime(t time.Time) *IndicatorDataUpdate

SetBarTime sets the "bar_time" field.

func (*IndicatorDataUpdate) SetCalculationID

func (idu *IndicatorDataUpdate) SetCalculationID(s string) *IndicatorDataUpdate

SetCalculationID sets the "calculation_id" field.

func (*IndicatorDataUpdate) SetIndicator

func (idu *IndicatorDataUpdate) SetIndicator(i *Indicator) *IndicatorDataUpdate

SetIndicator sets the "indicator" edge to the Indicator entity.

func (*IndicatorDataUpdate) SetIndicatorID

func (idu *IndicatorDataUpdate) SetIndicatorID(id uuid.UUID) *IndicatorDataUpdate

SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.

func (*IndicatorDataUpdate) SetMetadata

func (idu *IndicatorDataUpdate) SetMetadata(m map[string]interface{}) *IndicatorDataUpdate

SetMetadata sets the "metadata" field.

func (*IndicatorDataUpdate) SetNillableBarTime

func (idu *IndicatorDataUpdate) SetNillableBarTime(t *time.Time) *IndicatorDataUpdate

SetNillableBarTime sets the "bar_time" field if the given value is not nil.

func (*IndicatorDataUpdate) SetNillableCalculationID

func (idu *IndicatorDataUpdate) SetNillableCalculationID(s *string) *IndicatorDataUpdate

SetNillableCalculationID sets the "calculation_id" field if the given value is not nil.

func (*IndicatorDataUpdate) SetNillablePrimaryValue

func (idu *IndicatorDataUpdate) SetNillablePrimaryValue(f *float64) *IndicatorDataUpdate

SetNillablePrimaryValue sets the "primary_value" field if the given value is not nil.

func (*IndicatorDataUpdate) SetNillableQuality

func (idu *IndicatorDataUpdate) SetNillableQuality(i *indicatordata.Quality) *IndicatorDataUpdate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*IndicatorDataUpdate) SetNillableTimestamp

func (idu *IndicatorDataUpdate) SetNillableTimestamp(i *int64) *IndicatorDataUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*IndicatorDataUpdate) SetPrimaryValue

func (idu *IndicatorDataUpdate) SetPrimaryValue(f float64) *IndicatorDataUpdate

SetPrimaryValue sets the "primary_value" field.

func (*IndicatorDataUpdate) SetQuality

SetQuality sets the "quality" field.

func (*IndicatorDataUpdate) SetStudySession

func (idu *IndicatorDataUpdate) SetStudySession(s *StudySession) *IndicatorDataUpdate

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorDataUpdate) SetStudySessionID

func (idu *IndicatorDataUpdate) SetStudySessionID(id uuid.UUID) *IndicatorDataUpdate

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorDataUpdate) SetTimestamp

func (idu *IndicatorDataUpdate) SetTimestamp(i int64) *IndicatorDataUpdate

SetTimestamp sets the "timestamp" field.

func (*IndicatorDataUpdate) SetValues

func (idu *IndicatorDataUpdate) SetValues(m map[string]interface{}) *IndicatorDataUpdate

SetValues sets the "values" field.

func (*IndicatorDataUpdate) Where

Where appends a list predicates to the IndicatorDataUpdate builder.

type IndicatorDataUpdateOne

type IndicatorDataUpdateOne struct {
	// contains filtered or unexported fields
}

IndicatorDataUpdateOne is the builder for updating a single IndicatorData entity.

func (*IndicatorDataUpdateOne) AddPrimaryValue

func (iduo *IndicatorDataUpdateOne) AddPrimaryValue(f float64) *IndicatorDataUpdateOne

AddPrimaryValue adds f to the "primary_value" field.

func (*IndicatorDataUpdateOne) AddTimestamp

func (iduo *IndicatorDataUpdateOne) AddTimestamp(i int64) *IndicatorDataUpdateOne

AddTimestamp adds i to the "timestamp" field.

func (*IndicatorDataUpdateOne) ClearCalculationID

func (iduo *IndicatorDataUpdateOne) ClearCalculationID() *IndicatorDataUpdateOne

ClearCalculationID clears the value of the "calculation_id" field.

func (*IndicatorDataUpdateOne) ClearIndicator

func (iduo *IndicatorDataUpdateOne) ClearIndicator() *IndicatorDataUpdateOne

ClearIndicator clears the "indicator" edge to the Indicator entity.

func (*IndicatorDataUpdateOne) ClearMetadata

func (iduo *IndicatorDataUpdateOne) ClearMetadata() *IndicatorDataUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*IndicatorDataUpdateOne) ClearPrimaryValue

func (iduo *IndicatorDataUpdateOne) ClearPrimaryValue() *IndicatorDataUpdateOne

ClearPrimaryValue clears the value of the "primary_value" field.

func (*IndicatorDataUpdateOne) ClearStudySession

func (iduo *IndicatorDataUpdateOne) ClearStudySession() *IndicatorDataUpdateOne

ClearStudySession clears the "study_session" edge to the StudySession entity.

func (*IndicatorDataUpdateOne) Exec

func (iduo *IndicatorDataUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IndicatorDataUpdateOne) ExecX

func (iduo *IndicatorDataUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IndicatorDataUpdateOne) Mutation

Mutation returns the IndicatorDataMutation object of the builder.

func (*IndicatorDataUpdateOne) Save

Save executes the query and returns the updated IndicatorData entity.

func (*IndicatorDataUpdateOne) SaveX

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

func (*IndicatorDataUpdateOne) Select

func (iduo *IndicatorDataUpdateOne) Select(field string, fields ...string) *IndicatorDataUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IndicatorDataUpdateOne) SetBarTime

SetBarTime sets the "bar_time" field.

func (*IndicatorDataUpdateOne) SetCalculationID

func (iduo *IndicatorDataUpdateOne) SetCalculationID(s string) *IndicatorDataUpdateOne

SetCalculationID sets the "calculation_id" field.

func (*IndicatorDataUpdateOne) SetIndicator

SetIndicator sets the "indicator" edge to the Indicator entity.

func (*IndicatorDataUpdateOne) SetIndicatorID

func (iduo *IndicatorDataUpdateOne) SetIndicatorID(id uuid.UUID) *IndicatorDataUpdateOne

SetIndicatorID sets the "indicator" edge to the Indicator entity by ID.

func (*IndicatorDataUpdateOne) SetMetadata

func (iduo *IndicatorDataUpdateOne) SetMetadata(m map[string]interface{}) *IndicatorDataUpdateOne

SetMetadata sets the "metadata" field.

func (*IndicatorDataUpdateOne) SetNillableBarTime

func (iduo *IndicatorDataUpdateOne) SetNillableBarTime(t *time.Time) *IndicatorDataUpdateOne

SetNillableBarTime sets the "bar_time" field if the given value is not nil.

func (*IndicatorDataUpdateOne) SetNillableCalculationID

func (iduo *IndicatorDataUpdateOne) SetNillableCalculationID(s *string) *IndicatorDataUpdateOne

SetNillableCalculationID sets the "calculation_id" field if the given value is not nil.

func (*IndicatorDataUpdateOne) SetNillablePrimaryValue

func (iduo *IndicatorDataUpdateOne) SetNillablePrimaryValue(f *float64) *IndicatorDataUpdateOne

SetNillablePrimaryValue sets the "primary_value" field if the given value is not nil.

func (*IndicatorDataUpdateOne) SetNillableQuality

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*IndicatorDataUpdateOne) SetNillableTimestamp

func (iduo *IndicatorDataUpdateOne) SetNillableTimestamp(i *int64) *IndicatorDataUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*IndicatorDataUpdateOne) SetPrimaryValue

func (iduo *IndicatorDataUpdateOne) SetPrimaryValue(f float64) *IndicatorDataUpdateOne

SetPrimaryValue sets the "primary_value" field.

func (*IndicatorDataUpdateOne) SetQuality

SetQuality sets the "quality" field.

func (*IndicatorDataUpdateOne) SetStudySession

func (iduo *IndicatorDataUpdateOne) SetStudySession(s *StudySession) *IndicatorDataUpdateOne

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorDataUpdateOne) SetStudySessionID

func (iduo *IndicatorDataUpdateOne) SetStudySessionID(id uuid.UUID) *IndicatorDataUpdateOne

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorDataUpdateOne) SetTimestamp

func (iduo *IndicatorDataUpdateOne) SetTimestamp(i int64) *IndicatorDataUpdateOne

SetTimestamp sets the "timestamp" field.

func (*IndicatorDataUpdateOne) SetValues

func (iduo *IndicatorDataUpdateOne) SetValues(m map[string]interface{}) *IndicatorDataUpdateOne

SetValues sets the "values" field.

func (*IndicatorDataUpdateOne) Where

Where appends a list predicates to the IndicatorDataUpdate builder.

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 appends a list predicates 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.

func (*IndicatorDeleteOne) Where

Where appends a list predicates to the IndicatorDelete builder.

type IndicatorEdges

type IndicatorEdges struct {
	// Study session this indicator belongs to
	StudySession *StudySession `json:"study_session,omitempty"`
	// Calculated values for this indicator
	Data []*IndicatorData `json:"data,omitempty"`
	// contains filtered or unexported fields
}

IndicatorEdges holds the relations/edges for other nodes in the graph.

func (IndicatorEdges) DataOrErr

func (e IndicatorEdges) DataOrErr() ([]*IndicatorData, error)

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

func (IndicatorEdges) StudySessionOrErr

func (e IndicatorEdges) StudySessionOrErr() (*StudySession, error)

StudySessionOrErr returns the StudySession 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 (s *IndicatorGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) BoolX

func (s *IndicatorGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IndicatorGroupBy) Bools

func (s *IndicatorGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) BoolsX

func (s *IndicatorGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IndicatorGroupBy) Float64

func (s *IndicatorGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) Float64X

func (s *IndicatorGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IndicatorGroupBy) Float64s

func (s *IndicatorGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) Float64sX

func (s *IndicatorGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IndicatorGroupBy) Int

func (s *IndicatorGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) IntX

func (s *IndicatorGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IndicatorGroupBy) Ints

func (s *IndicatorGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) IntsX

func (s *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 any) error

Scan applies the selector query and scans the result into the given value.

func (*IndicatorGroupBy) ScanX

func (s *IndicatorGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IndicatorGroupBy) String

func (s *IndicatorGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IndicatorGroupBy) StringX

func (s *IndicatorGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IndicatorGroupBy) Strings

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

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

func (*IndicatorGroupBy) StringsX

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

func (m *IndicatorMutation) AddCalculationCount(i int)

AddCalculationCount adds i to the "calculation_count" field.

func (*IndicatorMutation) AddDatumIDs

func (m *IndicatorMutation) AddDatumIDs(ids ...uuid.UUID)

AddDatumIDs adds the "data" edge to the IndicatorData 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) AddedCalculationCount

func (m *IndicatorMutation) AddedCalculationCount() (r int, exists bool)

AddedCalculationCount returns the value that was added to the "calculation_count" field in this mutation.

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

func (m *IndicatorMutation) AppendOutputs(s []string)

AppendOutputs adds s to the "outputs" field.

func (*IndicatorMutation) AppendedOutputs

func (m *IndicatorMutation) AppendedOutputs() ([]string, bool)

AppendedOutputs returns the list of values that were appended to the "outputs" field in this mutation.

func (*IndicatorMutation) CalculationCount

func (m *IndicatorMutation) CalculationCount() (r int, exists bool)

CalculationCount returns the value of the "calculation_count" field in the mutation.

func (*IndicatorMutation) ClearData

func (m *IndicatorMutation) ClearData()

ClearData clears the "data" edge to the IndicatorData entity.

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

func (m *IndicatorMutation) ClearErrorMessage()

ClearErrorMessage clears the value of the "error_message" field.

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

func (m *IndicatorMutation) ClearLastCalculated()

ClearLastCalculated clears the value of the "last_calculated" field.

func (*IndicatorMutation) ClearScriptID

func (m *IndicatorMutation) ClearScriptID()

ClearScriptID clears the value of the "script_id" field.

func (*IndicatorMutation) ClearStudySession

func (m *IndicatorMutation) ClearStudySession()

ClearStudySession clears the "study_session" edge to the StudySession 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) CreatedAt

func (m *IndicatorMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IndicatorMutation) DataCleared

func (m *IndicatorMutation) DataCleared() bool

DataCleared reports if the "data" edge to the IndicatorData entity was cleared.

func (*IndicatorMutation) DataIDs

func (m *IndicatorMutation) DataIDs() (ids []uuid.UUID)

DataIDs returns the "data" edge IDs in the 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) Enabled

func (m *IndicatorMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*IndicatorMutation) ErrorMessage

func (m *IndicatorMutation) ErrorMessage() (r string, exists bool)

ErrorMessage returns the value of the "error_message" field in the mutation.

func (*IndicatorMutation) ErrorMessageCleared

func (m *IndicatorMutation) ErrorMessageCleared() bool

ErrorMessageCleared returns if the "error_message" field was cleared in this 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) GetType

func (m *IndicatorMutation) GetType() (r indicator.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*IndicatorMutation) ID

func (m *IndicatorMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*IndicatorMutation) IDs

func (m *IndicatorMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*IndicatorMutation) IndicatorID

func (m *IndicatorMutation) IndicatorID() (r string, exists bool)

IndicatorID returns the value of the "indicator_id" field in the mutation.

func (*IndicatorMutation) LastCalculated

func (m *IndicatorMutation) LastCalculated() (r time.Time, exists bool)

LastCalculated returns the value of the "last_calculated" field in the mutation.

func (*IndicatorMutation) LastCalculatedCleared

func (m *IndicatorMutation) LastCalculatedCleared() bool

LastCalculatedCleared returns if the "last_calculated" field was cleared in this mutation.

func (*IndicatorMutation) Name

func (m *IndicatorMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*IndicatorMutation) OldCalculationCount

func (m *IndicatorMutation) OldCalculationCount(ctx context.Context) (v int, err error)

OldCalculationCount returns the old "calculation_count" 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) OldCreatedAt

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

OldCreatedAt returns the old "created_at" 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) OldEnabled

func (m *IndicatorMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" 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) OldErrorMessage

func (m *IndicatorMutation) OldErrorMessage(ctx context.Context) (v string, err error)

OldErrorMessage returns the old "error_message" 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) OldIndicatorID

func (m *IndicatorMutation) OldIndicatorID(ctx context.Context) (v string, err error)

OldIndicatorID returns the old "indicator_id" 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) OldLastCalculated

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

OldLastCalculated returns the old "last_calculated" 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) OldName

func (m *IndicatorMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" 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) OldOutputs

func (m *IndicatorMutation) OldOutputs(ctx context.Context) (v []string, err error)

OldOutputs returns the old "outputs" 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) OldParameters

func (m *IndicatorMutation) OldParameters(ctx context.Context) (v map[string]interface{}, err error)

OldParameters returns the old "parameters" 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) OldScriptID

func (m *IndicatorMutation) OldScriptID(ctx context.Context) (v string, err error)

OldScriptID returns the old "script_id" 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) OldStatus

func (m *IndicatorMutation) OldStatus(ctx context.Context) (v indicator.Status, err error)

OldStatus returns the old "status" 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) OldType

func (m *IndicatorMutation) OldType(ctx context.Context) (v indicator.Type, err error)

OldType returns the old "type" 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) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" 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) OldVersion

func (m *IndicatorMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" 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) Outputs

func (m *IndicatorMutation) Outputs() (r []string, exists bool)

Outputs returns the value of the "outputs" field in the mutation.

func (*IndicatorMutation) Parameters

func (m *IndicatorMutation) Parameters() (r map[string]interface{}, exists bool)

Parameters returns the value of the "parameters" field in the mutation.

func (*IndicatorMutation) RemoveDatumIDs

func (m *IndicatorMutation) RemoveDatumIDs(ids ...uuid.UUID)

RemoveDatumIDs removes the "data" edge to the IndicatorData entity by IDs.

func (*IndicatorMutation) RemovedDataIDs

func (m *IndicatorMutation) RemovedDataIDs() (ids []uuid.UUID)

RemovedData returns the removed IDs of the "data" edge to the IndicatorData 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) ResetCalculationCount

func (m *IndicatorMutation) ResetCalculationCount()

ResetCalculationCount resets all changes to the "calculation_count" field.

func (*IndicatorMutation) ResetCreatedAt

func (m *IndicatorMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IndicatorMutation) ResetData

func (m *IndicatorMutation) ResetData()

ResetData resets all changes to the "data" edge.

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

func (m *IndicatorMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*IndicatorMutation) ResetErrorMessage

func (m *IndicatorMutation) ResetErrorMessage()

ResetErrorMessage resets all changes to the "error_message" 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) ResetIndicatorID

func (m *IndicatorMutation) ResetIndicatorID()

ResetIndicatorID resets all changes to the "indicator_id" field.

func (*IndicatorMutation) ResetLastCalculated

func (m *IndicatorMutation) ResetLastCalculated()

ResetLastCalculated resets all changes to the "last_calculated" field.

func (*IndicatorMutation) ResetName

func (m *IndicatorMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*IndicatorMutation) ResetOutputs

func (m *IndicatorMutation) ResetOutputs()

ResetOutputs resets all changes to the "outputs" field.

func (*IndicatorMutation) ResetParameters

func (m *IndicatorMutation) ResetParameters()

ResetParameters resets all changes to the "parameters" field.

func (*IndicatorMutation) ResetScriptID

func (m *IndicatorMutation) ResetScriptID()

ResetScriptID resets all changes to the "script_id" field.

func (*IndicatorMutation) ResetStatus

func (m *IndicatorMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*IndicatorMutation) ResetStudySession

func (m *IndicatorMutation) ResetStudySession()

ResetStudySession resets all changes to the "study_session" edge.

func (*IndicatorMutation) ResetType

func (m *IndicatorMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*IndicatorMutation) ResetUpdatedAt

func (m *IndicatorMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*IndicatorMutation) ResetVersion

func (m *IndicatorMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*IndicatorMutation) ScriptID

func (m *IndicatorMutation) ScriptID() (r string, exists bool)

ScriptID returns the value of the "script_id" field in the mutation.

func (*IndicatorMutation) ScriptIDCleared

func (m *IndicatorMutation) ScriptIDCleared() bool

ScriptIDCleared returns if the "script_id" field was cleared in this mutation.

func (*IndicatorMutation) SetCalculationCount

func (m *IndicatorMutation) SetCalculationCount(i int)

SetCalculationCount sets the "calculation_count" field.

func (*IndicatorMutation) SetCreatedAt

func (m *IndicatorMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IndicatorMutation) SetEnabled

func (m *IndicatorMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*IndicatorMutation) SetErrorMessage

func (m *IndicatorMutation) SetErrorMessage(s string)

SetErrorMessage sets the "error_message" 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) SetID

func (m *IndicatorMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Indicator entities.

func (*IndicatorMutation) SetIndicatorID

func (m *IndicatorMutation) SetIndicatorID(s string)

SetIndicatorID sets the "indicator_id" field.

func (*IndicatorMutation) SetLastCalculated

func (m *IndicatorMutation) SetLastCalculated(t time.Time)

SetLastCalculated sets the "last_calculated" field.

func (*IndicatorMutation) SetName

func (m *IndicatorMutation) SetName(s string)

SetName sets the "name" field.

func (*IndicatorMutation) SetOp

func (m *IndicatorMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IndicatorMutation) SetOutputs

func (m *IndicatorMutation) SetOutputs(s []string)

SetOutputs sets the "outputs" field.

func (*IndicatorMutation) SetParameters

func (m *IndicatorMutation) SetParameters(value map[string]interface{})

SetParameters sets the "parameters" field.

func (*IndicatorMutation) SetScriptID

func (m *IndicatorMutation) SetScriptID(s string)

SetScriptID sets the "script_id" field.

func (*IndicatorMutation) SetStatus

func (m *IndicatorMutation) SetStatus(i indicator.Status)

SetStatus sets the "status" field.

func (*IndicatorMutation) SetStudySessionID

func (m *IndicatorMutation) SetStudySessionID(id uuid.UUID)

SetStudySessionID sets the "study_session" edge to the StudySession entity by id.

func (*IndicatorMutation) SetType

func (m *IndicatorMutation) SetType(i indicator.Type)

SetType sets the "type" field.

func (*IndicatorMutation) SetUpdatedAt

func (m *IndicatorMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*IndicatorMutation) SetVersion

func (m *IndicatorMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*IndicatorMutation) Status

func (m *IndicatorMutation) Status() (r indicator.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*IndicatorMutation) StudySessionCleared

func (m *IndicatorMutation) StudySessionCleared() bool

StudySessionCleared reports if the "study_session" edge to the StudySession entity was cleared.

func (*IndicatorMutation) StudySessionID

func (m *IndicatorMutation) StudySessionID() (id uuid.UUID, exists bool)

StudySessionID returns the "study_session" edge ID in the mutation.

func (*IndicatorMutation) StudySessionIDs

func (m *IndicatorMutation) StudySessionIDs() (ids []uuid.UUID)

StudySessionIDs returns the "study_session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StudySessionID instead. It exists only for internal usage by the builders.

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

func (m *IndicatorMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*IndicatorMutation) Version

func (m *IndicatorMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*IndicatorMutation) Where

func (m *IndicatorMutation) Where(ps ...predicate.Indicator)

Where appends a list predicates to the IndicatorMutation builder.

func (*IndicatorMutation) WhereP

func (m *IndicatorMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IndicatorMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IndicatorQuery

type IndicatorQuery struct {
	// contains filtered or unexported fields
}

IndicatorQuery is the builder for querying Indicator entities.

func (*IndicatorQuery) Aggregate

func (iq *IndicatorQuery) Aggregate(fns ...AggregateFunc) *IndicatorSelect

Aggregate returns a IndicatorSelect configured with the given aggregations.

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 uuid.UUID, 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) uuid.UUID

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 {
	IndicatorID string `json:"indicator_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Indicator.Query().
	GroupBy(indicator.FieldIndicatorID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IndicatorQuery) IDs

func (iq *IndicatorQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*IndicatorQuery) IDsX

func (iq *IndicatorQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*IndicatorQuery) Limit

func (iq *IndicatorQuery) Limit(limit int) *IndicatorQuery

Limit the number of records to be returned by this query.

func (*IndicatorQuery) Offset

func (iq *IndicatorQuery) Offset(offset int) *IndicatorQuery

Offset to start from.

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 more than one Indicator entity is found. Returns a *NotFoundError when no Indicator entities are found.

func (*IndicatorQuery) OnlyID

func (iq *IndicatorQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Indicator ID in the query. Returns a *NotSingularError when more than one Indicator ID is found. Returns a *NotFoundError when no entities are found.

func (*IndicatorQuery) OnlyIDX

func (iq *IndicatorQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

Order specifies how the records should be ordered.

func (*IndicatorQuery) QueryData

func (iq *IndicatorQuery) QueryData() *IndicatorDataQuery

QueryData chains the current query on the "data" edge.

func (*IndicatorQuery) QueryStudySession

func (iq *IndicatorQuery) QueryStudySession() *StudySessionQuery

QueryStudySession chains the current query on the "study_session" edge.

func (*IndicatorQuery) Select

func (iq *IndicatorQuery) Select(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 {
	IndicatorID string `json:"indicator_id,omitempty"`
}

client.Indicator.Query().
	Select(indicator.FieldIndicatorID).
	Scan(ctx, &v)

func (*IndicatorQuery) Unique

func (iq *IndicatorQuery) Unique(unique bool) *IndicatorQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*IndicatorQuery) Where

Where adds a new predicate for the IndicatorQuery builder.

func (*IndicatorQuery) WithData

func (iq *IndicatorQuery) WithData(opts ...func(*IndicatorDataQuery)) *IndicatorQuery

WithData tells the query-builder to eager-load the nodes that are connected to the "data" edge. The optional arguments are used to configure the query builder of the edge.

func (*IndicatorQuery) WithStudySession

func (iq *IndicatorQuery) WithStudySession(opts ...func(*StudySessionQuery)) *IndicatorQuery

WithStudySession tells the query-builder to eager-load the nodes that are connected to the "study_session" 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) Aggregate

func (is *IndicatorSelect) Aggregate(fns ...AggregateFunc) *IndicatorSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IndicatorSelect) Bool

func (s *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 (s *IndicatorSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IndicatorSelect) Bools

func (s *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 (s *IndicatorSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IndicatorSelect) Float64

func (s *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 (s *IndicatorSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IndicatorSelect) Float64s

func (s *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 (s *IndicatorSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IndicatorSelect) Int

func (s *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 (s *IndicatorSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IndicatorSelect) Ints

func (s *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 (s *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 any) error

Scan applies the selector query and scans the result into the given value.

func (*IndicatorSelect) ScanX

func (s *IndicatorSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IndicatorSelect) String

func (s *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 (s *IndicatorSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IndicatorSelect) Strings

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

func (iu *IndicatorUpdate) AddCalculationCount(i int) *IndicatorUpdate

AddCalculationCount adds i to the "calculation_count" field.

func (*IndicatorUpdate) AddData

func (iu *IndicatorUpdate) AddData(i ...*IndicatorData) *IndicatorUpdate

AddData adds the "data" edges to the IndicatorData entity.

func (*IndicatorUpdate) AddDatumIDs

func (iu *IndicatorUpdate) AddDatumIDs(ids ...uuid.UUID) *IndicatorUpdate

AddDatumIDs adds the "data" edge to the IndicatorData entity by IDs.

func (*IndicatorUpdate) AppendOutputs

func (iu *IndicatorUpdate) AppendOutputs(s []string) *IndicatorUpdate

AppendOutputs appends s to the "outputs" field.

func (*IndicatorUpdate) ClearData

func (iu *IndicatorUpdate) ClearData() *IndicatorUpdate

ClearData clears all "data" edges to the IndicatorData entity.

func (*IndicatorUpdate) ClearErrorMessage

func (iu *IndicatorUpdate) ClearErrorMessage() *IndicatorUpdate

ClearErrorMessage clears the value of the "error_message" field.

func (*IndicatorUpdate) ClearLastCalculated

func (iu *IndicatorUpdate) ClearLastCalculated() *IndicatorUpdate

ClearLastCalculated clears the value of the "last_calculated" field.

func (*IndicatorUpdate) ClearScriptID

func (iu *IndicatorUpdate) ClearScriptID() *IndicatorUpdate

ClearScriptID clears the value of the "script_id" field.

func (*IndicatorUpdate) ClearStudySession

func (iu *IndicatorUpdate) ClearStudySession() *IndicatorUpdate

ClearStudySession clears the "study_session" edge to the StudySession 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) RemoveData

func (iu *IndicatorUpdate) RemoveData(i ...*IndicatorData) *IndicatorUpdate

RemoveData removes "data" edges to IndicatorData entities.

func (*IndicatorUpdate) RemoveDatumIDs

func (iu *IndicatorUpdate) RemoveDatumIDs(ids ...uuid.UUID) *IndicatorUpdate

RemoveDatumIDs removes the "data" edge to IndicatorData entities by IDs.

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

func (iu *IndicatorUpdate) SetCalculationCount(i int) *IndicatorUpdate

SetCalculationCount sets the "calculation_count" field.

func (*IndicatorUpdate) SetEnabled

func (iu *IndicatorUpdate) SetEnabled(b bool) *IndicatorUpdate

SetEnabled sets the "enabled" field.

func (*IndicatorUpdate) SetErrorMessage

func (iu *IndicatorUpdate) SetErrorMessage(s string) *IndicatorUpdate

SetErrorMessage sets the "error_message" field.

func (*IndicatorUpdate) SetIndicatorID

func (iu *IndicatorUpdate) SetIndicatorID(s string) *IndicatorUpdate

SetIndicatorID sets the "indicator_id" field.

func (*IndicatorUpdate) SetLastCalculated

func (iu *IndicatorUpdate) SetLastCalculated(t time.Time) *IndicatorUpdate

SetLastCalculated sets the "last_calculated" field.

func (*IndicatorUpdate) SetName

func (iu *IndicatorUpdate) SetName(s string) *IndicatorUpdate

SetName sets the "name" field.

func (*IndicatorUpdate) SetNillableCalculationCount

func (iu *IndicatorUpdate) SetNillableCalculationCount(i *int) *IndicatorUpdate

SetNillableCalculationCount sets the "calculation_count" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableEnabled

func (iu *IndicatorUpdate) SetNillableEnabled(b *bool) *IndicatorUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableErrorMessage

func (iu *IndicatorUpdate) SetNillableErrorMessage(s *string) *IndicatorUpdate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableIndicatorID

func (iu *IndicatorUpdate) SetNillableIndicatorID(s *string) *IndicatorUpdate

SetNillableIndicatorID sets the "indicator_id" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableLastCalculated

func (iu *IndicatorUpdate) SetNillableLastCalculated(t *time.Time) *IndicatorUpdate

SetNillableLastCalculated sets the "last_calculated" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableName

func (iu *IndicatorUpdate) SetNillableName(s *string) *IndicatorUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableScriptID

func (iu *IndicatorUpdate) SetNillableScriptID(s *string) *IndicatorUpdate

SetNillableScriptID sets the "script_id" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableStatus

func (iu *IndicatorUpdate) SetNillableStatus(i *indicator.Status) *IndicatorUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableType

func (iu *IndicatorUpdate) SetNillableType(i *indicator.Type) *IndicatorUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*IndicatorUpdate) SetNillableVersion

func (iu *IndicatorUpdate) SetNillableVersion(s *string) *IndicatorUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*IndicatorUpdate) SetOutputs

func (iu *IndicatorUpdate) SetOutputs(s []string) *IndicatorUpdate

SetOutputs sets the "outputs" field.

func (*IndicatorUpdate) SetParameters

func (iu *IndicatorUpdate) SetParameters(m map[string]interface{}) *IndicatorUpdate

SetParameters sets the "parameters" field.

func (*IndicatorUpdate) SetScriptID

func (iu *IndicatorUpdate) SetScriptID(s string) *IndicatorUpdate

SetScriptID sets the "script_id" field.

func (*IndicatorUpdate) SetStatus

func (iu *IndicatorUpdate) SetStatus(i indicator.Status) *IndicatorUpdate

SetStatus sets the "status" field.

func (*IndicatorUpdate) SetStudySession

func (iu *IndicatorUpdate) SetStudySession(s *StudySession) *IndicatorUpdate

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorUpdate) SetStudySessionID

func (iu *IndicatorUpdate) SetStudySessionID(id uuid.UUID) *IndicatorUpdate

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorUpdate) SetType

SetType sets the "type" field.

func (*IndicatorUpdate) SetUpdatedAt

func (iu *IndicatorUpdate) SetUpdatedAt(t time.Time) *IndicatorUpdate

SetUpdatedAt sets the "updated_at" field.

func (*IndicatorUpdate) SetVersion

func (iu *IndicatorUpdate) SetVersion(s string) *IndicatorUpdate

SetVersion sets the "version" field.

func (*IndicatorUpdate) Where

Where appends a list predicates to 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) AddCalculationCount

func (iuo *IndicatorUpdateOne) AddCalculationCount(i int) *IndicatorUpdateOne

AddCalculationCount adds i to the "calculation_count" field.

func (*IndicatorUpdateOne) AddData

AddData adds the "data" edges to the IndicatorData entity.

func (*IndicatorUpdateOne) AddDatumIDs

func (iuo *IndicatorUpdateOne) AddDatumIDs(ids ...uuid.UUID) *IndicatorUpdateOne

AddDatumIDs adds the "data" edge to the IndicatorData entity by IDs.

func (*IndicatorUpdateOne) AppendOutputs

func (iuo *IndicatorUpdateOne) AppendOutputs(s []string) *IndicatorUpdateOne

AppendOutputs appends s to the "outputs" field.

func (*IndicatorUpdateOne) ClearData

func (iuo *IndicatorUpdateOne) ClearData() *IndicatorUpdateOne

ClearData clears all "data" edges to the IndicatorData entity.

func (*IndicatorUpdateOne) ClearErrorMessage

func (iuo *IndicatorUpdateOne) ClearErrorMessage() *IndicatorUpdateOne

ClearErrorMessage clears the value of the "error_message" field.

func (*IndicatorUpdateOne) ClearLastCalculated

func (iuo *IndicatorUpdateOne) ClearLastCalculated() *IndicatorUpdateOne

ClearLastCalculated clears the value of the "last_calculated" field.

func (*IndicatorUpdateOne) ClearScriptID

func (iuo *IndicatorUpdateOne) ClearScriptID() *IndicatorUpdateOne

ClearScriptID clears the value of the "script_id" field.

func (*IndicatorUpdateOne) ClearStudySession

func (iuo *IndicatorUpdateOne) ClearStudySession() *IndicatorUpdateOne

ClearStudySession clears the "study_session" edge to the StudySession 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) RemoveData

func (iuo *IndicatorUpdateOne) RemoveData(i ...*IndicatorData) *IndicatorUpdateOne

RemoveData removes "data" edges to IndicatorData entities.

func (*IndicatorUpdateOne) RemoveDatumIDs

func (iuo *IndicatorUpdateOne) RemoveDatumIDs(ids ...uuid.UUID) *IndicatorUpdateOne

RemoveDatumIDs removes the "data" edge to IndicatorData entities by IDs.

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

func (iuo *IndicatorUpdateOne) Select(field string, fields ...string) *IndicatorUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IndicatorUpdateOne) SetCalculationCount

func (iuo *IndicatorUpdateOne) SetCalculationCount(i int) *IndicatorUpdateOne

SetCalculationCount sets the "calculation_count" field.

func (*IndicatorUpdateOne) SetEnabled

func (iuo *IndicatorUpdateOne) SetEnabled(b bool) *IndicatorUpdateOne

SetEnabled sets the "enabled" field.

func (*IndicatorUpdateOne) SetErrorMessage

func (iuo *IndicatorUpdateOne) SetErrorMessage(s string) *IndicatorUpdateOne

SetErrorMessage sets the "error_message" field.

func (*IndicatorUpdateOne) SetIndicatorID

func (iuo *IndicatorUpdateOne) SetIndicatorID(s string) *IndicatorUpdateOne

SetIndicatorID sets the "indicator_id" field.

func (*IndicatorUpdateOne) SetLastCalculated

func (iuo *IndicatorUpdateOne) SetLastCalculated(t time.Time) *IndicatorUpdateOne

SetLastCalculated sets the "last_calculated" field.

func (*IndicatorUpdateOne) SetName

func (iuo *IndicatorUpdateOne) SetName(s string) *IndicatorUpdateOne

SetName sets the "name" field.

func (*IndicatorUpdateOne) SetNillableCalculationCount

func (iuo *IndicatorUpdateOne) SetNillableCalculationCount(i *int) *IndicatorUpdateOne

SetNillableCalculationCount sets the "calculation_count" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableEnabled

func (iuo *IndicatorUpdateOne) SetNillableEnabled(b *bool) *IndicatorUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableErrorMessage

func (iuo *IndicatorUpdateOne) SetNillableErrorMessage(s *string) *IndicatorUpdateOne

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableIndicatorID

func (iuo *IndicatorUpdateOne) SetNillableIndicatorID(s *string) *IndicatorUpdateOne

SetNillableIndicatorID sets the "indicator_id" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableLastCalculated

func (iuo *IndicatorUpdateOne) SetNillableLastCalculated(t *time.Time) *IndicatorUpdateOne

SetNillableLastCalculated sets the "last_calculated" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableName

func (iuo *IndicatorUpdateOne) SetNillableName(s *string) *IndicatorUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableScriptID

func (iuo *IndicatorUpdateOne) SetNillableScriptID(s *string) *IndicatorUpdateOne

SetNillableScriptID sets the "script_id" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableStatus

func (iuo *IndicatorUpdateOne) SetNillableStatus(i *indicator.Status) *IndicatorUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableType

func (iuo *IndicatorUpdateOne) SetNillableType(i *indicator.Type) *IndicatorUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*IndicatorUpdateOne) SetNillableVersion

func (iuo *IndicatorUpdateOne) SetNillableVersion(s *string) *IndicatorUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*IndicatorUpdateOne) SetOutputs

func (iuo *IndicatorUpdateOne) SetOutputs(s []string) *IndicatorUpdateOne

SetOutputs sets the "outputs" field.

func (*IndicatorUpdateOne) SetParameters

func (iuo *IndicatorUpdateOne) SetParameters(m map[string]interface{}) *IndicatorUpdateOne

SetParameters sets the "parameters" field.

func (*IndicatorUpdateOne) SetScriptID

func (iuo *IndicatorUpdateOne) SetScriptID(s string) *IndicatorUpdateOne

SetScriptID sets the "script_id" field.

func (*IndicatorUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*IndicatorUpdateOne) SetStudySession

func (iuo *IndicatorUpdateOne) SetStudySession(s *StudySession) *IndicatorUpdateOne

SetStudySession sets the "study_session" edge to the StudySession entity.

func (*IndicatorUpdateOne) SetStudySessionID

func (iuo *IndicatorUpdateOne) SetStudySessionID(id uuid.UUID) *IndicatorUpdateOne

SetStudySessionID sets the "study_session" edge to the StudySession entity by ID.

func (*IndicatorUpdateOne) SetType

SetType sets the "type" field.

func (*IndicatorUpdateOne) SetUpdatedAt

func (iuo *IndicatorUpdateOne) SetUpdatedAt(t time.Time) *IndicatorUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*IndicatorUpdateOne) SetVersion

func (iuo *IndicatorUpdateOne) SetVersion(s string) *IndicatorUpdateOne

SetVersion sets the "version" field.

func (*IndicatorUpdateOne) Where

Where appends a list predicates to the IndicatorUpdate builder.

type Indicators

type Indicators []*Indicator

Indicators is a parsable slice of Indicator.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type 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 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(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

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

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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 QueryContext

type QueryContext = ent.QueryContext

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(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

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

Rollbacker is the interface that wraps the Rollback method.

type StudySession

type StudySession struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// WebSocket session identifier
	SessionID string `json:"session_id,omitempty"`
	// User-defined name for the study session
	Name string `json:"name,omitempty"`
	// Current status of the study session
	Status studysession.Status `json:"status,omitempty"`
	// Time interval for the study
	Interval studysession.Interval `json:"interval,omitempty"`
	// Maximum number of bars to analyze
	MaxBars int `json:"max_bars,omitempty"`
	// Study session configuration settings
	Settings map[string]interface{} `json:"settings,omitempty"`
	// Last time indicators were updated
	LastUpdate time.Time `json:"last_update,omitempty"`
	// Last error message if any
	ErrorMessage string `json:"error_message,omitempty"`
	// Number of errors encountered
	ErrorCount int `json:"error_count,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StudySessionQuery when eager-loading is set.
	Edges StudySessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

StudySession is the model entity for the StudySession schema.

func (*StudySession) QueryIndicatorData

func (ss *StudySession) QueryIndicatorData() *IndicatorDataQuery

QueryIndicatorData queries the "indicator_data" edge of the StudySession entity.

func (*StudySession) QueryIndicators

func (ss *StudySession) QueryIndicators() *IndicatorQuery

QueryIndicators queries the "indicators" edge of the StudySession entity.

func (*StudySession) QuerySymbol

func (ss *StudySession) QuerySymbol() *SymbolQuery

QuerySymbol queries the "symbol" edge of the StudySession entity.

func (*StudySession) String

func (ss *StudySession) String() string

String implements the fmt.Stringer.

func (*StudySession) Unwrap

func (ss *StudySession) Unwrap() *StudySession

Unwrap unwraps the StudySession 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 (*StudySession) Update

func (ss *StudySession) Update() *StudySessionUpdateOne

Update returns a builder for updating this StudySession. Note that you need to call StudySession.Unwrap() before calling this method if this StudySession was returned from a transaction, and the transaction was committed or rolled back.

func (*StudySession) Value

func (ss *StudySession) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the StudySession. This includes values selected through modifiers, order, etc.

type StudySessionClient

type StudySessionClient struct {
	// contains filtered or unexported fields
}

StudySessionClient is a client for the StudySession schema.

func NewStudySessionClient

func NewStudySessionClient(c config) *StudySessionClient

NewStudySessionClient returns a client for the StudySession from the given config.

func (*StudySessionClient) Create

Create returns a builder for creating a StudySession entity.

func (*StudySessionClient) CreateBulk

func (c *StudySessionClient) CreateBulk(builders ...*StudySessionCreate) *StudySessionCreateBulk

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

func (*StudySessionClient) Delete

Delete returns a delete builder for StudySession.

func (*StudySessionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StudySessionClient) DeleteOneID

func (c *StudySessionClient) DeleteOneID(id uuid.UUID) *StudySessionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*StudySessionClient) Get

Get returns a StudySession entity by its id.

func (*StudySessionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*StudySessionClient) Hooks

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

Hooks returns the client hooks.

func (*StudySessionClient) Intercept

func (c *StudySessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `studysession.Intercept(f(g(h())))`.

func (*StudySessionClient) Interceptors

func (c *StudySessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*StudySessionClient) MapCreateBulk

func (c *StudySessionClient) MapCreateBulk(slice any, setFunc func(*StudySessionCreate, int)) *StudySessionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*StudySessionClient) Query

Query returns a query builder for StudySession.

func (*StudySessionClient) QueryIndicatorData

func (c *StudySessionClient) QueryIndicatorData(ss *StudySession) *IndicatorDataQuery

QueryIndicatorData queries the indicator_data edge of a StudySession.

func (*StudySessionClient) QueryIndicators

func (c *StudySessionClient) QueryIndicators(ss *StudySession) *IndicatorQuery

QueryIndicators queries the indicators edge of a StudySession.

func (*StudySessionClient) QuerySymbol

func (c *StudySessionClient) QuerySymbol(ss *StudySession) *SymbolQuery

QuerySymbol queries the symbol edge of a StudySession.

func (*StudySessionClient) Update

Update returns an update builder for StudySession.

func (*StudySessionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StudySessionClient) UpdateOneID

func (c *StudySessionClient) UpdateOneID(id uuid.UUID) *StudySessionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*StudySessionClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `studysession.Hooks(f(g(h())))`.

type StudySessionCreate

type StudySessionCreate struct {
	// contains filtered or unexported fields
}

StudySessionCreate is the builder for creating a StudySession entity.

func (*StudySessionCreate) AddIndicatorData

func (ssc *StudySessionCreate) AddIndicatorData(i ...*IndicatorData) *StudySessionCreate

AddIndicatorData adds the "indicator_data" edges to the IndicatorData entity.

func (*StudySessionCreate) AddIndicatorDatumIDs

func (ssc *StudySessionCreate) AddIndicatorDatumIDs(ids ...uuid.UUID) *StudySessionCreate

AddIndicatorDatumIDs adds the "indicator_data" edge to the IndicatorData entity by IDs.

func (*StudySessionCreate) AddIndicatorIDs

func (ssc *StudySessionCreate) AddIndicatorIDs(ids ...uuid.UUID) *StudySessionCreate

AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.

func (*StudySessionCreate) AddIndicators

func (ssc *StudySessionCreate) AddIndicators(i ...*Indicator) *StudySessionCreate

AddIndicators adds the "indicators" edges to the Indicator entity.

func (*StudySessionCreate) Exec

func (ssc *StudySessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*StudySessionCreate) ExecX

func (ssc *StudySessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionCreate) Mutation

func (ssc *StudySessionCreate) Mutation() *StudySessionMutation

Mutation returns the StudySessionMutation object of the builder.

func (*StudySessionCreate) Save

Save creates the StudySession in the database.

func (*StudySessionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StudySessionCreate) SetCreatedAt

func (ssc *StudySessionCreate) SetCreatedAt(t time.Time) *StudySessionCreate

SetCreatedAt sets the "created_at" field.

func (*StudySessionCreate) SetErrorCount

func (ssc *StudySessionCreate) SetErrorCount(i int) *StudySessionCreate

SetErrorCount sets the "error_count" field.

func (*StudySessionCreate) SetErrorMessage

func (ssc *StudySessionCreate) SetErrorMessage(s string) *StudySessionCreate

SetErrorMessage sets the "error_message" field.

func (*StudySessionCreate) SetID

SetID sets the "id" field.

func (*StudySessionCreate) SetInterval

SetInterval sets the "interval" field.

func (*StudySessionCreate) SetLastUpdate

func (ssc *StudySessionCreate) SetLastUpdate(t time.Time) *StudySessionCreate

SetLastUpdate sets the "last_update" field.

func (*StudySessionCreate) SetMaxBars

func (ssc *StudySessionCreate) SetMaxBars(i int) *StudySessionCreate

SetMaxBars sets the "max_bars" field.

func (*StudySessionCreate) SetName

func (ssc *StudySessionCreate) SetName(s string) *StudySessionCreate

SetName sets the "name" field.

func (*StudySessionCreate) SetNillableCreatedAt

func (ssc *StudySessionCreate) SetNillableCreatedAt(t *time.Time) *StudySessionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*StudySessionCreate) SetNillableErrorCount

func (ssc *StudySessionCreate) SetNillableErrorCount(i *int) *StudySessionCreate

SetNillableErrorCount sets the "error_count" field if the given value is not nil.

func (*StudySessionCreate) SetNillableErrorMessage

func (ssc *StudySessionCreate) SetNillableErrorMessage(s *string) *StudySessionCreate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*StudySessionCreate) SetNillableID

func (ssc *StudySessionCreate) SetNillableID(u *uuid.UUID) *StudySessionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*StudySessionCreate) SetNillableLastUpdate

func (ssc *StudySessionCreate) SetNillableLastUpdate(t *time.Time) *StudySessionCreate

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*StudySessionCreate) SetNillableMaxBars

func (ssc *StudySessionCreate) SetNillableMaxBars(i *int) *StudySessionCreate

SetNillableMaxBars sets the "max_bars" field if the given value is not nil.

func (*StudySessionCreate) SetNillableName

func (ssc *StudySessionCreate) SetNillableName(s *string) *StudySessionCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*StudySessionCreate) SetNillableStatus

func (ssc *StudySessionCreate) SetNillableStatus(s *studysession.Status) *StudySessionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*StudySessionCreate) SetNillableUpdatedAt

func (ssc *StudySessionCreate) SetNillableUpdatedAt(t *time.Time) *StudySessionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*StudySessionCreate) SetSessionID

func (ssc *StudySessionCreate) SetSessionID(s string) *StudySessionCreate

SetSessionID sets the "session_id" field.

func (*StudySessionCreate) SetSettings

func (ssc *StudySessionCreate) SetSettings(m map[string]interface{}) *StudySessionCreate

SetSettings sets the "settings" field.

func (*StudySessionCreate) SetStatus

SetStatus sets the "status" field.

func (*StudySessionCreate) SetSymbol

func (ssc *StudySessionCreate) SetSymbol(s *Symbol) *StudySessionCreate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*StudySessionCreate) SetSymbolID

func (ssc *StudySessionCreate) SetSymbolID(id uuid.UUID) *StudySessionCreate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*StudySessionCreate) SetUpdatedAt

func (ssc *StudySessionCreate) SetUpdatedAt(t time.Time) *StudySessionCreate

SetUpdatedAt sets the "updated_at" field.

type StudySessionCreateBulk

type StudySessionCreateBulk struct {
	// contains filtered or unexported fields
}

StudySessionCreateBulk is the builder for creating many StudySession entities in bulk.

func (*StudySessionCreateBulk) Exec

func (sscb *StudySessionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*StudySessionCreateBulk) ExecX

func (sscb *StudySessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionCreateBulk) Save

Save creates the StudySession entities in the database.

func (*StudySessionCreateBulk) SaveX

func (sscb *StudySessionCreateBulk) SaveX(ctx context.Context) []*StudySession

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

type StudySessionDelete

type StudySessionDelete struct {
	// contains filtered or unexported fields
}

StudySessionDelete is the builder for deleting a StudySession entity.

func (*StudySessionDelete) Exec

func (ssd *StudySessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*StudySessionDelete) ExecX

func (ssd *StudySessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionDelete) Where

Where appends a list predicates to the StudySessionDelete builder.

type StudySessionDeleteOne

type StudySessionDeleteOne struct {
	// contains filtered or unexported fields
}

StudySessionDeleteOne is the builder for deleting a single StudySession entity.

func (*StudySessionDeleteOne) Exec

func (ssdo *StudySessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StudySessionDeleteOne) ExecX

func (ssdo *StudySessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionDeleteOne) Where

Where appends a list predicates to the StudySessionDelete builder.

type StudySessionEdges

type StudySessionEdges struct {
	// Symbol being analyzed
	Symbol *Symbol `json:"symbol,omitempty"`
	// Technical indicators in this session
	Indicators []*Indicator `json:"indicators,omitempty"`
	// Calculated indicator values
	IndicatorData []*IndicatorData `json:"indicator_data,omitempty"`
	// contains filtered or unexported fields
}

StudySessionEdges holds the relations/edges for other nodes in the graph.

func (StudySessionEdges) IndicatorDataOrErr

func (e StudySessionEdges) IndicatorDataOrErr() ([]*IndicatorData, error)

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

func (StudySessionEdges) IndicatorsOrErr

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

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

func (StudySessionEdges) SymbolOrErr

func (e StudySessionEdges) SymbolOrErr() (*Symbol, error)

SymbolOrErr returns the Symbol value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type StudySessionGroupBy

type StudySessionGroupBy struct {
	// contains filtered or unexported fields
}

StudySessionGroupBy is the group-by builder for StudySession entities.

func (*StudySessionGroupBy) Aggregate

func (ssgb *StudySessionGroupBy) Aggregate(fns ...AggregateFunc) *StudySessionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*StudySessionGroupBy) Bool

func (s *StudySessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) BoolX

func (s *StudySessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StudySessionGroupBy) Bools

func (s *StudySessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) BoolsX

func (s *StudySessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StudySessionGroupBy) Float64

func (s *StudySessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) Float64X

func (s *StudySessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StudySessionGroupBy) Float64s

func (s *StudySessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) Float64sX

func (s *StudySessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StudySessionGroupBy) Int

func (s *StudySessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) IntX

func (s *StudySessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StudySessionGroupBy) Ints

func (s *StudySessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) IntsX

func (s *StudySessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StudySessionGroupBy) Scan

func (ssgb *StudySessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StudySessionGroupBy) ScanX

func (s *StudySessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StudySessionGroupBy) String

func (s *StudySessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StudySessionGroupBy) StringX

func (s *StudySessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StudySessionGroupBy) Strings

func (s *StudySessionGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*StudySessionGroupBy) StringsX

func (s *StudySessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StudySessionMutation

type StudySessionMutation struct {
	// contains filtered or unexported fields
}

StudySessionMutation represents an operation that mutates the StudySession nodes in the graph.

func (*StudySessionMutation) AddErrorCount

func (m *StudySessionMutation) AddErrorCount(i int)

AddErrorCount adds i to the "error_count" field.

func (*StudySessionMutation) AddField

func (m *StudySessionMutation) 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 (*StudySessionMutation) AddIndicatorDatumIDs

func (m *StudySessionMutation) AddIndicatorDatumIDs(ids ...uuid.UUID)

AddIndicatorDatumIDs adds the "indicator_data" edge to the IndicatorData entity by ids.

func (*StudySessionMutation) AddIndicatorIDs

func (m *StudySessionMutation) AddIndicatorIDs(ids ...uuid.UUID)

AddIndicatorIDs adds the "indicators" edge to the Indicator entity by ids.

func (*StudySessionMutation) AddMaxBars

func (m *StudySessionMutation) AddMaxBars(i int)

AddMaxBars adds i to the "max_bars" field.

func (*StudySessionMutation) AddedEdges

func (m *StudySessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StudySessionMutation) AddedErrorCount

func (m *StudySessionMutation) AddedErrorCount() (r int, exists bool)

AddedErrorCount returns the value that was added to the "error_count" field in this mutation.

func (*StudySessionMutation) AddedField

func (m *StudySessionMutation) 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 (*StudySessionMutation) AddedFields

func (m *StudySessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*StudySessionMutation) AddedIDs

func (m *StudySessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*StudySessionMutation) AddedMaxBars

func (m *StudySessionMutation) AddedMaxBars() (r int, exists bool)

AddedMaxBars returns the value that was added to the "max_bars" field in this mutation.

func (*StudySessionMutation) ClearEdge

func (m *StudySessionMutation) 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 (*StudySessionMutation) ClearErrorMessage

func (m *StudySessionMutation) ClearErrorMessage()

ClearErrorMessage clears the value of the "error_message" field.

func (*StudySessionMutation) ClearField

func (m *StudySessionMutation) 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 (*StudySessionMutation) ClearIndicatorData

func (m *StudySessionMutation) ClearIndicatorData()

ClearIndicatorData clears the "indicator_data" edge to the IndicatorData entity.

func (*StudySessionMutation) ClearIndicators

func (m *StudySessionMutation) ClearIndicators()

ClearIndicators clears the "indicators" edge to the Indicator entity.

func (*StudySessionMutation) ClearLastUpdate

func (m *StudySessionMutation) ClearLastUpdate()

ClearLastUpdate clears the value of the "last_update" field.

func (*StudySessionMutation) ClearName

func (m *StudySessionMutation) ClearName()

ClearName clears the value of the "name" field.

func (*StudySessionMutation) ClearSettings

func (m *StudySessionMutation) ClearSettings()

ClearSettings clears the value of the "settings" field.

func (*StudySessionMutation) ClearSymbol

func (m *StudySessionMutation) ClearSymbol()

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*StudySessionMutation) ClearedEdges

func (m *StudySessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StudySessionMutation) ClearedFields

func (m *StudySessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StudySessionMutation) Client

func (m StudySessionMutation) 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 (*StudySessionMutation) CreatedAt

func (m *StudySessionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*StudySessionMutation) EdgeCleared

func (m *StudySessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*StudySessionMutation) ErrorCount

func (m *StudySessionMutation) ErrorCount() (r int, exists bool)

ErrorCount returns the value of the "error_count" field in the mutation.

func (*StudySessionMutation) ErrorMessage

func (m *StudySessionMutation) ErrorMessage() (r string, exists bool)

ErrorMessage returns the value of the "error_message" field in the mutation.

func (*StudySessionMutation) ErrorMessageCleared

func (m *StudySessionMutation) ErrorMessageCleared() bool

ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.

func (*StudySessionMutation) Field

func (m *StudySessionMutation) 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 (*StudySessionMutation) FieldCleared

func (m *StudySessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*StudySessionMutation) Fields

func (m *StudySessionMutation) 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 (*StudySessionMutation) ID

func (m *StudySessionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*StudySessionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*StudySessionMutation) IndicatorDataCleared

func (m *StudySessionMutation) IndicatorDataCleared() bool

IndicatorDataCleared reports if the "indicator_data" edge to the IndicatorData entity was cleared.

func (*StudySessionMutation) IndicatorDataIDs

func (m *StudySessionMutation) IndicatorDataIDs() (ids []uuid.UUID)

IndicatorDataIDs returns the "indicator_data" edge IDs in the mutation.

func (*StudySessionMutation) IndicatorsCleared

func (m *StudySessionMutation) IndicatorsCleared() bool

IndicatorsCleared reports if the "indicators" edge to the Indicator entity was cleared.

func (*StudySessionMutation) IndicatorsIDs

func (m *StudySessionMutation) IndicatorsIDs() (ids []uuid.UUID)

IndicatorsIDs returns the "indicators" edge IDs in the mutation.

func (*StudySessionMutation) Interval

func (m *StudySessionMutation) Interval() (r studysession.Interval, exists bool)

Interval returns the value of the "interval" field in the mutation.

func (*StudySessionMutation) LastUpdate

func (m *StudySessionMutation) LastUpdate() (r time.Time, exists bool)

LastUpdate returns the value of the "last_update" field in the mutation.

func (*StudySessionMutation) LastUpdateCleared

func (m *StudySessionMutation) LastUpdateCleared() bool

LastUpdateCleared returns if the "last_update" field was cleared in this mutation.

func (*StudySessionMutation) MaxBars

func (m *StudySessionMutation) MaxBars() (r int, exists bool)

MaxBars returns the value of the "max_bars" field in the mutation.

func (*StudySessionMutation) Name

func (m *StudySessionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*StudySessionMutation) NameCleared

func (m *StudySessionMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*StudySessionMutation) OldCreatedAt

func (m *StudySessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldErrorCount

func (m *StudySessionMutation) OldErrorCount(ctx context.Context) (v int, err error)

OldErrorCount returns the old "error_count" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldErrorMessage

func (m *StudySessionMutation) OldErrorMessage(ctx context.Context) (v string, err error)

OldErrorMessage returns the old "error_message" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldField

func (m *StudySessionMutation) 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 (*StudySessionMutation) OldInterval

func (m *StudySessionMutation) OldInterval(ctx context.Context) (v studysession.Interval, err error)

OldInterval returns the old "interval" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldLastUpdate

func (m *StudySessionMutation) OldLastUpdate(ctx context.Context) (v time.Time, err error)

OldLastUpdate returns the old "last_update" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldMaxBars

func (m *StudySessionMutation) OldMaxBars(ctx context.Context) (v int, err error)

OldMaxBars returns the old "max_bars" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldName

func (m *StudySessionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldSessionID

func (m *StudySessionMutation) OldSessionID(ctx context.Context) (v string, err error)

OldSessionID returns the old "session_id" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldSettings

func (m *StudySessionMutation) OldSettings(ctx context.Context) (v map[string]interface{}, err error)

OldSettings returns the old "settings" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldStatus

func (m *StudySessionMutation) OldStatus(ctx context.Context) (v studysession.Status, err error)

OldStatus returns the old "status" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) OldUpdatedAt

func (m *StudySessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the StudySession entity. If the StudySession 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 (*StudySessionMutation) Op

func (m *StudySessionMutation) Op() Op

Op returns the operation name.

func (*StudySessionMutation) RemoveIndicatorDatumIDs

func (m *StudySessionMutation) RemoveIndicatorDatumIDs(ids ...uuid.UUID)

RemoveIndicatorDatumIDs removes the "indicator_data" edge to the IndicatorData entity by IDs.

func (*StudySessionMutation) RemoveIndicatorIDs

func (m *StudySessionMutation) RemoveIndicatorIDs(ids ...uuid.UUID)

RemoveIndicatorIDs removes the "indicators" edge to the Indicator entity by IDs.

func (*StudySessionMutation) RemovedEdges

func (m *StudySessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StudySessionMutation) RemovedIDs

func (m *StudySessionMutation) 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 (*StudySessionMutation) RemovedIndicatorDataIDs

func (m *StudySessionMutation) RemovedIndicatorDataIDs() (ids []uuid.UUID)

RemovedIndicatorData returns the removed IDs of the "indicator_data" edge to the IndicatorData entity.

func (*StudySessionMutation) RemovedIndicatorsIDs

func (m *StudySessionMutation) RemovedIndicatorsIDs() (ids []uuid.UUID)

RemovedIndicators returns the removed IDs of the "indicators" edge to the Indicator entity.

func (*StudySessionMutation) ResetCreatedAt

func (m *StudySessionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*StudySessionMutation) ResetEdge

func (m *StudySessionMutation) 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 (*StudySessionMutation) ResetErrorCount

func (m *StudySessionMutation) ResetErrorCount()

ResetErrorCount resets all changes to the "error_count" field.

func (*StudySessionMutation) ResetErrorMessage

func (m *StudySessionMutation) ResetErrorMessage()

ResetErrorMessage resets all changes to the "error_message" field.

func (*StudySessionMutation) ResetField

func (m *StudySessionMutation) 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 (*StudySessionMutation) ResetIndicatorData

func (m *StudySessionMutation) ResetIndicatorData()

ResetIndicatorData resets all changes to the "indicator_data" edge.

func (*StudySessionMutation) ResetIndicators

func (m *StudySessionMutation) ResetIndicators()

ResetIndicators resets all changes to the "indicators" edge.

func (*StudySessionMutation) ResetInterval

func (m *StudySessionMutation) ResetInterval()

ResetInterval resets all changes to the "interval" field.

func (*StudySessionMutation) ResetLastUpdate

func (m *StudySessionMutation) ResetLastUpdate()

ResetLastUpdate resets all changes to the "last_update" field.

func (*StudySessionMutation) ResetMaxBars

func (m *StudySessionMutation) ResetMaxBars()

ResetMaxBars resets all changes to the "max_bars" field.

func (*StudySessionMutation) ResetName

func (m *StudySessionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*StudySessionMutation) ResetSessionID

func (m *StudySessionMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*StudySessionMutation) ResetSettings

func (m *StudySessionMutation) ResetSettings()

ResetSettings resets all changes to the "settings" field.

func (*StudySessionMutation) ResetStatus

func (m *StudySessionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*StudySessionMutation) ResetSymbol

func (m *StudySessionMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" edge.

func (*StudySessionMutation) ResetUpdatedAt

func (m *StudySessionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*StudySessionMutation) SessionID

func (m *StudySessionMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*StudySessionMutation) SetCreatedAt

func (m *StudySessionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*StudySessionMutation) SetErrorCount

func (m *StudySessionMutation) SetErrorCount(i int)

SetErrorCount sets the "error_count" field.

func (*StudySessionMutation) SetErrorMessage

func (m *StudySessionMutation) SetErrorMessage(s string)

SetErrorMessage sets the "error_message" field.

func (*StudySessionMutation) SetField

func (m *StudySessionMutation) 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 (*StudySessionMutation) SetID

func (m *StudySessionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of StudySession entities.

func (*StudySessionMutation) SetInterval

func (m *StudySessionMutation) SetInterval(s studysession.Interval)

SetInterval sets the "interval" field.

func (*StudySessionMutation) SetLastUpdate

func (m *StudySessionMutation) SetLastUpdate(t time.Time)

SetLastUpdate sets the "last_update" field.

func (*StudySessionMutation) SetMaxBars

func (m *StudySessionMutation) SetMaxBars(i int)

SetMaxBars sets the "max_bars" field.

func (*StudySessionMutation) SetName

func (m *StudySessionMutation) SetName(s string)

SetName sets the "name" field.

func (*StudySessionMutation) SetOp

func (m *StudySessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StudySessionMutation) SetSessionID

func (m *StudySessionMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*StudySessionMutation) SetSettings

func (m *StudySessionMutation) SetSettings(value map[string]interface{})

SetSettings sets the "settings" field.

func (*StudySessionMutation) SetStatus

func (m *StudySessionMutation) SetStatus(s studysession.Status)

SetStatus sets the "status" field.

func (*StudySessionMutation) SetSymbolID

func (m *StudySessionMutation) SetSymbolID(id uuid.UUID)

SetSymbolID sets the "symbol" edge to the Symbol entity by id.

func (*StudySessionMutation) SetUpdatedAt

func (m *StudySessionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*StudySessionMutation) Settings

func (m *StudySessionMutation) Settings() (r map[string]interface{}, exists bool)

Settings returns the value of the "settings" field in the mutation.

func (*StudySessionMutation) SettingsCleared

func (m *StudySessionMutation) SettingsCleared() bool

SettingsCleared returns if the "settings" field was cleared in this mutation.

func (*StudySessionMutation) Status

func (m *StudySessionMutation) Status() (r studysession.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*StudySessionMutation) SymbolCleared

func (m *StudySessionMutation) SymbolCleared() bool

SymbolCleared reports if the "symbol" edge to the Symbol entity was cleared.

func (*StudySessionMutation) SymbolID

func (m *StudySessionMutation) SymbolID() (id uuid.UUID, exists bool)

SymbolID returns the "symbol" edge ID in the mutation.

func (*StudySessionMutation) SymbolIDs

func (m *StudySessionMutation) SymbolIDs() (ids []uuid.UUID)

SymbolIDs returns the "symbol" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SymbolID instead. It exists only for internal usage by the builders.

func (StudySessionMutation) Tx

func (m StudySessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StudySessionMutation) Type

func (m *StudySessionMutation) Type() string

Type returns the node type of this mutation (StudySession).

func (*StudySessionMutation) UpdatedAt

func (m *StudySessionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*StudySessionMutation) Where

Where appends a list predicates to the StudySessionMutation builder.

func (*StudySessionMutation) WhereP

func (m *StudySessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the StudySessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type StudySessionQuery

type StudySessionQuery struct {
	// contains filtered or unexported fields
}

StudySessionQuery is the builder for querying StudySession entities.

func (*StudySessionQuery) Aggregate

func (ssq *StudySessionQuery) Aggregate(fns ...AggregateFunc) *StudySessionSelect

Aggregate returns a StudySessionSelect configured with the given aggregations.

func (*StudySessionQuery) All

func (ssq *StudySessionQuery) All(ctx context.Context) ([]*StudySession, error)

All executes the query and returns a list of StudySessions.

func (*StudySessionQuery) AllX

func (ssq *StudySessionQuery) AllX(ctx context.Context) []*StudySession

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

func (*StudySessionQuery) Clone

func (ssq *StudySessionQuery) Clone() *StudySessionQuery

Clone returns a duplicate of the StudySessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StudySessionQuery) Count

func (ssq *StudySessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StudySessionQuery) CountX

func (ssq *StudySessionQuery) CountX(ctx context.Context) int

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

func (*StudySessionQuery) Exist

func (ssq *StudySessionQuery) Exist(ctx context.Context) (bool, error)

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

func (*StudySessionQuery) ExistX

func (ssq *StudySessionQuery) ExistX(ctx context.Context) bool

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

func (*StudySessionQuery) First

func (ssq *StudySessionQuery) First(ctx context.Context) (*StudySession, error)

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

func (*StudySessionQuery) FirstID

func (ssq *StudySessionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*StudySessionQuery) FirstIDX

func (ssq *StudySessionQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*StudySessionQuery) FirstX

func (ssq *StudySessionQuery) FirstX(ctx context.Context) *StudySession

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

func (*StudySessionQuery) GroupBy

func (ssq *StudySessionQuery) GroupBy(field string, fields ...string) *StudySessionGroupBy

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 {
	SessionID string `json:"session_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.StudySession.Query().
	GroupBy(studysession.FieldSessionID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StudySessionQuery) IDs

func (ssq *StudySessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*StudySessionQuery) IDsX

func (ssq *StudySessionQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*StudySessionQuery) Limit

func (ssq *StudySessionQuery) Limit(limit int) *StudySessionQuery

Limit the number of records to be returned by this query.

func (*StudySessionQuery) Offset

func (ssq *StudySessionQuery) Offset(offset int) *StudySessionQuery

Offset to start from.

func (*StudySessionQuery) Only

func (ssq *StudySessionQuery) Only(ctx context.Context) (*StudySession, error)

Only returns a single StudySession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StudySession entity is found. Returns a *NotFoundError when no StudySession entities are found.

func (*StudySessionQuery) OnlyID

func (ssq *StudySessionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only StudySession ID in the query. Returns a *NotSingularError when more than one StudySession ID is found. Returns a *NotFoundError when no entities are found.

func (*StudySessionQuery) OnlyIDX

func (ssq *StudySessionQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*StudySessionQuery) OnlyX

func (ssq *StudySessionQuery) OnlyX(ctx context.Context) *StudySession

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

func (*StudySessionQuery) Order

Order specifies how the records should be ordered.

func (*StudySessionQuery) QueryIndicatorData

func (ssq *StudySessionQuery) QueryIndicatorData() *IndicatorDataQuery

QueryIndicatorData chains the current query on the "indicator_data" edge.

func (*StudySessionQuery) QueryIndicators

func (ssq *StudySessionQuery) QueryIndicators() *IndicatorQuery

QueryIndicators chains the current query on the "indicators" edge.

func (*StudySessionQuery) QuerySymbol

func (ssq *StudySessionQuery) QuerySymbol() *SymbolQuery

QuerySymbol chains the current query on the "symbol" edge.

func (*StudySessionQuery) Select

func (ssq *StudySessionQuery) Select(fields ...string) *StudySessionSelect

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 {
	SessionID string `json:"session_id,omitempty"`
}

client.StudySession.Query().
	Select(studysession.FieldSessionID).
	Scan(ctx, &v)

func (*StudySessionQuery) Unique

func (ssq *StudySessionQuery) Unique(unique bool) *StudySessionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*StudySessionQuery) Where

Where adds a new predicate for the StudySessionQuery builder.

func (*StudySessionQuery) WithIndicatorData

func (ssq *StudySessionQuery) WithIndicatorData(opts ...func(*IndicatorDataQuery)) *StudySessionQuery

WithIndicatorData tells the query-builder to eager-load the nodes that are connected to the "indicator_data" edge. The optional arguments are used to configure the query builder of the edge.

func (*StudySessionQuery) WithIndicators

func (ssq *StudySessionQuery) WithIndicators(opts ...func(*IndicatorQuery)) *StudySessionQuery

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 (*StudySessionQuery) WithSymbol

func (ssq *StudySessionQuery) WithSymbol(opts ...func(*SymbolQuery)) *StudySessionQuery

WithSymbol tells the query-builder to eager-load the nodes that are connected to the "symbol" edge. The optional arguments are used to configure the query builder of the edge.

type StudySessionSelect

type StudySessionSelect struct {
	*StudySessionQuery
	// contains filtered or unexported fields
}

StudySessionSelect is the builder for selecting fields of StudySession entities.

func (*StudySessionSelect) Aggregate

func (sss *StudySessionSelect) Aggregate(fns ...AggregateFunc) *StudySessionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*StudySessionSelect) Bool

func (s *StudySessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) BoolX

func (s *StudySessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StudySessionSelect) Bools

func (s *StudySessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) BoolsX

func (s *StudySessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StudySessionSelect) Float64

func (s *StudySessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) Float64X

func (s *StudySessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StudySessionSelect) Float64s

func (s *StudySessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) Float64sX

func (s *StudySessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StudySessionSelect) Int

func (s *StudySessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) IntX

func (s *StudySessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StudySessionSelect) Ints

func (s *StudySessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) IntsX

func (s *StudySessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StudySessionSelect) Scan

func (sss *StudySessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StudySessionSelect) ScanX

func (s *StudySessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StudySessionSelect) String

func (s *StudySessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StudySessionSelect) StringX

func (s *StudySessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StudySessionSelect) Strings

func (s *StudySessionSelect) Strings(ctx context.Context) ([]string, error)

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

func (*StudySessionSelect) StringsX

func (s *StudySessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StudySessionUpdate

type StudySessionUpdate struct {
	// contains filtered or unexported fields
}

StudySessionUpdate is the builder for updating StudySession entities.

func (*StudySessionUpdate) AddErrorCount

func (ssu *StudySessionUpdate) AddErrorCount(i int) *StudySessionUpdate

AddErrorCount adds i to the "error_count" field.

func (*StudySessionUpdate) AddIndicatorData

func (ssu *StudySessionUpdate) AddIndicatorData(i ...*IndicatorData) *StudySessionUpdate

AddIndicatorData adds the "indicator_data" edges to the IndicatorData entity.

func (*StudySessionUpdate) AddIndicatorDatumIDs

func (ssu *StudySessionUpdate) AddIndicatorDatumIDs(ids ...uuid.UUID) *StudySessionUpdate

AddIndicatorDatumIDs adds the "indicator_data" edge to the IndicatorData entity by IDs.

func (*StudySessionUpdate) AddIndicatorIDs

func (ssu *StudySessionUpdate) AddIndicatorIDs(ids ...uuid.UUID) *StudySessionUpdate

AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.

func (*StudySessionUpdate) AddIndicators

func (ssu *StudySessionUpdate) AddIndicators(i ...*Indicator) *StudySessionUpdate

AddIndicators adds the "indicators" edges to the Indicator entity.

func (*StudySessionUpdate) AddMaxBars

func (ssu *StudySessionUpdate) AddMaxBars(i int) *StudySessionUpdate

AddMaxBars adds i to the "max_bars" field.

func (*StudySessionUpdate) ClearErrorMessage

func (ssu *StudySessionUpdate) ClearErrorMessage() *StudySessionUpdate

ClearErrorMessage clears the value of the "error_message" field.

func (*StudySessionUpdate) ClearIndicatorData

func (ssu *StudySessionUpdate) ClearIndicatorData() *StudySessionUpdate

ClearIndicatorData clears all "indicator_data" edges to the IndicatorData entity.

func (*StudySessionUpdate) ClearIndicators

func (ssu *StudySessionUpdate) ClearIndicators() *StudySessionUpdate

ClearIndicators clears all "indicators" edges to the Indicator entity.

func (*StudySessionUpdate) ClearLastUpdate

func (ssu *StudySessionUpdate) ClearLastUpdate() *StudySessionUpdate

ClearLastUpdate clears the value of the "last_update" field.

func (*StudySessionUpdate) ClearName

func (ssu *StudySessionUpdate) ClearName() *StudySessionUpdate

ClearName clears the value of the "name" field.

func (*StudySessionUpdate) ClearSettings

func (ssu *StudySessionUpdate) ClearSettings() *StudySessionUpdate

ClearSettings clears the value of the "settings" field.

func (*StudySessionUpdate) ClearSymbol

func (ssu *StudySessionUpdate) ClearSymbol() *StudySessionUpdate

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*StudySessionUpdate) Exec

func (ssu *StudySessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StudySessionUpdate) ExecX

func (ssu *StudySessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionUpdate) Mutation

func (ssu *StudySessionUpdate) Mutation() *StudySessionMutation

Mutation returns the StudySessionMutation object of the builder.

func (*StudySessionUpdate) RemoveIndicatorData

func (ssu *StudySessionUpdate) RemoveIndicatorData(i ...*IndicatorData) *StudySessionUpdate

RemoveIndicatorData removes "indicator_data" edges to IndicatorData entities.

func (*StudySessionUpdate) RemoveIndicatorDatumIDs

func (ssu *StudySessionUpdate) RemoveIndicatorDatumIDs(ids ...uuid.UUID) *StudySessionUpdate

RemoveIndicatorDatumIDs removes the "indicator_data" edge to IndicatorData entities by IDs.

func (*StudySessionUpdate) RemoveIndicatorIDs

func (ssu *StudySessionUpdate) RemoveIndicatorIDs(ids ...uuid.UUID) *StudySessionUpdate

RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.

func (*StudySessionUpdate) RemoveIndicators

func (ssu *StudySessionUpdate) RemoveIndicators(i ...*Indicator) *StudySessionUpdate

RemoveIndicators removes "indicators" edges to Indicator entities.

func (*StudySessionUpdate) Save

func (ssu *StudySessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StudySessionUpdate) SaveX

func (ssu *StudySessionUpdate) SaveX(ctx context.Context) int

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

func (*StudySessionUpdate) SetErrorCount

func (ssu *StudySessionUpdate) SetErrorCount(i int) *StudySessionUpdate

SetErrorCount sets the "error_count" field.

func (*StudySessionUpdate) SetErrorMessage

func (ssu *StudySessionUpdate) SetErrorMessage(s string) *StudySessionUpdate

SetErrorMessage sets the "error_message" field.

func (*StudySessionUpdate) SetInterval

SetInterval sets the "interval" field.

func (*StudySessionUpdate) SetLastUpdate

func (ssu *StudySessionUpdate) SetLastUpdate(t time.Time) *StudySessionUpdate

SetLastUpdate sets the "last_update" field.

func (*StudySessionUpdate) SetMaxBars

func (ssu *StudySessionUpdate) SetMaxBars(i int) *StudySessionUpdate

SetMaxBars sets the "max_bars" field.

func (*StudySessionUpdate) SetName

func (ssu *StudySessionUpdate) SetName(s string) *StudySessionUpdate

SetName sets the "name" field.

func (*StudySessionUpdate) SetNillableErrorCount

func (ssu *StudySessionUpdate) SetNillableErrorCount(i *int) *StudySessionUpdate

SetNillableErrorCount sets the "error_count" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableErrorMessage

func (ssu *StudySessionUpdate) SetNillableErrorMessage(s *string) *StudySessionUpdate

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableInterval

func (ssu *StudySessionUpdate) SetNillableInterval(s *studysession.Interval) *StudySessionUpdate

SetNillableInterval sets the "interval" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableLastUpdate

func (ssu *StudySessionUpdate) SetNillableLastUpdate(t *time.Time) *StudySessionUpdate

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableMaxBars

func (ssu *StudySessionUpdate) SetNillableMaxBars(i *int) *StudySessionUpdate

SetNillableMaxBars sets the "max_bars" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableName

func (ssu *StudySessionUpdate) SetNillableName(s *string) *StudySessionUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableSessionID

func (ssu *StudySessionUpdate) SetNillableSessionID(s *string) *StudySessionUpdate

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*StudySessionUpdate) SetNillableStatus

func (ssu *StudySessionUpdate) SetNillableStatus(s *studysession.Status) *StudySessionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*StudySessionUpdate) SetSessionID

func (ssu *StudySessionUpdate) SetSessionID(s string) *StudySessionUpdate

SetSessionID sets the "session_id" field.

func (*StudySessionUpdate) SetSettings

func (ssu *StudySessionUpdate) SetSettings(m map[string]interface{}) *StudySessionUpdate

SetSettings sets the "settings" field.

func (*StudySessionUpdate) SetStatus

SetStatus sets the "status" field.

func (*StudySessionUpdate) SetSymbol

func (ssu *StudySessionUpdate) SetSymbol(s *Symbol) *StudySessionUpdate

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*StudySessionUpdate) SetSymbolID

func (ssu *StudySessionUpdate) SetSymbolID(id uuid.UUID) *StudySessionUpdate

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*StudySessionUpdate) SetUpdatedAt

func (ssu *StudySessionUpdate) SetUpdatedAt(t time.Time) *StudySessionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*StudySessionUpdate) Where

Where appends a list predicates to the StudySessionUpdate builder.

type StudySessionUpdateOne

type StudySessionUpdateOne struct {
	// contains filtered or unexported fields
}

StudySessionUpdateOne is the builder for updating a single StudySession entity.

func (*StudySessionUpdateOne) AddErrorCount

func (ssuo *StudySessionUpdateOne) AddErrorCount(i int) *StudySessionUpdateOne

AddErrorCount adds i to the "error_count" field.

func (*StudySessionUpdateOne) AddIndicatorData

func (ssuo *StudySessionUpdateOne) AddIndicatorData(i ...*IndicatorData) *StudySessionUpdateOne

AddIndicatorData adds the "indicator_data" edges to the IndicatorData entity.

func (*StudySessionUpdateOne) AddIndicatorDatumIDs

func (ssuo *StudySessionUpdateOne) AddIndicatorDatumIDs(ids ...uuid.UUID) *StudySessionUpdateOne

AddIndicatorDatumIDs adds the "indicator_data" edge to the IndicatorData entity by IDs.

func (*StudySessionUpdateOne) AddIndicatorIDs

func (ssuo *StudySessionUpdateOne) AddIndicatorIDs(ids ...uuid.UUID) *StudySessionUpdateOne

AddIndicatorIDs adds the "indicators" edge to the Indicator entity by IDs.

func (*StudySessionUpdateOne) AddIndicators

func (ssuo *StudySessionUpdateOne) AddIndicators(i ...*Indicator) *StudySessionUpdateOne

AddIndicators adds the "indicators" edges to the Indicator entity.

func (*StudySessionUpdateOne) AddMaxBars

func (ssuo *StudySessionUpdateOne) AddMaxBars(i int) *StudySessionUpdateOne

AddMaxBars adds i to the "max_bars" field.

func (*StudySessionUpdateOne) ClearErrorMessage

func (ssuo *StudySessionUpdateOne) ClearErrorMessage() *StudySessionUpdateOne

ClearErrorMessage clears the value of the "error_message" field.

func (*StudySessionUpdateOne) ClearIndicatorData

func (ssuo *StudySessionUpdateOne) ClearIndicatorData() *StudySessionUpdateOne

ClearIndicatorData clears all "indicator_data" edges to the IndicatorData entity.

func (*StudySessionUpdateOne) ClearIndicators

func (ssuo *StudySessionUpdateOne) ClearIndicators() *StudySessionUpdateOne

ClearIndicators clears all "indicators" edges to the Indicator entity.

func (*StudySessionUpdateOne) ClearLastUpdate

func (ssuo *StudySessionUpdateOne) ClearLastUpdate() *StudySessionUpdateOne

ClearLastUpdate clears the value of the "last_update" field.

func (*StudySessionUpdateOne) ClearName

func (ssuo *StudySessionUpdateOne) ClearName() *StudySessionUpdateOne

ClearName clears the value of the "name" field.

func (*StudySessionUpdateOne) ClearSettings

func (ssuo *StudySessionUpdateOne) ClearSettings() *StudySessionUpdateOne

ClearSettings clears the value of the "settings" field.

func (*StudySessionUpdateOne) ClearSymbol

func (ssuo *StudySessionUpdateOne) ClearSymbol() *StudySessionUpdateOne

ClearSymbol clears the "symbol" edge to the Symbol entity.

func (*StudySessionUpdateOne) Exec

func (ssuo *StudySessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StudySessionUpdateOne) ExecX

func (ssuo *StudySessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StudySessionUpdateOne) Mutation

func (ssuo *StudySessionUpdateOne) Mutation() *StudySessionMutation

Mutation returns the StudySessionMutation object of the builder.

func (*StudySessionUpdateOne) RemoveIndicatorData

func (ssuo *StudySessionUpdateOne) RemoveIndicatorData(i ...*IndicatorData) *StudySessionUpdateOne

RemoveIndicatorData removes "indicator_data" edges to IndicatorData entities.

func (*StudySessionUpdateOne) RemoveIndicatorDatumIDs

func (ssuo *StudySessionUpdateOne) RemoveIndicatorDatumIDs(ids ...uuid.UUID) *StudySessionUpdateOne

RemoveIndicatorDatumIDs removes the "indicator_data" edge to IndicatorData entities by IDs.

func (*StudySessionUpdateOne) RemoveIndicatorIDs

func (ssuo *StudySessionUpdateOne) RemoveIndicatorIDs(ids ...uuid.UUID) *StudySessionUpdateOne

RemoveIndicatorIDs removes the "indicators" edge to Indicator entities by IDs.

func (*StudySessionUpdateOne) RemoveIndicators

func (ssuo *StudySessionUpdateOne) RemoveIndicators(i ...*Indicator) *StudySessionUpdateOne

RemoveIndicators removes "indicators" edges to Indicator entities.

func (*StudySessionUpdateOne) Save

Save executes the query and returns the updated StudySession entity.

func (*StudySessionUpdateOne) SaveX

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

func (*StudySessionUpdateOne) Select

func (ssuo *StudySessionUpdateOne) Select(field string, fields ...string) *StudySessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StudySessionUpdateOne) SetErrorCount

func (ssuo *StudySessionUpdateOne) SetErrorCount(i int) *StudySessionUpdateOne

SetErrorCount sets the "error_count" field.

func (*StudySessionUpdateOne) SetErrorMessage

func (ssuo *StudySessionUpdateOne) SetErrorMessage(s string) *StudySessionUpdateOne

SetErrorMessage sets the "error_message" field.

func (*StudySessionUpdateOne) SetInterval

SetInterval sets the "interval" field.

func (*StudySessionUpdateOne) SetLastUpdate

func (ssuo *StudySessionUpdateOne) SetLastUpdate(t time.Time) *StudySessionUpdateOne

SetLastUpdate sets the "last_update" field.

func (*StudySessionUpdateOne) SetMaxBars

func (ssuo *StudySessionUpdateOne) SetMaxBars(i int) *StudySessionUpdateOne

SetMaxBars sets the "max_bars" field.

func (*StudySessionUpdateOne) SetName

SetName sets the "name" field.

func (*StudySessionUpdateOne) SetNillableErrorCount

func (ssuo *StudySessionUpdateOne) SetNillableErrorCount(i *int) *StudySessionUpdateOne

SetNillableErrorCount sets the "error_count" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableErrorMessage

func (ssuo *StudySessionUpdateOne) SetNillableErrorMessage(s *string) *StudySessionUpdateOne

SetNillableErrorMessage sets the "error_message" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableInterval

func (ssuo *StudySessionUpdateOne) SetNillableInterval(s *studysession.Interval) *StudySessionUpdateOne

SetNillableInterval sets the "interval" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableLastUpdate

func (ssuo *StudySessionUpdateOne) SetNillableLastUpdate(t *time.Time) *StudySessionUpdateOne

SetNillableLastUpdate sets the "last_update" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableMaxBars

func (ssuo *StudySessionUpdateOne) SetNillableMaxBars(i *int) *StudySessionUpdateOne

SetNillableMaxBars sets the "max_bars" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableName

func (ssuo *StudySessionUpdateOne) SetNillableName(s *string) *StudySessionUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableSessionID

func (ssuo *StudySessionUpdateOne) SetNillableSessionID(s *string) *StudySessionUpdateOne

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*StudySessionUpdateOne) SetNillableStatus

func (ssuo *StudySessionUpdateOne) SetNillableStatus(s *studysession.Status) *StudySessionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*StudySessionUpdateOne) SetSessionID

func (ssuo *StudySessionUpdateOne) SetSessionID(s string) *StudySessionUpdateOne

SetSessionID sets the "session_id" field.

func (*StudySessionUpdateOne) SetSettings

func (ssuo *StudySessionUpdateOne) SetSettings(m map[string]interface{}) *StudySessionUpdateOne

SetSettings sets the "settings" field.

func (*StudySessionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*StudySessionUpdateOne) SetSymbol

func (ssuo *StudySessionUpdateOne) SetSymbol(s *Symbol) *StudySessionUpdateOne

SetSymbol sets the "symbol" edge to the Symbol entity.

func (*StudySessionUpdateOne) SetSymbolID

func (ssuo *StudySessionUpdateOne) SetSymbolID(id uuid.UUID) *StudySessionUpdateOne

SetSymbolID sets the "symbol" edge to the Symbol entity by ID.

func (*StudySessionUpdateOne) SetUpdatedAt

func (ssuo *StudySessionUpdateOne) SetUpdatedAt(t time.Time) *StudySessionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*StudySessionUpdateOne) Where

Where appends a list predicates to the StudySessionUpdate builder.

type StudySessions

type StudySessions []*StudySession

StudySessions is a parsable slice of StudySession.

type Symbol

type Symbol struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Exchange identifier (e.g., NASDAQ, BINANCE)
	Exchange string `json:"exchange,omitempty"`
	// Symbol identifier (e.g., AAPL, BTCUSDT)
	Symbol string `json:"symbol,omitempty"`
	// Full symbol with exchange (e.g., NASDAQ:AAPL)
	FullSymbol string `json:"full_symbol,omitempty"`
	// Company or asset name
	Name string `json:"name,omitempty"`
	// Detailed description
	Description string `json:"description,omitempty"`
	// Asset type
	Type symbol.Type `json:"type,omitempty"`
	// Industry sector
	Sector string `json:"sector,omitempty"`
	// Specific industry
	Industry string `json:"industry,omitempty"`
	// Primary currency
	Currency string `json:"currency,omitempty"`
	// Market capitalization
	MarketCap float64 `json:"market_cap,omitempty"`
	// Total shares outstanding
	SharesOutstanding int64 `json:"shares_outstanding,omitempty"`
	// Whether symbol is actively traded
	IsActive bool `json:"is_active,omitempty"`
	// Whether symbol can be traded
	IsTradable bool `json:"is_tradable,omitempty"`
	// Additional symbol metadata
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SymbolQuery when eager-loading is set.
	Edges SymbolEdges `json:"edges"`
	// contains filtered or unexported fields
}

Symbol is the model entity for the Symbol schema.

func (*Symbol) QueryCandles

func (s *Symbol) QueryCandles() *CandleQuery

QueryCandles queries the "candles" edge of the Symbol entity.

func (*Symbol) QuerySessions

func (s *Symbol) QuerySessions() *ActiveSessionQuery

QuerySessions queries the "sessions" edge of the Symbol entity.

func (*Symbol) QueryStudySessions

func (s *Symbol) QueryStudySessions() *StudySessionQuery

QueryStudySessions queries the "study_sessions" edge of the Symbol entity.

func (*Symbol) String

func (s *Symbol) String() string

String implements the fmt.Stringer.

func (*Symbol) Unwrap

func (s *Symbol) Unwrap() *Symbol

Unwrap unwraps the Symbol 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 (*Symbol) Update

func (s *Symbol) Update() *SymbolUpdateOne

Update returns a builder for updating this Symbol. Note that you need to call Symbol.Unwrap() before calling this method if this Symbol was returned from a transaction, and the transaction was committed or rolled back.

func (*Symbol) Value

func (s *Symbol) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Symbol. This includes values selected through modifiers, order, etc.

type SymbolClient

type SymbolClient struct {
	// contains filtered or unexported fields
}

SymbolClient is a client for the Symbol schema.

func NewSymbolClient

func NewSymbolClient(c config) *SymbolClient

NewSymbolClient returns a client for the Symbol from the given config.

func (*SymbolClient) Create

func (c *SymbolClient) Create() *SymbolCreate

Create returns a builder for creating a Symbol entity.

func (*SymbolClient) CreateBulk

func (c *SymbolClient) CreateBulk(builders ...*SymbolCreate) *SymbolCreateBulk

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

func (*SymbolClient) Delete

func (c *SymbolClient) Delete() *SymbolDelete

Delete returns a delete builder for Symbol.

func (*SymbolClient) DeleteOne

func (c *SymbolClient) DeleteOne(s *Symbol) *SymbolDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SymbolClient) DeleteOneID

func (c *SymbolClient) DeleteOneID(id uuid.UUID) *SymbolDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SymbolClient) Get

func (c *SymbolClient) Get(ctx context.Context, id uuid.UUID) (*Symbol, error)

Get returns a Symbol entity by its id.

func (*SymbolClient) GetX

func (c *SymbolClient) GetX(ctx context.Context, id uuid.UUID) *Symbol

GetX is like Get, but panics if an error occurs.

func (*SymbolClient) Hooks

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

Hooks returns the client hooks.

func (*SymbolClient) Intercept

func (c *SymbolClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `symbol.Intercept(f(g(h())))`.

func (*SymbolClient) Interceptors

func (c *SymbolClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SymbolClient) MapCreateBulk

func (c *SymbolClient) MapCreateBulk(slice any, setFunc func(*SymbolCreate, int)) *SymbolCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SymbolClient) Query

func (c *SymbolClient) Query() *SymbolQuery

Query returns a query builder for Symbol.

func (*SymbolClient) QueryCandles

func (c *SymbolClient) QueryCandles(s *Symbol) *CandleQuery

QueryCandles queries the candles edge of a Symbol.

func (*SymbolClient) QuerySessions

func (c *SymbolClient) QuerySessions(s *Symbol) *ActiveSessionQuery

QuerySessions queries the sessions edge of a Symbol.

func (*SymbolClient) QueryStudySessions

func (c *SymbolClient) QueryStudySessions(s *Symbol) *StudySessionQuery

QueryStudySessions queries the study_sessions edge of a Symbol.

func (*SymbolClient) Update

func (c *SymbolClient) Update() *SymbolUpdate

Update returns an update builder for Symbol.

func (*SymbolClient) UpdateOne

func (c *SymbolClient) UpdateOne(s *Symbol) *SymbolUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SymbolClient) UpdateOneID

func (c *SymbolClient) UpdateOneID(id uuid.UUID) *SymbolUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SymbolClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `symbol.Hooks(f(g(h())))`.

type SymbolCreate

type SymbolCreate struct {
	// contains filtered or unexported fields
}

SymbolCreate is the builder for creating a Symbol entity.

func (*SymbolCreate) AddCandleIDs

func (sc *SymbolCreate) AddCandleIDs(ids ...uuid.UUID) *SymbolCreate

AddCandleIDs adds the "candles" edge to the Candle entity by IDs.

func (*SymbolCreate) AddCandles

func (sc *SymbolCreate) AddCandles(c ...*Candle) *SymbolCreate

AddCandles adds the "candles" edges to the Candle entity.

func (*SymbolCreate) AddSessionIDs

func (sc *SymbolCreate) AddSessionIDs(ids ...uuid.UUID) *SymbolCreate

AddSessionIDs adds the "sessions" edge to the ActiveSession entity by IDs.

func (*SymbolCreate) AddSessions

func (sc *SymbolCreate) AddSessions(a ...*ActiveSession) *SymbolCreate

AddSessions adds the "sessions" edges to the ActiveSession entity.

func (*SymbolCreate) AddStudySessionIDs

func (sc *SymbolCreate) AddStudySessionIDs(ids ...uuid.UUID) *SymbolCreate

AddStudySessionIDs adds the "study_sessions" edge to the StudySession entity by IDs.

func (*SymbolCreate) AddStudySessions

func (sc *SymbolCreate) AddStudySessions(s ...*StudySession) *SymbolCreate

AddStudySessions adds the "study_sessions" edges to the StudySession entity.

func (*SymbolCreate) Exec

func (sc *SymbolCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SymbolCreate) ExecX

func (sc *SymbolCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SymbolCreate) Mutation

func (sc *SymbolCreate) Mutation() *SymbolMutation

Mutation returns the SymbolMutation object of the builder.

func (*SymbolCreate) Save

func (sc *SymbolCreate) Save(ctx context.Context) (*Symbol, error)

Save creates the Symbol in the database.

func (*SymbolCreate) SaveX

func (sc *SymbolCreate) SaveX(ctx context.Context) *Symbol

SaveX calls Save and panics if Save returns an error.

func (*SymbolCreate) SetCreatedAt

func (sc *SymbolCreate) SetCreatedAt(t time.Time) *SymbolCreate

SetCreatedAt sets the "created_at" field.

func (*SymbolCreate) SetCurrency

func (sc *SymbolCreate) SetCurrency(s string) *SymbolCreate

SetCurrency sets the "currency" field.

func (*SymbolCreate) SetDescription

func (sc *SymbolCreate) SetDescription(s string) *SymbolCreate

SetDescription sets the "description" field.

func (*SymbolCreate) SetExchange

func (sc *SymbolCreate) SetExchange(s string) *SymbolCreate

SetExchange sets the "exchange" field.

func (*SymbolCreate) SetFullSymbol

func (sc *SymbolCreate) SetFullSymbol(s string) *SymbolCreate

SetFullSymbol sets the "full_symbol" field.

func (*SymbolCreate) SetID

func (sc *SymbolCreate) SetID(u uuid.UUID) *SymbolCreate

SetID sets the "id" field.

func (*SymbolCreate) SetIndustry

func (sc *SymbolCreate) SetIndustry(s string) *SymbolCreate

SetIndustry sets the "industry" field.

func (*SymbolCreate) SetIsActive

func (sc *SymbolCreate) SetIsActive(b bool) *SymbolCreate

SetIsActive sets the "is_active" field.

func (*SymbolCreate) SetIsTradable

func (sc *SymbolCreate) SetIsTradable(b bool) *SymbolCreate

SetIsTradable sets the "is_tradable" field.

func (*SymbolCreate) SetMarketCap

func (sc *SymbolCreate) SetMarketCap(f float64) *SymbolCreate

SetMarketCap sets the "market_cap" field.

func (*SymbolCreate) SetMetadata

func (sc *SymbolCreate) SetMetadata(m map[string]interface{}) *SymbolCreate

SetMetadata sets the "metadata" field.

func (*SymbolCreate) SetName

func (sc *SymbolCreate) SetName(s string) *SymbolCreate

SetName sets the "name" field.

func (*SymbolCreate) SetNillableCreatedAt

func (sc *SymbolCreate) SetNillableCreatedAt(t *time.Time) *SymbolCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SymbolCreate) SetNillableCurrency

func (sc *SymbolCreate) SetNillableCurrency(s *string) *SymbolCreate

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*SymbolCreate) SetNillableDescription

func (sc *SymbolCreate) SetNillableDescription(s *string) *SymbolCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SymbolCreate) SetNillableID

func (sc *SymbolCreate) SetNillableID(u *uuid.UUID) *SymbolCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SymbolCreate) SetNillableIndustry

func (sc *SymbolCreate) SetNillableIndustry(s *string) *SymbolCreate

SetNillableIndustry sets the "industry" field if the given value is not nil.

func (*SymbolCreate) SetNillableIsActive

func (sc *SymbolCreate) SetNillableIsActive(b *bool) *SymbolCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SymbolCreate) SetNillableIsTradable

func (sc *SymbolCreate) SetNillableIsTradable(b *bool) *SymbolCreate

SetNillableIsTradable sets the "is_tradable" field if the given value is not nil.

func (*SymbolCreate) SetNillableMarketCap

func (sc *SymbolCreate) SetNillableMarketCap(f *float64) *SymbolCreate

SetNillableMarketCap sets the "market_cap" field if the given value is not nil.

func (*SymbolCreate) SetNillableName

func (sc *SymbolCreate) SetNillableName(s *string) *SymbolCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*SymbolCreate) SetNillableSector

func (sc *SymbolCreate) SetNillableSector(s *string) *SymbolCreate

SetNillableSector sets the "sector" field if the given value is not nil.

func (*SymbolCreate) SetNillableSharesOutstanding

func (sc *SymbolCreate) SetNillableSharesOutstanding(i *int64) *SymbolCreate

SetNillableSharesOutstanding sets the "shares_outstanding" field if the given value is not nil.

func (*SymbolCreate) SetNillableType

func (sc *SymbolCreate) SetNillableType(s *symbol.Type) *SymbolCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*SymbolCreate) SetNillableUpdatedAt

func (sc *SymbolCreate) SetNillableUpdatedAt(t *time.Time) *SymbolCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SymbolCreate) SetSector

func (sc *SymbolCreate) SetSector(s string) *SymbolCreate

SetSector sets the "sector" field.

func (*SymbolCreate) SetSharesOutstanding

func (sc *SymbolCreate) SetSharesOutstanding(i int64) *SymbolCreate

SetSharesOutstanding sets the "shares_outstanding" field.

func (*SymbolCreate) SetSymbol

func (sc *SymbolCreate) SetSymbol(s string) *SymbolCreate

SetSymbol sets the "symbol" field.

func (*SymbolCreate) SetType

func (sc *SymbolCreate) SetType(s symbol.Type) *SymbolCreate

SetType sets the "type" field.

func (*SymbolCreate) SetUpdatedAt

func (sc *SymbolCreate) SetUpdatedAt(t time.Time) *SymbolCreate

SetUpdatedAt sets the "updated_at" field.

type SymbolCreateBulk

type SymbolCreateBulk struct {
	// contains filtered or unexported fields
}

SymbolCreateBulk is the builder for creating many Symbol entities in bulk.

func (*SymbolCreateBulk) Exec

func (scb *SymbolCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SymbolCreateBulk) ExecX

func (scb *SymbolCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SymbolCreateBulk) Save

func (scb *SymbolCreateBulk) Save(ctx context.Context) ([]*Symbol, error)

Save creates the Symbol entities in the database.

func (*SymbolCreateBulk) SaveX

func (scb *SymbolCreateBulk) SaveX(ctx context.Context) []*Symbol

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

type SymbolDelete

type SymbolDelete struct {
	// contains filtered or unexported fields
}

SymbolDelete is the builder for deleting a Symbol entity.

func (*SymbolDelete) Exec

func (sd *SymbolDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SymbolDelete) ExecX

func (sd *SymbolDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SymbolDelete) Where

func (sd *SymbolDelete) Where(ps ...predicate.Symbol) *SymbolDelete

Where appends a list predicates to the SymbolDelete builder.

type SymbolDeleteOne

type SymbolDeleteOne struct {
	// contains filtered or unexported fields
}

SymbolDeleteOne is the builder for deleting a single Symbol entity.

func (*SymbolDeleteOne) Exec

func (sdo *SymbolDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SymbolDeleteOne) ExecX

func (sdo *SymbolDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SymbolDeleteOne) Where

func (sdo *SymbolDeleteOne) Where(ps ...predicate.Symbol) *SymbolDeleteOne

Where appends a list predicates to the SymbolDelete builder.

type SymbolEdges

type SymbolEdges struct {
	// Active sessions for this symbol
	Sessions []*ActiveSession `json:"sessions,omitempty"`
	// Candlestick data for this symbol
	Candles []*Candle `json:"candles,omitempty"`
	// Technical analysis sessions for this symbol
	StudySessions []*StudySession `json:"study_sessions,omitempty"`
	// contains filtered or unexported fields
}

SymbolEdges holds the relations/edges for other nodes in the graph.

func (SymbolEdges) CandlesOrErr

func (e SymbolEdges) CandlesOrErr() ([]*Candle, error)

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

func (SymbolEdges) SessionsOrErr

func (e SymbolEdges) SessionsOrErr() ([]*ActiveSession, error)

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

func (SymbolEdges) StudySessionsOrErr

func (e SymbolEdges) StudySessionsOrErr() ([]*StudySession, error)

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

type SymbolGroupBy

type SymbolGroupBy struct {
	// contains filtered or unexported fields
}

SymbolGroupBy is the group-by builder for Symbol entities.

func (*SymbolGroupBy) Aggregate

func (sgb *SymbolGroupBy) Aggregate(fns ...AggregateFunc) *SymbolGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SymbolGroupBy) Bool

func (s *SymbolGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) BoolX

func (s *SymbolGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SymbolGroupBy) Bools

func (s *SymbolGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) BoolsX

func (s *SymbolGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SymbolGroupBy) Float64

func (s *SymbolGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) Float64X

func (s *SymbolGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SymbolGroupBy) Float64s

func (s *SymbolGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) Float64sX

func (s *SymbolGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SymbolGroupBy) Int

func (s *SymbolGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) IntX

func (s *SymbolGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SymbolGroupBy) Ints

func (s *SymbolGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) IntsX

func (s *SymbolGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SymbolGroupBy) Scan

func (sgb *SymbolGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SymbolGroupBy) ScanX

func (s *SymbolGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SymbolGroupBy) String

func (s *SymbolGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SymbolGroupBy) StringX

func (s *SymbolGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SymbolGroupBy) Strings

func (s *SymbolGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*SymbolGroupBy) StringsX

func (s *SymbolGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SymbolMutation

type SymbolMutation struct {
	// contains filtered or unexported fields
}

SymbolMutation represents an operation that mutates the Symbol nodes in the graph.

func (*SymbolMutation) AddCandleIDs

func (m *SymbolMutation) AddCandleIDs(ids ...uuid.UUID)

AddCandleIDs adds the "candles" edge to the Candle entity by ids.

func (*SymbolMutation) AddField

func (m *SymbolMutation) 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 (*SymbolMutation) AddMarketCap

func (m *SymbolMutation) AddMarketCap(f float64)

AddMarketCap adds f to the "market_cap" field.

func (*SymbolMutation) AddSessionIDs

func (m *SymbolMutation) AddSessionIDs(ids ...uuid.UUID)

AddSessionIDs adds the "sessions" edge to the ActiveSession entity by ids.

func (*SymbolMutation) AddSharesOutstanding

func (m *SymbolMutation) AddSharesOutstanding(i int64)

AddSharesOutstanding adds i to the "shares_outstanding" field.

func (*SymbolMutation) AddStudySessionIDs

func (m *SymbolMutation) AddStudySessionIDs(ids ...uuid.UUID)

AddStudySessionIDs adds the "study_sessions" edge to the StudySession entity by ids.

func (*SymbolMutation) AddedEdges

func (m *SymbolMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SymbolMutation) AddedField

func (m *SymbolMutation) 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 (*SymbolMutation) AddedFields

func (m *SymbolMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SymbolMutation) AddedIDs

func (m *SymbolMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SymbolMutation) AddedMarketCap

func (m *SymbolMutation) AddedMarketCap() (r float64, exists bool)

AddedMarketCap returns the value that was added to the "market_cap" field in this mutation.

func (*SymbolMutation) AddedSharesOutstanding

func (m *SymbolMutation) AddedSharesOutstanding() (r int64, exists bool)

AddedSharesOutstanding returns the value that was added to the "shares_outstanding" field in this mutation.

func (*SymbolMutation) CandlesCleared

func (m *SymbolMutation) CandlesCleared() bool

CandlesCleared reports if the "candles" edge to the Candle entity was cleared.

func (*SymbolMutation) CandlesIDs

func (m *SymbolMutation) CandlesIDs() (ids []uuid.UUID)

CandlesIDs returns the "candles" edge IDs in the mutation.

func (*SymbolMutation) ClearCandles

func (m *SymbolMutation) ClearCandles()

ClearCandles clears the "candles" edge to the Candle entity.

func (*SymbolMutation) ClearDescription

func (m *SymbolMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*SymbolMutation) ClearEdge

func (m *SymbolMutation) 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 (*SymbolMutation) ClearField

func (m *SymbolMutation) 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 (*SymbolMutation) ClearIndustry

func (m *SymbolMutation) ClearIndustry()

ClearIndustry clears the value of the "industry" field.

func (*SymbolMutation) ClearMarketCap

func (m *SymbolMutation) ClearMarketCap()

ClearMarketCap clears the value of the "market_cap" field.

func (*SymbolMutation) ClearMetadata

func (m *SymbolMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*SymbolMutation) ClearName

func (m *SymbolMutation) ClearName()

ClearName clears the value of the "name" field.

func (*SymbolMutation) ClearSector

func (m *SymbolMutation) ClearSector()

ClearSector clears the value of the "sector" field.

func (*SymbolMutation) ClearSessions

func (m *SymbolMutation) ClearSessions()

ClearSessions clears the "sessions" edge to the ActiveSession entity.

func (*SymbolMutation) ClearSharesOutstanding

func (m *SymbolMutation) ClearSharesOutstanding()

ClearSharesOutstanding clears the value of the "shares_outstanding" field.

func (*SymbolMutation) ClearStudySessions

func (m *SymbolMutation) ClearStudySessions()

ClearStudySessions clears the "study_sessions" edge to the StudySession entity.

func (*SymbolMutation) ClearedEdges

func (m *SymbolMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SymbolMutation) ClearedFields

func (m *SymbolMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SymbolMutation) Client

func (m SymbolMutation) 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 (*SymbolMutation) CreatedAt

func (m *SymbolMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SymbolMutation) Currency

func (m *SymbolMutation) Currency() (r string, exists bool)

Currency returns the value of the "currency" field in the mutation.

func (*SymbolMutation) Description

func (m *SymbolMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*SymbolMutation) DescriptionCleared

func (m *SymbolMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*SymbolMutation) EdgeCleared

func (m *SymbolMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SymbolMutation) Exchange

func (m *SymbolMutation) Exchange() (r string, exists bool)

Exchange returns the value of the "exchange" field in the mutation.

func (*SymbolMutation) Field

func (m *SymbolMutation) 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 (*SymbolMutation) FieldCleared

func (m *SymbolMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SymbolMutation) Fields

func (m *SymbolMutation) 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 (*SymbolMutation) FullSymbol

func (m *SymbolMutation) FullSymbol() (r string, exists bool)

FullSymbol returns the value of the "full_symbol" field in the mutation.

func (*SymbolMutation) GetType

func (m *SymbolMutation) GetType() (r symbol.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*SymbolMutation) ID

func (m *SymbolMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SymbolMutation) IDs

func (m *SymbolMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SymbolMutation) Industry

func (m *SymbolMutation) Industry() (r string, exists bool)

Industry returns the value of the "industry" field in the mutation.

func (*SymbolMutation) IndustryCleared

func (m *SymbolMutation) IndustryCleared() bool

IndustryCleared returns if the "industry" field was cleared in this mutation.

func (*SymbolMutation) IsActive

func (m *SymbolMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*SymbolMutation) IsTradable

func (m *SymbolMutation) IsTradable() (r bool, exists bool)

IsTradable returns the value of the "is_tradable" field in the mutation.

func (*SymbolMutation) MarketCap

func (m *SymbolMutation) MarketCap() (r float64, exists bool)

MarketCap returns the value of the "market_cap" field in the mutation.

func (*SymbolMutation) MarketCapCleared

func (m *SymbolMutation) MarketCapCleared() bool

MarketCapCleared returns if the "market_cap" field was cleared in this mutation.

func (*SymbolMutation) Metadata

func (m *SymbolMutation) Metadata() (r map[string]interface{}, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*SymbolMutation) MetadataCleared

func (m *SymbolMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*SymbolMutation) Name

func (m *SymbolMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SymbolMutation) NameCleared

func (m *SymbolMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*SymbolMutation) OldCreatedAt

func (m *SymbolMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldCurrency

func (m *SymbolMutation) OldCurrency(ctx context.Context) (v string, err error)

OldCurrency returns the old "currency" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldDescription

func (m *SymbolMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldExchange

func (m *SymbolMutation) OldExchange(ctx context.Context) (v string, err error)

OldExchange returns the old "exchange" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldField

func (m *SymbolMutation) 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 (*SymbolMutation) OldFullSymbol

func (m *SymbolMutation) OldFullSymbol(ctx context.Context) (v string, err error)

OldFullSymbol returns the old "full_symbol" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldIndustry

func (m *SymbolMutation) OldIndustry(ctx context.Context) (v string, err error)

OldIndustry returns the old "industry" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldIsActive

func (m *SymbolMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldIsTradable

func (m *SymbolMutation) OldIsTradable(ctx context.Context) (v bool, err error)

OldIsTradable returns the old "is_tradable" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldMarketCap

func (m *SymbolMutation) OldMarketCap(ctx context.Context) (v float64, err error)

OldMarketCap returns the old "market_cap" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldMetadata

func (m *SymbolMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)

OldMetadata returns the old "metadata" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldName

func (m *SymbolMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldSector

func (m *SymbolMutation) OldSector(ctx context.Context) (v string, err error)

OldSector returns the old "sector" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldSharesOutstanding

func (m *SymbolMutation) OldSharesOutstanding(ctx context.Context) (v int64, err error)

OldSharesOutstanding returns the old "shares_outstanding" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldSymbol

func (m *SymbolMutation) OldSymbol(ctx context.Context) (v string, err error)

OldSymbol returns the old "symbol" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldType

func (m *SymbolMutation) OldType(ctx context.Context) (v symbol.Type, err error)

OldType returns the old "type" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) OldUpdatedAt

func (m *SymbolMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Symbol entity. If the Symbol 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 (*SymbolMutation) Op

func (m *SymbolMutation) Op() Op

Op returns the operation name.

func (*SymbolMutation) RemoveCandleIDs

func (m *SymbolMutation) RemoveCandleIDs(ids ...uuid.UUID)

RemoveCandleIDs removes the "candles" edge to the Candle entity by IDs.

func (*SymbolMutation) RemoveSessionIDs

func (m *SymbolMutation) RemoveSessionIDs(ids ...uuid.UUID)

RemoveSessionIDs removes the "sessions" edge to the ActiveSession entity by IDs.

func (*SymbolMutation) RemoveStudySessionIDs

func (m *SymbolMutation) RemoveStudySessionIDs(ids ...uuid.UUID)

RemoveStudySessionIDs removes the "study_sessions" edge to the StudySession entity by IDs.

func (*SymbolMutation) RemovedCandlesIDs

func (m *SymbolMutation) RemovedCandlesIDs() (ids []uuid.UUID)

RemovedCandles returns the removed IDs of the "candles" edge to the Candle entity.

func (*SymbolMutation) RemovedEdges

func (m *SymbolMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SymbolMutation) RemovedIDs

func (m *SymbolMutation) 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 (*SymbolMutation) RemovedSessionsIDs

func (m *SymbolMutation) RemovedSessionsIDs() (ids []uuid.UUID)

RemovedSessions returns the removed IDs of the "sessions" edge to the ActiveSession entity.

func (*SymbolMutation) RemovedStudySessionsIDs

func (m *SymbolMutation) RemovedStudySessionsIDs() (ids []uuid.UUID)

RemovedStudySessions returns the removed IDs of the "study_sessions" edge to the StudySession entity.

func (*SymbolMutation) ResetCandles

func (m *SymbolMutation) ResetCandles()

ResetCandles resets all changes to the "candles" edge.

func (*SymbolMutation) ResetCreatedAt

func (m *SymbolMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SymbolMutation) ResetCurrency

func (m *SymbolMutation) ResetCurrency()

ResetCurrency resets all changes to the "currency" field.

func (*SymbolMutation) ResetDescription

func (m *SymbolMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*SymbolMutation) ResetEdge

func (m *SymbolMutation) 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 (*SymbolMutation) ResetExchange

func (m *SymbolMutation) ResetExchange()

ResetExchange resets all changes to the "exchange" field.

func (*SymbolMutation) ResetField

func (m *SymbolMutation) 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 (*SymbolMutation) ResetFullSymbol

func (m *SymbolMutation) ResetFullSymbol()

ResetFullSymbol resets all changes to the "full_symbol" field.

func (*SymbolMutation) ResetIndustry

func (m *SymbolMutation) ResetIndustry()

ResetIndustry resets all changes to the "industry" field.

func (*SymbolMutation) ResetIsActive

func (m *SymbolMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*SymbolMutation) ResetIsTradable

func (m *SymbolMutation) ResetIsTradable()

ResetIsTradable resets all changes to the "is_tradable" field.

func (*SymbolMutation) ResetMarketCap

func (m *SymbolMutation) ResetMarketCap()

ResetMarketCap resets all changes to the "market_cap" field.

func (*SymbolMutation) ResetMetadata

func (m *SymbolMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*SymbolMutation) ResetName

func (m *SymbolMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SymbolMutation) ResetSector

func (m *SymbolMutation) ResetSector()

ResetSector resets all changes to the "sector" field.

func (*SymbolMutation) ResetSessions

func (m *SymbolMutation) ResetSessions()

ResetSessions resets all changes to the "sessions" edge.

func (*SymbolMutation) ResetSharesOutstanding

func (m *SymbolMutation) ResetSharesOutstanding()

ResetSharesOutstanding resets all changes to the "shares_outstanding" field.

func (*SymbolMutation) ResetStudySessions

func (m *SymbolMutation) ResetStudySessions()

ResetStudySessions resets all changes to the "study_sessions" edge.

func (*SymbolMutation) ResetSymbol

func (m *SymbolMutation) ResetSymbol()

ResetSymbol resets all changes to the "symbol" field.

func (*SymbolMutation) ResetType

func (m *SymbolMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*SymbolMutation) ResetUpdatedAt

func (m *SymbolMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SymbolMutation) Sector

func (m *SymbolMutation) Sector() (r string, exists bool)

Sector returns the value of the "sector" field in the mutation.

func (*SymbolMutation) SectorCleared

func (m *SymbolMutation) SectorCleared() bool

SectorCleared returns if the "sector" field was cleared in this mutation.

func (*SymbolMutation) SessionsCleared

func (m *SymbolMutation) SessionsCleared() bool

SessionsCleared reports if the "sessions" edge to the ActiveSession entity was cleared.

func (*SymbolMutation) SessionsIDs

func (m *SymbolMutation) SessionsIDs() (ids []uuid.UUID)

SessionsIDs returns the "sessions" edge IDs in the mutation.

func (*SymbolMutation) SetCreatedAt

func (m *SymbolMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SymbolMutation) SetCurrency

func (m *SymbolMutation) SetCurrency(s string)

SetCurrency sets the "currency" field.

func (*SymbolMutation) SetDescription

func (m *SymbolMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*SymbolMutation) SetExchange

func (m *SymbolMutation) SetExchange(s string)

SetExchange sets the "exchange" field.

func (*SymbolMutation) SetField

func (m *SymbolMutation) 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 (*SymbolMutation) SetFullSymbol

func (m *SymbolMutation) SetFullSymbol(s string)

SetFullSymbol sets the "full_symbol" field.

func (*SymbolMutation) SetID

func (m *SymbolMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Symbol entities.

func (*SymbolMutation) SetIndustry

func (m *SymbolMutation) SetIndustry(s string)

SetIndustry sets the "industry" field.

func (*SymbolMutation) SetIsActive

func (m *SymbolMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*SymbolMutation) SetIsTradable

func (m *SymbolMutation) SetIsTradable(b bool)

SetIsTradable sets the "is_tradable" field.

func (*SymbolMutation) SetMarketCap

func (m *SymbolMutation) SetMarketCap(f float64)

SetMarketCap sets the "market_cap" field.

func (*SymbolMutation) SetMetadata

func (m *SymbolMutation) SetMetadata(value map[string]interface{})

SetMetadata sets the "metadata" field.

func (*SymbolMutation) SetName

func (m *SymbolMutation) SetName(s string)

SetName sets the "name" field.

func (*SymbolMutation) SetOp

func (m *SymbolMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SymbolMutation) SetSector

func (m *SymbolMutation) SetSector(s string)

SetSector sets the "sector" field.

func (*SymbolMutation) SetSharesOutstanding

func (m *SymbolMutation) SetSharesOutstanding(i int64)

SetSharesOutstanding sets the "shares_outstanding" field.

func (*SymbolMutation) SetSymbol

func (m *SymbolMutation) SetSymbol(s string)

SetSymbol sets the "symbol" field.

func (*SymbolMutation) SetType

func (m *SymbolMutation) SetType(s symbol.Type)

SetType sets the "type" field.

func (*SymbolMutation) SetUpdatedAt

func (m *SymbolMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SymbolMutation) SharesOutstanding

func (m *SymbolMutation) SharesOutstanding() (r int64, exists bool)

SharesOutstanding returns the value of the "shares_outstanding" field in the mutation.

func (*SymbolMutation) SharesOutstandingCleared

func (m *SymbolMutation) SharesOutstandingCleared() bool

SharesOutstandingCleared returns if the "shares_outstanding" field was cleared in this mutation.

func (*SymbolMutation) StudySessionsCleared

func (m *SymbolMutation) StudySessionsCleared() bool

StudySessionsCleared reports if the "study_sessions" edge to the StudySession entity was cleared.

func (*SymbolMutation) StudySessionsIDs

func (m *SymbolMutation) StudySessionsIDs() (ids []uuid.UUID)

StudySessionsIDs returns the "study_sessions" edge IDs in the mutation.

func (*SymbolMutation) Symbol

func (m *SymbolMutation) Symbol() (r string, exists bool)

Symbol returns the value of the "symbol" field in the mutation.

func (SymbolMutation) Tx

func (m SymbolMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SymbolMutation) Type

func (m *SymbolMutation) Type() string

Type returns the node type of this mutation (Symbol).

func (*SymbolMutation) UpdatedAt

func (m *SymbolMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SymbolMutation) Where

func (m *SymbolMutation) Where(ps ...predicate.Symbol)

Where appends a list predicates to the SymbolMutation builder.

func (*SymbolMutation) WhereP

func (m *SymbolMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SymbolMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SymbolQuery

type SymbolQuery struct {
	// contains filtered or unexported fields
}

SymbolQuery is the builder for querying Symbol entities.

func (*SymbolQuery) Aggregate

func (sq *SymbolQuery) Aggregate(fns ...AggregateFunc) *SymbolSelect

Aggregate returns a SymbolSelect configured with the given aggregations.

func (*SymbolQuery) All

func (sq *SymbolQuery) All(ctx context.Context) ([]*Symbol, error)

All executes the query and returns a list of Symbols.

func (*SymbolQuery) AllX

func (sq *SymbolQuery) AllX(ctx context.Context) []*Symbol

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

func (*SymbolQuery) Clone

func (sq *SymbolQuery) Clone() *SymbolQuery

Clone returns a duplicate of the SymbolQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SymbolQuery) Count

func (sq *SymbolQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SymbolQuery) CountX

func (sq *SymbolQuery) CountX(ctx context.Context) int

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

func (*SymbolQuery) Exist

func (sq *SymbolQuery) Exist(ctx context.Context) (bool, error)

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

func (*SymbolQuery) ExistX

func (sq *SymbolQuery) ExistX(ctx context.Context) bool

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

func (*SymbolQuery) First

func (sq *SymbolQuery) First(ctx context.Context) (*Symbol, error)

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

func (*SymbolQuery) FirstID

func (sq *SymbolQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*SymbolQuery) FirstIDX

func (sq *SymbolQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*SymbolQuery) FirstX

func (sq *SymbolQuery) FirstX(ctx context.Context) *Symbol

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

func (*SymbolQuery) GroupBy

func (sq *SymbolQuery) GroupBy(field string, fields ...string) *SymbolGroupBy

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 {
	Exchange string `json:"exchange,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Symbol.Query().
	GroupBy(symbol.FieldExchange).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SymbolQuery) IDs

func (sq *SymbolQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*SymbolQuery) IDsX

func (sq *SymbolQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*SymbolQuery) Limit

func (sq *SymbolQuery) Limit(limit int) *SymbolQuery

Limit the number of records to be returned by this query.

func (*SymbolQuery) Offset

func (sq *SymbolQuery) Offset(offset int) *SymbolQuery

Offset to start from.

func (*SymbolQuery) Only

func (sq *SymbolQuery) Only(ctx context.Context) (*Symbol, error)

Only returns a single Symbol entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Symbol entity is found. Returns a *NotFoundError when no Symbol entities are found.

func (*SymbolQuery) OnlyID

func (sq *SymbolQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Symbol ID in the query. Returns a *NotSingularError when more than one Symbol ID is found. Returns a *NotFoundError when no entities are found.

func (*SymbolQuery) OnlyIDX

func (sq *SymbolQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*SymbolQuery) OnlyX

func (sq *SymbolQuery) OnlyX(ctx context.Context) *Symbol

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

func (*SymbolQuery) Order

func (sq *SymbolQuery) Order(o ...symbol.OrderOption) *SymbolQuery

Order specifies how the records should be ordered.

func (*SymbolQuery) QueryCandles

func (sq *SymbolQuery) QueryCandles() *CandleQuery

QueryCandles chains the current query on the "candles" edge.

func (*SymbolQuery) QuerySessions

func (sq *SymbolQuery) QuerySessions() *ActiveSessionQuery

QuerySessions chains the current query on the "sessions" edge.

func (*SymbolQuery) QueryStudySessions

func (sq *SymbolQuery) QueryStudySessions() *StudySessionQuery

QueryStudySessions chains the current query on the "study_sessions" edge.

func (*SymbolQuery) Select

func (sq *SymbolQuery) Select(fields ...string) *SymbolSelect

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 {
	Exchange string `json:"exchange,omitempty"`
}

client.Symbol.Query().
	Select(symbol.FieldExchange).
	Scan(ctx, &v)

func (*SymbolQuery) Unique

func (sq *SymbolQuery) Unique(unique bool) *SymbolQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SymbolQuery) Where

func (sq *SymbolQuery) Where(ps ...predicate.Symbol) *SymbolQuery

Where adds a new predicate for the SymbolQuery builder.

func (*SymbolQuery) WithCandles

func (sq *SymbolQuery) WithCandles(opts ...func(*CandleQuery)) *SymbolQuery

WithCandles tells the query-builder to eager-load the nodes that are connected to the "candles" edge. The optional arguments are used to configure the query builder of the edge.

func (*SymbolQuery) WithSessions

func (sq *SymbolQuery) WithSessions(opts ...func(*ActiveSessionQuery)) *SymbolQuery

WithSessions tells the query-builder to eager-load the nodes that are connected to the "sessions" edge. The optional arguments are used to configure the query builder of the edge.

func (*SymbolQuery) WithStudySessions

func (sq *SymbolQuery) WithStudySessions(opts ...func(*StudySessionQuery)) *SymbolQuery

WithStudySessions tells the query-builder to eager-load the nodes that are connected to the "study_sessions" edge. The optional arguments are used to configure the query builder of the edge.

type SymbolSelect

type SymbolSelect struct {
	*SymbolQuery
	// contains filtered or unexported fields
}

SymbolSelect is the builder for selecting fields of Symbol entities.

func (*SymbolSelect) Aggregate

func (ss *SymbolSelect) Aggregate(fns ...AggregateFunc) *SymbolSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SymbolSelect) Bool

func (s *SymbolSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) BoolX

func (s *SymbolSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SymbolSelect) Bools

func (s *SymbolSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) BoolsX

func (s *SymbolSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SymbolSelect) Float64

func (s *SymbolSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) Float64X

func (s *SymbolSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SymbolSelect) Float64s

func (s *SymbolSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) Float64sX

func (s *SymbolSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SymbolSelect) Int

func (s *SymbolSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) IntX

func (s *SymbolSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SymbolSelect) Ints

func (s *SymbolSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) IntsX

func (s *SymbolSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SymbolSelect) Scan

func (ss *SymbolSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SymbolSelect) ScanX

func (s *SymbolSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SymbolSelect) String

func (s *SymbolSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SymbolSelect) StringX

func (s *SymbolSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SymbolSelect) Strings

func (s *SymbolSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SymbolSelect) StringsX

func (s *SymbolSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SymbolUpdate

type SymbolUpdate struct {
	// contains filtered or unexported fields
}

SymbolUpdate is the builder for updating Symbol entities.

func (*SymbolUpdate) AddCandleIDs

func (su *SymbolUpdate) AddCandleIDs(ids ...uuid.UUID) *SymbolUpdate

AddCandleIDs adds the "candles" edge to the Candle entity by IDs.

func (*SymbolUpdate) AddCandles

func (su *SymbolUpdate) AddCandles(c ...*Candle) *SymbolUpdate

AddCandles adds the "candles" edges to the Candle entity.

func (*SymbolUpdate) AddMarketCap

func (su *SymbolUpdate) AddMarketCap(f float64) *SymbolUpdate

AddMarketCap adds f to the "market_cap" field.

func (*SymbolUpdate) AddSessionIDs

func (su *SymbolUpdate) AddSessionIDs(ids ...uuid.UUID) *SymbolUpdate

AddSessionIDs adds the "sessions" edge to the ActiveSession entity by IDs.

func (*SymbolUpdate) AddSessions

func (su *SymbolUpdate) AddSessions(a ...*ActiveSession) *SymbolUpdate

AddSessions adds the "sessions" edges to the ActiveSession entity.

func (*SymbolUpdate) AddSharesOutstanding

func (su *SymbolUpdate) AddSharesOutstanding(i int64) *SymbolUpdate

AddSharesOutstanding adds i to the "shares_outstanding" field.

func (*SymbolUpdate) AddStudySessionIDs

func (su *SymbolUpdate) AddStudySessionIDs(ids ...uuid.UUID) *SymbolUpdate

AddStudySessionIDs adds the "study_sessions" edge to the StudySession entity by IDs.

func (*SymbolUpdate) AddStudySessions

func (su *SymbolUpdate) AddStudySessions(s ...*StudySession) *SymbolUpdate

AddStudySessions adds the "study_sessions" edges to the StudySession entity.

func (*SymbolUpdate) ClearCandles

func (su *SymbolUpdate) ClearCandles() *SymbolUpdate

ClearCandles clears all "candles" edges to the Candle entity.

func (*SymbolUpdate) ClearDescription

func (su *SymbolUpdate) ClearDescription() *SymbolUpdate

ClearDescription clears the value of the "description" field.

func (*SymbolUpdate) ClearIndustry

func (su *SymbolUpdate) ClearIndustry() *SymbolUpdate

ClearIndustry clears the value of the "industry" field.

func (*SymbolUpdate) ClearMarketCap

func (su *SymbolUpdate) ClearMarketCap() *SymbolUpdate

ClearMarketCap clears the value of the "market_cap" field.

func (*SymbolUpdate) ClearMetadata

func (su *SymbolUpdate) ClearMetadata() *SymbolUpdate

ClearMetadata clears the value of the "metadata" field.

func (*SymbolUpdate) ClearName

func (su *SymbolUpdate) ClearName() *SymbolUpdate

ClearName clears the value of the "name" field.

func (*SymbolUpdate) ClearSector

func (su *SymbolUpdate) ClearSector() *SymbolUpdate

ClearSector clears the value of the "sector" field.

func (*SymbolUpdate) ClearSessions

func (su *SymbolUpdate) ClearSessions() *SymbolUpdate

ClearSessions clears all "sessions" edges to the ActiveSession entity.

func (*SymbolUpdate) ClearSharesOutstanding

func (su *SymbolUpdate) ClearSharesOutstanding() *SymbolUpdate

ClearSharesOutstanding clears the value of the "shares_outstanding" field.

func (*SymbolUpdate) ClearStudySessions

func (su *SymbolUpdate) ClearStudySessions() *SymbolUpdate

ClearStudySessions clears all "study_sessions" edges to the StudySession entity.

func (*SymbolUpdate) Exec

func (su *SymbolUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SymbolUpdate) ExecX

func (su *SymbolUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SymbolUpdate) Mutation

func (su *SymbolUpdate) Mutation() *SymbolMutation

Mutation returns the SymbolMutation object of the builder.

func (*SymbolUpdate) RemoveCandleIDs

func (su *SymbolUpdate) RemoveCandleIDs(ids ...uuid.UUID) *SymbolUpdate

RemoveCandleIDs removes the "candles" edge to Candle entities by IDs.

func (*SymbolUpdate) RemoveCandles

func (su *SymbolUpdate) RemoveCandles(c ...*Candle) *SymbolUpdate

RemoveCandles removes "candles" edges to Candle entities.

func (*SymbolUpdate) RemoveSessionIDs

func (su *SymbolUpdate) RemoveSessionIDs(ids ...uuid.UUID) *SymbolUpdate

RemoveSessionIDs removes the "sessions" edge to ActiveSession entities by IDs.

func (*SymbolUpdate) RemoveSessions

func (su *SymbolUpdate) RemoveSessions(a ...*ActiveSession) *SymbolUpdate

RemoveSessions removes "sessions" edges to ActiveSession entities.

func (*SymbolUpdate) RemoveStudySessionIDs

func (su *SymbolUpdate) RemoveStudySessionIDs(ids ...uuid.UUID) *SymbolUpdate

RemoveStudySessionIDs removes the "study_sessions" edge to StudySession entities by IDs.

func (*SymbolUpdate) RemoveStudySessions

func (su *SymbolUpdate) RemoveStudySessions(s ...*StudySession) *SymbolUpdate

RemoveStudySessions removes "study_sessions" edges to StudySession entities.

func (*SymbolUpdate) Save

func (su *SymbolUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SymbolUpdate) SaveX

func (su *SymbolUpdate) SaveX(ctx context.Context) int

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

func (*SymbolUpdate) SetCurrency

func (su *SymbolUpdate) SetCurrency(s string) *SymbolUpdate

SetCurrency sets the "currency" field.

func (*SymbolUpdate) SetDescription

func (su *SymbolUpdate) SetDescription(s string) *SymbolUpdate

SetDescription sets the "description" field.

func (*SymbolUpdate) SetExchange

func (su *SymbolUpdate) SetExchange(s string) *SymbolUpdate

SetExchange sets the "exchange" field.

func (*SymbolUpdate) SetFullSymbol

func (su *SymbolUpdate) SetFullSymbol(s string) *SymbolUpdate

SetFullSymbol sets the "full_symbol" field.

func (*SymbolUpdate) SetIndustry

func (su *SymbolUpdate) SetIndustry(s string) *SymbolUpdate

SetIndustry sets the "industry" field.

func (*SymbolUpdate) SetIsActive

func (su *SymbolUpdate) SetIsActive(b bool) *SymbolUpdate

SetIsActive sets the "is_active" field.

func (*SymbolUpdate) SetIsTradable

func (su *SymbolUpdate) SetIsTradable(b bool) *SymbolUpdate

SetIsTradable sets the "is_tradable" field.

func (*SymbolUpdate) SetMarketCap

func (su *SymbolUpdate) SetMarketCap(f float64) *SymbolUpdate

SetMarketCap sets the "market_cap" field.

func (*SymbolUpdate) SetMetadata

func (su *SymbolUpdate) SetMetadata(m map[string]interface{}) *SymbolUpdate

SetMetadata sets the "metadata" field.

func (*SymbolUpdate) SetName

func (su *SymbolUpdate) SetName(s string) *SymbolUpdate

SetName sets the "name" field.

func (*SymbolUpdate) SetNillableCurrency

func (su *SymbolUpdate) SetNillableCurrency(s *string) *SymbolUpdate

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*SymbolUpdate) SetNillableDescription

func (su *SymbolUpdate) SetNillableDescription(s *string) *SymbolUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SymbolUpdate) SetNillableExchange

func (su *SymbolUpdate) SetNillableExchange(s *string) *SymbolUpdate

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*SymbolUpdate) SetNillableFullSymbol

func (su *SymbolUpdate) SetNillableFullSymbol(s *string) *SymbolUpdate

SetNillableFullSymbol sets the "full_symbol" field if the given value is not nil.

func (*SymbolUpdate) SetNillableIndustry

func (su *SymbolUpdate) SetNillableIndustry(s *string) *SymbolUpdate

SetNillableIndustry sets the "industry" field if the given value is not nil.

func (*SymbolUpdate) SetNillableIsActive

func (su *SymbolUpdate) SetNillableIsActive(b *bool) *SymbolUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SymbolUpdate) SetNillableIsTradable

func (su *SymbolUpdate) SetNillableIsTradable(b *bool) *SymbolUpdate

SetNillableIsTradable sets the "is_tradable" field if the given value is not nil.

func (*SymbolUpdate) SetNillableMarketCap

func (su *SymbolUpdate) SetNillableMarketCap(f *float64) *SymbolUpdate

SetNillableMarketCap sets the "market_cap" field if the given value is not nil.

func (*SymbolUpdate) SetNillableName

func (su *SymbolUpdate) SetNillableName(s *string) *SymbolUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*SymbolUpdate) SetNillableSector

func (su *SymbolUpdate) SetNillableSector(s *string) *SymbolUpdate

SetNillableSector sets the "sector" field if the given value is not nil.

func (*SymbolUpdate) SetNillableSharesOutstanding

func (su *SymbolUpdate) SetNillableSharesOutstanding(i *int64) *SymbolUpdate

SetNillableSharesOutstanding sets the "shares_outstanding" field if the given value is not nil.

func (*SymbolUpdate) SetNillableSymbol

func (su *SymbolUpdate) SetNillableSymbol(s *string) *SymbolUpdate

SetNillableSymbol sets the "symbol" field if the given value is not nil.

func (*SymbolUpdate) SetNillableType

func (su *SymbolUpdate) SetNillableType(s *symbol.Type) *SymbolUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*SymbolUpdate) SetSector

func (su *SymbolUpdate) SetSector(s string) *SymbolUpdate

SetSector sets the "sector" field.

func (*SymbolUpdate) SetSharesOutstanding

func (su *SymbolUpdate) SetSharesOutstanding(i int64) *SymbolUpdate

SetSharesOutstanding sets the "shares_outstanding" field.

func (*SymbolUpdate) SetSymbol

func (su *SymbolUpdate) SetSymbol(s string) *SymbolUpdate

SetSymbol sets the "symbol" field.

func (*SymbolUpdate) SetType

func (su *SymbolUpdate) SetType(s symbol.Type) *SymbolUpdate

SetType sets the "type" field.

func (*SymbolUpdate) SetUpdatedAt

func (su *SymbolUpdate) SetUpdatedAt(t time.Time) *SymbolUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SymbolUpdate) Where

func (su *SymbolUpdate) Where(ps ...predicate.Symbol) *SymbolUpdate

Where appends a list predicates to the SymbolUpdate builder.

type SymbolUpdateOne

type SymbolUpdateOne struct {
	// contains filtered or unexported fields
}

SymbolUpdateOne is the builder for updating a single Symbol entity.

func (*SymbolUpdateOne) AddCandleIDs

func (suo *SymbolUpdateOne) AddCandleIDs(ids ...uuid.UUID) *SymbolUpdateOne

AddCandleIDs adds the "candles" edge to the Candle entity by IDs.

func (*SymbolUpdateOne) AddCandles

func (suo *SymbolUpdateOne) AddCandles(c ...*Candle) *SymbolUpdateOne

AddCandles adds the "candles" edges to the Candle entity.

func (*SymbolUpdateOne) AddMarketCap

func (suo *SymbolUpdateOne) AddMarketCap(f float64) *SymbolUpdateOne

AddMarketCap adds f to the "market_cap" field.

func (*SymbolUpdateOne) AddSessionIDs

func (suo *SymbolUpdateOne) AddSessionIDs(ids ...uuid.UUID) *SymbolUpdateOne

AddSessionIDs adds the "sessions" edge to the ActiveSession entity by IDs.

func (*SymbolUpdateOne) AddSessions

func (suo *SymbolUpdateOne) AddSessions(a ...*ActiveSession) *SymbolUpdateOne

AddSessions adds the "sessions" edges to the ActiveSession entity.

func (*SymbolUpdateOne) AddSharesOutstanding

func (suo *SymbolUpdateOne) AddSharesOutstanding(i int64) *SymbolUpdateOne

AddSharesOutstanding adds i to the "shares_outstanding" field.

func (*SymbolUpdateOne) AddStudySessionIDs

func (suo *SymbolUpdateOne) AddStudySessionIDs(ids ...uuid.UUID) *SymbolUpdateOne

AddStudySessionIDs adds the "study_sessions" edge to the StudySession entity by IDs.

func (*SymbolUpdateOne) AddStudySessions

func (suo *SymbolUpdateOne) AddStudySessions(s ...*StudySession) *SymbolUpdateOne

AddStudySessions adds the "study_sessions" edges to the StudySession entity.

func (*SymbolUpdateOne) ClearCandles

func (suo *SymbolUpdateOne) ClearCandles() *SymbolUpdateOne

ClearCandles clears all "candles" edges to the Candle entity.

func (*SymbolUpdateOne) ClearDescription

func (suo *SymbolUpdateOne) ClearDescription() *SymbolUpdateOne

ClearDescription clears the value of the "description" field.

func (*SymbolUpdateOne) ClearIndustry

func (suo *SymbolUpdateOne) ClearIndustry() *SymbolUpdateOne

ClearIndustry clears the value of the "industry" field.

func (*SymbolUpdateOne) ClearMarketCap

func (suo *SymbolUpdateOne) ClearMarketCap() *SymbolUpdateOne

ClearMarketCap clears the value of the "market_cap" field.

func (*SymbolUpdateOne) ClearMetadata

func (suo *SymbolUpdateOne) ClearMetadata() *SymbolUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*SymbolUpdateOne) ClearName

func (suo *SymbolUpdateOne) ClearName() *SymbolUpdateOne

ClearName clears the value of the "name" field.

func (*SymbolUpdateOne) ClearSector

func (suo *SymbolUpdateOne) ClearSector() *SymbolUpdateOne

ClearSector clears the value of the "sector" field.

func (*SymbolUpdateOne) ClearSessions

func (suo *SymbolUpdateOne) ClearSessions() *SymbolUpdateOne

ClearSessions clears all "sessions" edges to the ActiveSession entity.

func (*SymbolUpdateOne) ClearSharesOutstanding

func (suo *SymbolUpdateOne) ClearSharesOutstanding() *SymbolUpdateOne

ClearSharesOutstanding clears the value of the "shares_outstanding" field.

func (*SymbolUpdateOne) ClearStudySessions

func (suo *SymbolUpdateOne) ClearStudySessions() *SymbolUpdateOne

ClearStudySessions clears all "study_sessions" edges to the StudySession entity.

func (*SymbolUpdateOne) Exec

func (suo *SymbolUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SymbolUpdateOne) ExecX

func (suo *SymbolUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SymbolUpdateOne) Mutation

func (suo *SymbolUpdateOne) Mutation() *SymbolMutation

Mutation returns the SymbolMutation object of the builder.

func (*SymbolUpdateOne) RemoveCandleIDs

func (suo *SymbolUpdateOne) RemoveCandleIDs(ids ...uuid.UUID) *SymbolUpdateOne

RemoveCandleIDs removes the "candles" edge to Candle entities by IDs.

func (*SymbolUpdateOne) RemoveCandles

func (suo *SymbolUpdateOne) RemoveCandles(c ...*Candle) *SymbolUpdateOne

RemoveCandles removes "candles" edges to Candle entities.

func (*SymbolUpdateOne) RemoveSessionIDs

func (suo *SymbolUpdateOne) RemoveSessionIDs(ids ...uuid.UUID) *SymbolUpdateOne

RemoveSessionIDs removes the "sessions" edge to ActiveSession entities by IDs.

func (*SymbolUpdateOne) RemoveSessions

func (suo *SymbolUpdateOne) RemoveSessions(a ...*ActiveSession) *SymbolUpdateOne

RemoveSessions removes "sessions" edges to ActiveSession entities.

func (*SymbolUpdateOne) RemoveStudySessionIDs

func (suo *SymbolUpdateOne) RemoveStudySessionIDs(ids ...uuid.UUID) *SymbolUpdateOne

RemoveStudySessionIDs removes the "study_sessions" edge to StudySession entities by IDs.

func (*SymbolUpdateOne) RemoveStudySessions

func (suo *SymbolUpdateOne) RemoveStudySessions(s ...*StudySession) *SymbolUpdateOne

RemoveStudySessions removes "study_sessions" edges to StudySession entities.

func (*SymbolUpdateOne) Save

func (suo *SymbolUpdateOne) Save(ctx context.Context) (*Symbol, error)

Save executes the query and returns the updated Symbol entity.

func (*SymbolUpdateOne) SaveX

func (suo *SymbolUpdateOne) SaveX(ctx context.Context) *Symbol

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

func (*SymbolUpdateOne) Select

func (suo *SymbolUpdateOne) Select(field string, fields ...string) *SymbolUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SymbolUpdateOne) SetCurrency

func (suo *SymbolUpdateOne) SetCurrency(s string) *SymbolUpdateOne

SetCurrency sets the "currency" field.

func (*SymbolUpdateOne) SetDescription

func (suo *SymbolUpdateOne) SetDescription(s string) *SymbolUpdateOne

SetDescription sets the "description" field.

func (*SymbolUpdateOne) SetExchange

func (suo *SymbolUpdateOne) SetExchange(s string) *SymbolUpdateOne

SetExchange sets the "exchange" field.

func (*SymbolUpdateOne) SetFullSymbol

func (suo *SymbolUpdateOne) SetFullSymbol(s string) *SymbolUpdateOne

SetFullSymbol sets the "full_symbol" field.

func (*SymbolUpdateOne) SetIndustry

func (suo *SymbolUpdateOne) SetIndustry(s string) *SymbolUpdateOne

SetIndustry sets the "industry" field.

func (*SymbolUpdateOne) SetIsActive

func (suo *SymbolUpdateOne) SetIsActive(b bool) *SymbolUpdateOne

SetIsActive sets the "is_active" field.

func (*SymbolUpdateOne) SetIsTradable

func (suo *SymbolUpdateOne) SetIsTradable(b bool) *SymbolUpdateOne

SetIsTradable sets the "is_tradable" field.

func (*SymbolUpdateOne) SetMarketCap

func (suo *SymbolUpdateOne) SetMarketCap(f float64) *SymbolUpdateOne

SetMarketCap sets the "market_cap" field.

func (*SymbolUpdateOne) SetMetadata

func (suo *SymbolUpdateOne) SetMetadata(m map[string]interface{}) *SymbolUpdateOne

SetMetadata sets the "metadata" field.

func (*SymbolUpdateOne) SetName

func (suo *SymbolUpdateOne) SetName(s string) *SymbolUpdateOne

SetName sets the "name" field.

func (*SymbolUpdateOne) SetNillableCurrency

func (suo *SymbolUpdateOne) SetNillableCurrency(s *string) *SymbolUpdateOne

SetNillableCurrency sets the "currency" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableDescription

func (suo *SymbolUpdateOne) SetNillableDescription(s *string) *SymbolUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableExchange

func (suo *SymbolUpdateOne) SetNillableExchange(s *string) *SymbolUpdateOne

SetNillableExchange sets the "exchange" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableFullSymbol

func (suo *SymbolUpdateOne) SetNillableFullSymbol(s *string) *SymbolUpdateOne

SetNillableFullSymbol sets the "full_symbol" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableIndustry

func (suo *SymbolUpdateOne) SetNillableIndustry(s *string) *SymbolUpdateOne

SetNillableIndustry sets the "industry" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableIsActive

func (suo *SymbolUpdateOne) SetNillableIsActive(b *bool) *SymbolUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableIsTradable

func (suo *SymbolUpdateOne) SetNillableIsTradable(b *bool) *SymbolUpdateOne

SetNillableIsTradable sets the "is_tradable" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableMarketCap

func (suo *SymbolUpdateOne) SetNillableMarketCap(f *float64) *SymbolUpdateOne

SetNillableMarketCap sets the "market_cap" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableName

func (suo *SymbolUpdateOne) SetNillableName(s *string) *SymbolUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableSector

func (suo *SymbolUpdateOne) SetNillableSector(s *string) *SymbolUpdateOne

SetNillableSector sets the "sector" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableSharesOutstanding

func (suo *SymbolUpdateOne) SetNillableSharesOutstanding(i *int64) *SymbolUpdateOne

SetNillableSharesOutstanding sets the "shares_outstanding" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableSymbol

func (suo *SymbolUpdateOne) SetNillableSymbol(s *string) *SymbolUpdateOne

SetNillableSymbol sets the "symbol" field if the given value is not nil.

func (*SymbolUpdateOne) SetNillableType

func (suo *SymbolUpdateOne) SetNillableType(s *symbol.Type) *SymbolUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*SymbolUpdateOne) SetSector

func (suo *SymbolUpdateOne) SetSector(s string) *SymbolUpdateOne

SetSector sets the "sector" field.

func (*SymbolUpdateOne) SetSharesOutstanding

func (suo *SymbolUpdateOne) SetSharesOutstanding(i int64) *SymbolUpdateOne

SetSharesOutstanding sets the "shares_outstanding" field.

func (*SymbolUpdateOne) SetSymbol

func (suo *SymbolUpdateOne) SetSymbol(s string) *SymbolUpdateOne

SetSymbol sets the "symbol" field.

func (*SymbolUpdateOne) SetType

func (suo *SymbolUpdateOne) SetType(s symbol.Type) *SymbolUpdateOne

SetType sets the "type" field.

func (*SymbolUpdateOne) SetUpdatedAt

func (suo *SymbolUpdateOne) SetUpdatedAt(t time.Time) *SymbolUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SymbolUpdateOne) Where

func (suo *SymbolUpdateOne) Where(ps ...predicate.Symbol) *SymbolUpdateOne

Where appends a list predicates to the SymbolUpdate builder.

type Symbols

type Symbols []*Symbol

Symbols is a parsable slice of Symbol.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

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

type Traverser

type Traverser = ent.Traverser

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

type Tx

type Tx struct {

	// ActiveSession is the client for interacting with the ActiveSession builders.
	ActiveSession *ActiveSessionClient
	// Candle is the client for interacting with the Candle builders.
	Candle *CandleClient
	// Indicator is the client for interacting with the Indicator builders.
	Indicator *IndicatorClient
	// IndicatorData is the client for interacting with the IndicatorData builders.
	IndicatorData *IndicatorDataClient
	// StudySession is the client for interacting with the StudySession builders.
	StudySession *StudySessionClient
	// Symbol is the client for interacting with the Symbol builders.
	Symbol *SymbolClient
	// 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 ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type 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