Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type ActiveSession
- type ActiveSessionClient
- func (c *ActiveSessionClient) Create() *ActiveSessionCreate
- func (c *ActiveSessionClient) CreateBulk(builders ...*ActiveSessionCreate) *ActiveSessionCreateBulk
- func (c *ActiveSessionClient) Delete() *ActiveSessionDelete
- func (c *ActiveSessionClient) DeleteOne(as *ActiveSession) *ActiveSessionDeleteOne
- func (c *ActiveSessionClient) DeleteOneID(id uuid.UUID) *ActiveSessionDeleteOne
- func (c *ActiveSessionClient) Get(ctx context.Context, id uuid.UUID) (*ActiveSession, error)
- func (c *ActiveSessionClient) GetX(ctx context.Context, id uuid.UUID) *ActiveSession
- func (c *ActiveSessionClient) Hooks() []Hook
- func (c *ActiveSessionClient) Intercept(interceptors ...Interceptor)
- func (c *ActiveSessionClient) Interceptors() []Interceptor
- func (c *ActiveSessionClient) MapCreateBulk(slice any, setFunc func(*ActiveSessionCreate, int)) *ActiveSessionCreateBulk
- func (c *ActiveSessionClient) Query() *ActiveSessionQuery
- func (c *ActiveSessionClient) Update() *ActiveSessionUpdate
- func (c *ActiveSessionClient) UpdateOne(as *ActiveSession) *ActiveSessionUpdateOne
- func (c *ActiveSessionClient) UpdateOneID(id uuid.UUID) *ActiveSessionUpdateOne
- func (c *ActiveSessionClient) Use(hooks ...Hook)
- type ActiveSessionCreate
- func (asc *ActiveSessionCreate) Exec(ctx context.Context) error
- func (asc *ActiveSessionCreate) ExecX(ctx context.Context)
- func (asc *ActiveSessionCreate) Mutation() *ActiveSessionMutation
- func (asc *ActiveSessionCreate) Save(ctx context.Context) (*ActiveSession, error)
- func (asc *ActiveSessionCreate) SaveX(ctx context.Context) *ActiveSession
- func (asc *ActiveSessionCreate) SetCreatedAt(t time.Time) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetEnabled(b bool) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetExchange(s string) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetID(u uuid.UUID) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableCreatedAt(t *time.Time) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableEnabled(b *bool) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableID(u *uuid.UUID) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableType(a *activesession.Type) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetNillableUpdatedAt(t *time.Time) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetSessionID(s string) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetSymbol(s string) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetTimeframe(a activesession.Timeframe) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetType(a activesession.Type) *ActiveSessionCreate
- func (asc *ActiveSessionCreate) SetUpdatedAt(t time.Time) *ActiveSessionCreate
- type ActiveSessionCreateBulk
- func (ascb *ActiveSessionCreateBulk) Exec(ctx context.Context) error
- func (ascb *ActiveSessionCreateBulk) ExecX(ctx context.Context)
- func (ascb *ActiveSessionCreateBulk) Save(ctx context.Context) ([]*ActiveSession, error)
- func (ascb *ActiveSessionCreateBulk) SaveX(ctx context.Context) []*ActiveSession
- type ActiveSessionDelete
- type ActiveSessionDeleteOne
- type ActiveSessionGroupBy
- func (asgb *ActiveSessionGroupBy) Aggregate(fns ...AggregateFunc) *ActiveSessionGroupBy
- func (s *ActiveSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActiveSessionGroupBy) BoolX(ctx context.Context) bool
- func (s *ActiveSessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ActiveSessionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ActiveSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActiveSessionGroupBy) Float64X(ctx context.Context) float64
- func (s *ActiveSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActiveSessionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ActiveSessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ActiveSessionGroupBy) IntX(ctx context.Context) int
- func (s *ActiveSessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ActiveSessionGroupBy) IntsX(ctx context.Context) []int
- func (asgb *ActiveSessionGroupBy) Scan(ctx context.Context, v any) error
- func (s *ActiveSessionGroupBy) ScanX(ctx context.Context, v any)
- func (s *ActiveSessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ActiveSessionGroupBy) StringX(ctx context.Context) string
- func (s *ActiveSessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ActiveSessionGroupBy) StringsX(ctx context.Context) []string
- type ActiveSessionMutation
- func (m *ActiveSessionMutation) AddField(name string, value ent.Value) error
- func (m *ActiveSessionMutation) AddedEdges() []string
- func (m *ActiveSessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ActiveSessionMutation) AddedFields() []string
- func (m *ActiveSessionMutation) AddedIDs(name string) []ent.Value
- func (m *ActiveSessionMutation) ClearEdge(name string) error
- func (m *ActiveSessionMutation) ClearField(name string) error
- func (m *ActiveSessionMutation) ClearTimeframe()
- func (m *ActiveSessionMutation) ClearedEdges() []string
- func (m *ActiveSessionMutation) ClearedFields() []string
- func (m ActiveSessionMutation) Client() *Client
- func (m *ActiveSessionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ActiveSessionMutation) EdgeCleared(name string) bool
- func (m *ActiveSessionMutation) Enabled() (r bool, exists bool)
- func (m *ActiveSessionMutation) Exchange() (r string, exists bool)
- func (m *ActiveSessionMutation) Field(name string) (ent.Value, bool)
- func (m *ActiveSessionMutation) FieldCleared(name string) bool
- func (m *ActiveSessionMutation) Fields() []string
- func (m *ActiveSessionMutation) GetType() (r activesession.Type, exists bool)
- func (m *ActiveSessionMutation) ID() (id uuid.UUID, exists bool)
- func (m *ActiveSessionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ActiveSessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ActiveSessionMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *ActiveSessionMutation) OldExchange(ctx context.Context) (v string, err error)
- func (m *ActiveSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ActiveSessionMutation) OldSessionID(ctx context.Context) (v string, err error)
- func (m *ActiveSessionMutation) OldSymbol(ctx context.Context) (v string, err error)
- func (m *ActiveSessionMutation) OldTimeframe(ctx context.Context) (v *activesession.Timeframe, err error)
- func (m *ActiveSessionMutation) OldType(ctx context.Context) (v activesession.Type, err error)
- func (m *ActiveSessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ActiveSessionMutation) Op() Op
- func (m *ActiveSessionMutation) RemovedEdges() []string
- func (m *ActiveSessionMutation) RemovedIDs(name string) []ent.Value
- func (m *ActiveSessionMutation) ResetCreatedAt()
- func (m *ActiveSessionMutation) ResetEdge(name string) error
- func (m *ActiveSessionMutation) ResetEnabled()
- func (m *ActiveSessionMutation) ResetExchange()
- func (m *ActiveSessionMutation) ResetField(name string) error
- func (m *ActiveSessionMutation) ResetSessionID()
- func (m *ActiveSessionMutation) ResetSymbol()
- func (m *ActiveSessionMutation) ResetTimeframe()
- func (m *ActiveSessionMutation) ResetType()
- func (m *ActiveSessionMutation) ResetUpdatedAt()
- func (m *ActiveSessionMutation) SessionID() (r string, exists bool)
- func (m *ActiveSessionMutation) SetCreatedAt(t time.Time)
- func (m *ActiveSessionMutation) SetEnabled(b bool)
- func (m *ActiveSessionMutation) SetExchange(s string)
- func (m *ActiveSessionMutation) SetField(name string, value ent.Value) error
- func (m *ActiveSessionMutation) SetID(id uuid.UUID)
- func (m *ActiveSessionMutation) SetOp(op Op)
- func (m *ActiveSessionMutation) SetSessionID(s string)
- func (m *ActiveSessionMutation) SetSymbol(s string)
- func (m *ActiveSessionMutation) SetTimeframe(a activesession.Timeframe)
- func (m *ActiveSessionMutation) SetType(a activesession.Type)
- func (m *ActiveSessionMutation) SetUpdatedAt(t time.Time)
- func (m *ActiveSessionMutation) Symbol() (r string, exists bool)
- func (m *ActiveSessionMutation) Timeframe() (r activesession.Timeframe, exists bool)
- func (m *ActiveSessionMutation) TimeframeCleared() bool
- func (m ActiveSessionMutation) Tx() (*Tx, error)
- func (m *ActiveSessionMutation) Type() string
- func (m *ActiveSessionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ActiveSessionMutation) Where(ps ...predicate.ActiveSession)
- func (m *ActiveSessionMutation) WhereP(ps ...func(*sql.Selector))
- type ActiveSessionQuery
- func (asq *ActiveSessionQuery) Aggregate(fns ...AggregateFunc) *ActiveSessionSelect
- func (asq *ActiveSessionQuery) All(ctx context.Context) ([]*ActiveSession, error)
- func (asq *ActiveSessionQuery) AllX(ctx context.Context) []*ActiveSession
- func (asq *ActiveSessionQuery) Clone() *ActiveSessionQuery
- func (asq *ActiveSessionQuery) Count(ctx context.Context) (int, error)
- func (asq *ActiveSessionQuery) CountX(ctx context.Context) int
- func (asq *ActiveSessionQuery) Exist(ctx context.Context) (bool, error)
- func (asq *ActiveSessionQuery) ExistX(ctx context.Context) bool
- func (asq *ActiveSessionQuery) First(ctx context.Context) (*ActiveSession, error)
- func (asq *ActiveSessionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (asq *ActiveSessionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (asq *ActiveSessionQuery) FirstX(ctx context.Context) *ActiveSession
- func (asq *ActiveSessionQuery) GroupBy(field string, fields ...string) *ActiveSessionGroupBy
- func (asq *ActiveSessionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (asq *ActiveSessionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (asq *ActiveSessionQuery) Limit(limit int) *ActiveSessionQuery
- func (asq *ActiveSessionQuery) Offset(offset int) *ActiveSessionQuery
- func (asq *ActiveSessionQuery) Only(ctx context.Context) (*ActiveSession, error)
- func (asq *ActiveSessionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (asq *ActiveSessionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (asq *ActiveSessionQuery) OnlyX(ctx context.Context) *ActiveSession
- func (asq *ActiveSessionQuery) Order(o ...activesession.OrderOption) *ActiveSessionQuery
- func (asq *ActiveSessionQuery) Select(fields ...string) *ActiveSessionSelect
- func (asq *ActiveSessionQuery) Unique(unique bool) *ActiveSessionQuery
- func (asq *ActiveSessionQuery) Where(ps ...predicate.ActiveSession) *ActiveSessionQuery
- type ActiveSessionSelect
- func (ass *ActiveSessionSelect) Aggregate(fns ...AggregateFunc) *ActiveSessionSelect
- func (s *ActiveSessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActiveSessionSelect) BoolX(ctx context.Context) bool
- func (s *ActiveSessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ActiveSessionSelect) BoolsX(ctx context.Context) []bool
- func (s *ActiveSessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActiveSessionSelect) Float64X(ctx context.Context) float64
- func (s *ActiveSessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActiveSessionSelect) Float64sX(ctx context.Context) []float64
- func (s *ActiveSessionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ActiveSessionSelect) IntX(ctx context.Context) int
- func (s *ActiveSessionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ActiveSessionSelect) IntsX(ctx context.Context) []int
- func (ass *ActiveSessionSelect) Scan(ctx context.Context, v any) error
- func (s *ActiveSessionSelect) ScanX(ctx context.Context, v any)
- func (s *ActiveSessionSelect) String(ctx context.Context) (_ string, err error)
- func (s *ActiveSessionSelect) StringX(ctx context.Context) string
- func (s *ActiveSessionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ActiveSessionSelect) StringsX(ctx context.Context) []string
- type ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) ClearTimeframe() *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) Exec(ctx context.Context) error
- func (asu *ActiveSessionUpdate) ExecX(ctx context.Context)
- func (asu *ActiveSessionUpdate) Mutation() *ActiveSessionMutation
- func (asu *ActiveSessionUpdate) Save(ctx context.Context) (int, error)
- func (asu *ActiveSessionUpdate) SaveX(ctx context.Context) int
- func (asu *ActiveSessionUpdate) SetCreatedAt(t time.Time) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetEnabled(b bool) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetExchange(s string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableCreatedAt(t *time.Time) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableEnabled(b *bool) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableExchange(s *string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableSessionID(s *string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableSymbol(s *string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetNillableType(a *activesession.Type) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetSessionID(s string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetSymbol(s string) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetTimeframe(a activesession.Timeframe) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetType(a activesession.Type) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) SetUpdatedAt(t time.Time) *ActiveSessionUpdate
- func (asu *ActiveSessionUpdate) Where(ps ...predicate.ActiveSession) *ActiveSessionUpdate
- type ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) ClearTimeframe() *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) Exec(ctx context.Context) error
- func (asuo *ActiveSessionUpdateOne) ExecX(ctx context.Context)
- func (asuo *ActiveSessionUpdateOne) Mutation() *ActiveSessionMutation
- func (asuo *ActiveSessionUpdateOne) Save(ctx context.Context) (*ActiveSession, error)
- func (asuo *ActiveSessionUpdateOne) SaveX(ctx context.Context) *ActiveSession
- func (asuo *ActiveSessionUpdateOne) Select(field string, fields ...string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetCreatedAt(t time.Time) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetEnabled(b bool) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetExchange(s string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableCreatedAt(t *time.Time) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableEnabled(b *bool) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableExchange(s *string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableSessionID(s *string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableSymbol(s *string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableTimeframe(a *activesession.Timeframe) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetNillableType(a *activesession.Type) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetSessionID(s string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetSymbol(s string) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetTimeframe(a activesession.Timeframe) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetType(a activesession.Type) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) SetUpdatedAt(t time.Time) *ActiveSessionUpdateOne
- func (asuo *ActiveSessionUpdateOne) Where(ps ...predicate.ActiveSession) *ActiveSessionUpdateOne
- type ActiveSessions
- type AggregateFunc
- type Candle
- type CandleClient
- func (c *CandleClient) Create() *CandleCreate
- func (c *CandleClient) CreateBulk(builders ...*CandleCreate) *CandleCreateBulk
- func (c *CandleClient) Delete() *CandleDelete
- func (c *CandleClient) DeleteOne(ca *Candle) *CandleDeleteOne
- func (c *CandleClient) DeleteOneID(id uuid.UUID) *CandleDeleteOne
- func (c *CandleClient) Get(ctx context.Context, id uuid.UUID) (*Candle, error)
- func (c *CandleClient) GetX(ctx context.Context, id uuid.UUID) *Candle
- func (c *CandleClient) Hooks() []Hook
- func (c *CandleClient) Intercept(interceptors ...Interceptor)
- func (c *CandleClient) Interceptors() []Interceptor
- func (c *CandleClient) MapCreateBulk(slice any, setFunc func(*CandleCreate, int)) *CandleCreateBulk
- func (c *CandleClient) Query() *CandleQuery
- func (c *CandleClient) Update() *CandleUpdate
- func (c *CandleClient) UpdateOne(ca *Candle) *CandleUpdateOne
- func (c *CandleClient) UpdateOneID(id uuid.UUID) *CandleUpdateOne
- func (c *CandleClient) Use(hooks ...Hook)
- type CandleCreate
- func (cc *CandleCreate) Exec(ctx context.Context) error
- func (cc *CandleCreate) ExecX(ctx context.Context)
- func (cc *CandleCreate) Mutation() *CandleMutation
- func (cc *CandleCreate) Save(ctx context.Context) (*Candle, error)
- func (cc *CandleCreate) SaveX(ctx context.Context) *Candle
- func (cc *CandleCreate) SetClose(f float64) *CandleCreate
- func (cc *CandleCreate) SetCreatedAt(t time.Time) *CandleCreate
- func (cc *CandleCreate) SetExchange(s string) *CandleCreate
- func (cc *CandleCreate) SetHigh(f float64) *CandleCreate
- func (cc *CandleCreate) SetID(u uuid.UUID) *CandleCreate
- func (cc *CandleCreate) SetLow(f float64) *CandleCreate
- func (cc *CandleCreate) SetNillableCreatedAt(t *time.Time) *CandleCreate
- func (cc *CandleCreate) SetNillableID(u *uuid.UUID) *CandleCreate
- func (cc *CandleCreate) SetOpen(f float64) *CandleCreate
- func (cc *CandleCreate) SetSymbol(s string) *CandleCreate
- func (cc *CandleCreate) SetTimeframe(c candle.Timeframe) *CandleCreate
- func (cc *CandleCreate) SetTimestamp(i int64) *CandleCreate
- func (cc *CandleCreate) SetVolume(f float64) *CandleCreate
- type CandleCreateBulk
- type CandleDelete
- type CandleDeleteOne
- type CandleGroupBy
- func (cgb *CandleGroupBy) Aggregate(fns ...AggregateFunc) *CandleGroupBy
- func (s *CandleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CandleGroupBy) BoolX(ctx context.Context) bool
- func (s *CandleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CandleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CandleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CandleGroupBy) Float64X(ctx context.Context) float64
- func (s *CandleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CandleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CandleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CandleGroupBy) IntX(ctx context.Context) int
- func (s *CandleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CandleGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CandleGroupBy) Scan(ctx context.Context, v any) error
- func (s *CandleGroupBy) ScanX(ctx context.Context, v any)
- func (s *CandleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CandleGroupBy) StringX(ctx context.Context) string
- func (s *CandleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CandleGroupBy) StringsX(ctx context.Context) []string
- type CandleMutation
- func (m *CandleMutation) AddClose(f float64)
- func (m *CandleMutation) AddField(name string, value ent.Value) error
- func (m *CandleMutation) AddHigh(f float64)
- func (m *CandleMutation) AddLow(f float64)
- func (m *CandleMutation) AddOpen(f float64)
- func (m *CandleMutation) AddTimestamp(i int64)
- func (m *CandleMutation) AddVolume(f float64)
- func (m *CandleMutation) AddedClose() (r float64, exists bool)
- func (m *CandleMutation) AddedEdges() []string
- func (m *CandleMutation) AddedField(name string) (ent.Value, bool)
- func (m *CandleMutation) AddedFields() []string
- func (m *CandleMutation) AddedHigh() (r float64, exists bool)
- func (m *CandleMutation) AddedIDs(name string) []ent.Value
- func (m *CandleMutation) AddedLow() (r float64, exists bool)
- func (m *CandleMutation) AddedOpen() (r float64, exists bool)
- func (m *CandleMutation) AddedTimestamp() (r int64, exists bool)
- func (m *CandleMutation) AddedVolume() (r float64, exists bool)
- func (m *CandleMutation) ClearEdge(name string) error
- func (m *CandleMutation) ClearField(name string) error
- func (m *CandleMutation) ClearedEdges() []string
- func (m *CandleMutation) ClearedFields() []string
- func (m CandleMutation) Client() *Client
- func (m *CandleMutation) Close() (r float64, exists bool)
- func (m *CandleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CandleMutation) EdgeCleared(name string) bool
- func (m *CandleMutation) Exchange() (r string, exists bool)
- func (m *CandleMutation) Field(name string) (ent.Value, bool)
- func (m *CandleMutation) FieldCleared(name string) bool
- func (m *CandleMutation) Fields() []string
- func (m *CandleMutation) High() (r float64, exists bool)
- func (m *CandleMutation) ID() (id uuid.UUID, exists bool)
- func (m *CandleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CandleMutation) Low() (r float64, exists bool)
- func (m *CandleMutation) OldClose(ctx context.Context) (v float64, err error)
- func (m *CandleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CandleMutation) OldExchange(ctx context.Context) (v string, err error)
- func (m *CandleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CandleMutation) OldHigh(ctx context.Context) (v float64, err error)
- func (m *CandleMutation) OldLow(ctx context.Context) (v float64, err error)
- func (m *CandleMutation) OldOpen(ctx context.Context) (v float64, err error)
- func (m *CandleMutation) OldSymbol(ctx context.Context) (v string, err error)
- func (m *CandleMutation) OldTimeframe(ctx context.Context) (v candle.Timeframe, err error)
- func (m *CandleMutation) OldTimestamp(ctx context.Context) (v int64, err error)
- func (m *CandleMutation) OldVolume(ctx context.Context) (v float64, err error)
- func (m *CandleMutation) Op() Op
- func (m *CandleMutation) Open() (r float64, exists bool)
- func (m *CandleMutation) RemovedEdges() []string
- func (m *CandleMutation) RemovedIDs(name string) []ent.Value
- func (m *CandleMutation) ResetClose()
- func (m *CandleMutation) ResetCreatedAt()
- func (m *CandleMutation) ResetEdge(name string) error
- func (m *CandleMutation) ResetExchange()
- func (m *CandleMutation) ResetField(name string) error
- func (m *CandleMutation) ResetHigh()
- func (m *CandleMutation) ResetLow()
- func (m *CandleMutation) ResetOpen()
- func (m *CandleMutation) ResetSymbol()
- func (m *CandleMutation) ResetTimeframe()
- func (m *CandleMutation) ResetTimestamp()
- func (m *CandleMutation) ResetVolume()
- func (m *CandleMutation) SetClose(f float64)
- func (m *CandleMutation) SetCreatedAt(t time.Time)
- func (m *CandleMutation) SetExchange(s string)
- func (m *CandleMutation) SetField(name string, value ent.Value) error
- func (m *CandleMutation) SetHigh(f float64)
- func (m *CandleMutation) SetID(id uuid.UUID)
- func (m *CandleMutation) SetLow(f float64)
- func (m *CandleMutation) SetOp(op Op)
- func (m *CandleMutation) SetOpen(f float64)
- func (m *CandleMutation) SetSymbol(s string)
- func (m *CandleMutation) SetTimeframe(c candle.Timeframe)
- func (m *CandleMutation) SetTimestamp(i int64)
- func (m *CandleMutation) SetVolume(f float64)
- func (m *CandleMutation) Symbol() (r string, exists bool)
- func (m *CandleMutation) Timeframe() (r candle.Timeframe, exists bool)
- func (m *CandleMutation) Timestamp() (r int64, exists bool)
- func (m CandleMutation) Tx() (*Tx, error)
- func (m *CandleMutation) Type() string
- func (m *CandleMutation) Volume() (r float64, exists bool)
- func (m *CandleMutation) Where(ps ...predicate.Candle)
- func (m *CandleMutation) WhereP(ps ...func(*sql.Selector))
- type CandleQuery
- func (cq *CandleQuery) Aggregate(fns ...AggregateFunc) *CandleSelect
- func (cq *CandleQuery) All(ctx context.Context) ([]*Candle, error)
- func (cq *CandleQuery) AllX(ctx context.Context) []*Candle
- func (cq *CandleQuery) Clone() *CandleQuery
- func (cq *CandleQuery) Count(ctx context.Context) (int, error)
- func (cq *CandleQuery) CountX(ctx context.Context) int
- func (cq *CandleQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CandleQuery) ExistX(ctx context.Context) bool
- func (cq *CandleQuery) First(ctx context.Context) (*Candle, error)
- func (cq *CandleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CandleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *CandleQuery) FirstX(ctx context.Context) *Candle
- func (cq *CandleQuery) GroupBy(field string, fields ...string) *CandleGroupBy
- func (cq *CandleQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *CandleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *CandleQuery) Limit(limit int) *CandleQuery
- func (cq *CandleQuery) Offset(offset int) *CandleQuery
- func (cq *CandleQuery) Only(ctx context.Context) (*Candle, error)
- func (cq *CandleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CandleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *CandleQuery) OnlyX(ctx context.Context) *Candle
- func (cq *CandleQuery) Order(o ...candle.OrderOption) *CandleQuery
- func (cq *CandleQuery) Select(fields ...string) *CandleSelect
- func (cq *CandleQuery) Unique(unique bool) *CandleQuery
- func (cq *CandleQuery) Where(ps ...predicate.Candle) *CandleQuery
- type CandleSelect
- func (cs *CandleSelect) Aggregate(fns ...AggregateFunc) *CandleSelect
- func (s *CandleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CandleSelect) BoolX(ctx context.Context) bool
- func (s *CandleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CandleSelect) BoolsX(ctx context.Context) []bool
- func (s *CandleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CandleSelect) Float64X(ctx context.Context) float64
- func (s *CandleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CandleSelect) Float64sX(ctx context.Context) []float64
- func (s *CandleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CandleSelect) IntX(ctx context.Context) int
- func (s *CandleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CandleSelect) IntsX(ctx context.Context) []int
- func (cs *CandleSelect) Scan(ctx context.Context, v any) error
- func (s *CandleSelect) ScanX(ctx context.Context, v any)
- func (s *CandleSelect) String(ctx context.Context) (_ string, err error)
- func (s *CandleSelect) StringX(ctx context.Context) string
- func (s *CandleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CandleSelect) StringsX(ctx context.Context) []string
- type CandleUpdate
- func (cu *CandleUpdate) AddClose(f float64) *CandleUpdate
- func (cu *CandleUpdate) AddHigh(f float64) *CandleUpdate
- func (cu *CandleUpdate) AddLow(f float64) *CandleUpdate
- func (cu *CandleUpdate) AddOpen(f float64) *CandleUpdate
- func (cu *CandleUpdate) AddTimestamp(i int64) *CandleUpdate
- func (cu *CandleUpdate) AddVolume(f float64) *CandleUpdate
- func (cu *CandleUpdate) Exec(ctx context.Context) error
- func (cu *CandleUpdate) ExecX(ctx context.Context)
- func (cu *CandleUpdate) Mutation() *CandleMutation
- func (cu *CandleUpdate) Save(ctx context.Context) (int, error)
- func (cu *CandleUpdate) SaveX(ctx context.Context) int
- func (cu *CandleUpdate) SetClose(f float64) *CandleUpdate
- func (cu *CandleUpdate) SetCreatedAt(t time.Time) *CandleUpdate
- func (cu *CandleUpdate) SetExchange(s string) *CandleUpdate
- func (cu *CandleUpdate) SetHigh(f float64) *CandleUpdate
- func (cu *CandleUpdate) SetLow(f float64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableClose(f *float64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableCreatedAt(t *time.Time) *CandleUpdate
- func (cu *CandleUpdate) SetNillableExchange(s *string) *CandleUpdate
- func (cu *CandleUpdate) SetNillableHigh(f *float64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableLow(f *float64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableOpen(f *float64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableSymbol(s *string) *CandleUpdate
- func (cu *CandleUpdate) SetNillableTimeframe(c *candle.Timeframe) *CandleUpdate
- func (cu *CandleUpdate) SetNillableTimestamp(i *int64) *CandleUpdate
- func (cu *CandleUpdate) SetNillableVolume(f *float64) *CandleUpdate
- func (cu *CandleUpdate) SetOpen(f float64) *CandleUpdate
- func (cu *CandleUpdate) SetSymbol(s string) *CandleUpdate
- func (cu *CandleUpdate) SetTimeframe(c candle.Timeframe) *CandleUpdate
- func (cu *CandleUpdate) SetTimestamp(i int64) *CandleUpdate
- func (cu *CandleUpdate) SetVolume(f float64) *CandleUpdate
- func (cu *CandleUpdate) Where(ps ...predicate.Candle) *CandleUpdate
- type CandleUpdateOne
- func (cuo *CandleUpdateOne) AddClose(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) AddHigh(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) AddLow(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) AddOpen(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) AddTimestamp(i int64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) AddVolume(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) Exec(ctx context.Context) error
- func (cuo *CandleUpdateOne) ExecX(ctx context.Context)
- func (cuo *CandleUpdateOne) Mutation() *CandleMutation
- func (cuo *CandleUpdateOne) Save(ctx context.Context) (*Candle, error)
- func (cuo *CandleUpdateOne) SaveX(ctx context.Context) *Candle
- func (cuo *CandleUpdateOne) Select(field string, fields ...string) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetClose(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetCreatedAt(t time.Time) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetExchange(s string) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetHigh(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetLow(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableClose(f *float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableCreatedAt(t *time.Time) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableExchange(s *string) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableHigh(f *float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableLow(f *float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableOpen(f *float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableSymbol(s *string) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableTimeframe(c *candle.Timeframe) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableTimestamp(i *int64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetNillableVolume(f *float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetOpen(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetSymbol(s string) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetTimeframe(c candle.Timeframe) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetTimestamp(i int64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) SetVolume(f float64) *CandleUpdateOne
- func (cuo *CandleUpdateOne) Where(ps ...predicate.Candle) *CandleUpdateOne
- type Candles
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeActiveSession = "ActiveSession" TypeCandle = "Candle" )
Variables ¶
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 IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type ActiveSession ¶
type ActiveSession struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // SessionID holds the value of the "session_id" field. SessionID string `json:"session_id,omitempty"` // Exchange holds the value of the "exchange" field. Exchange string `json:"exchange,omitempty"` // Symbol holds the value of the "symbol" field. Symbol string `json:"symbol,omitempty"` // Type holds the value of the "type" field. Type activesession.Type `json:"type,omitempty"` // Timeframe holds the value of the "timeframe" field. Timeframe *activesession.Timeframe `json:"timeframe,omitempty"` // Enabled holds the value of the "enabled" field. Enabled bool `json:"enabled,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"` // contains filtered or unexported fields }
ActiveSession is the model entity for the ActiveSession schema.
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.
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 ¶
func (c *ActiveSessionClient) Create() *ActiveSessionCreate
Create returns a builder for creating a ActiveSession entity.
func (*ActiveSessionClient) CreateBulk ¶
func (c *ActiveSessionClient) CreateBulk(builders ...*ActiveSessionCreate) *ActiveSessionCreateBulk
CreateBulk returns a builder for creating a bulk of ActiveSession entities.
func (*ActiveSessionClient) Delete ¶
func (c *ActiveSessionClient) Delete() *ActiveSessionDelete
Delete returns a delete builder for ActiveSession.
func (*ActiveSessionClient) DeleteOne ¶
func (c *ActiveSessionClient) DeleteOne(as *ActiveSession) *ActiveSessionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ActiveSessionClient) DeleteOneID ¶
func (c *ActiveSessionClient) DeleteOneID(id uuid.UUID) *ActiveSessionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ActiveSessionClient) Get ¶
func (c *ActiveSessionClient) Get(ctx context.Context, id uuid.UUID) (*ActiveSession, error)
Get returns a ActiveSession entity by its id.
func (*ActiveSessionClient) GetX ¶
func (c *ActiveSessionClient) GetX(ctx context.Context, id uuid.UUID) *ActiveSession
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 ¶
func (c *ActiveSessionClient) Query() *ActiveSessionQuery
Query returns a query builder for ActiveSession.
func (*ActiveSessionClient) Update ¶
func (c *ActiveSessionClient) Update() *ActiveSessionUpdate
Update returns an update builder for ActiveSession.
func (*ActiveSessionClient) UpdateOne ¶
func (c *ActiveSessionClient) UpdateOne(as *ActiveSession) *ActiveSessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ActiveSessionClient) UpdateOneID ¶
func (c *ActiveSessionClient) UpdateOneID(id uuid.UUID) *ActiveSessionUpdateOne
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 ¶
func (asc *ActiveSessionCreate) Save(ctx context.Context) (*ActiveSession, error)
Save creates the ActiveSession in the database.
func (*ActiveSessionCreate) SaveX ¶
func (asc *ActiveSessionCreate) SaveX(ctx context.Context) *ActiveSession
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) SetExchange ¶
func (asc *ActiveSessionCreate) SetExchange(s string) *ActiveSessionCreate
SetExchange sets the "exchange" field.
func (*ActiveSessionCreate) SetID ¶
func (asc *ActiveSessionCreate) SetID(u uuid.UUID) *ActiveSessionCreate
SetID sets the "id" 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) SetNillableID ¶
func (asc *ActiveSessionCreate) SetNillableID(u *uuid.UUID) *ActiveSessionCreate
SetNillableID sets the "id" field 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) SetSymbol ¶
func (asc *ActiveSessionCreate) SetSymbol(s string) *ActiveSessionCreate
SetSymbol sets the "symbol" field.
func (*ActiveSessionCreate) SetTimeframe ¶
func (asc *ActiveSessionCreate) SetTimeframe(a activesession.Timeframe) *ActiveSessionCreate
SetTimeframe sets the "timeframe" field.
func (*ActiveSessionCreate) SetType ¶
func (asc *ActiveSessionCreate) SetType(a activesession.Type) *ActiveSessionCreate
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 ¶
func (ascb *ActiveSessionCreateBulk) Save(ctx context.Context) ([]*ActiveSession, error)
Save creates the ActiveSession entities in the database.
func (*ActiveSessionCreateBulk) SaveX ¶
func (ascb *ActiveSessionCreateBulk) SaveX(ctx context.Context) []*ActiveSession
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 ¶
func (asd *ActiveSessionDelete) Where(ps ...predicate.ActiveSession) *ActiveSessionDelete
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 ¶
func (asdo *ActiveSessionDeleteOne) Where(ps ...predicate.ActiveSession) *ActiveSessionDeleteOne
Where appends a list predicates to the ActiveSessionDelete builder.
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActiveSessionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActiveSessionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActiveSessionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActiveSessionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActiveSessionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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) 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) 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) 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) 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) 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) OldCreatedAt ¶
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) 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 ¶
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) 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) OldSymbol ¶
func (m *ActiveSessionMutation) OldSymbol(ctx context.Context) (v string, err error)
OldSymbol returns the old "symbol" 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 ¶
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) 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) ResetSessionID ¶
func (m *ActiveSessionMutation) ResetSessionID()
ResetSessionID resets all changes to the "session_id" field.
func (*ActiveSessionMutation) ResetSymbol ¶
func (m *ActiveSessionMutation) ResetSymbol()
ResetSymbol resets all changes to the "symbol" 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) 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) 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) SetSymbol ¶
func (m *ActiveSessionMutation) SetSymbol(s string)
SetSymbol sets the "symbol" field.
func (*ActiveSessionMutation) SetTimeframe ¶
func (m *ActiveSessionMutation) SetTimeframe(a activesession.Timeframe)
SetTimeframe sets the "timeframe" field.
func (*ActiveSessionMutation) SetType ¶
func (m *ActiveSessionMutation) SetType(a activesession.Type)
SetType sets the "type" field.
func (*ActiveSessionMutation) SetUpdatedAt ¶
func (m *ActiveSessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ActiveSessionMutation) Symbol ¶
func (m *ActiveSessionMutation) Symbol() (r string, exists bool)
Symbol returns the value of the "symbol" 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 ¶
func (m *ActiveSessionMutation) Where(ps ...predicate.ActiveSession)
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 ¶
func (asq *ActiveSessionQuery) All(ctx context.Context) ([]*ActiveSession, error)
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 ¶
func (asq *ActiveSessionQuery) First(ctx context.Context) (*ActiveSession, error)
First returns the first ActiveSession entity from the query. Returns a *NotFoundError when no ActiveSession was found.
func (*ActiveSessionQuery) FirstID ¶
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) 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 ¶
func (asq *ActiveSessionQuery) Only(ctx context.Context) (*ActiveSession, error)
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 ¶
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 ¶
func (asq *ActiveSessionQuery) OnlyX(ctx context.Context) *ActiveSession
OnlyX is like Only, but panics if an error occurs.
func (*ActiveSessionQuery) Order ¶
func (asq *ActiveSessionQuery) Order(o ...activesession.OrderOption) *ActiveSessionQuery
Order specifies how the records should be ordered.
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 ¶
func (asq *ActiveSessionQuery) Where(ps ...predicate.ActiveSession) *ActiveSessionQuery
Where adds a new predicate for the ActiveSessionQuery builder.
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActiveSessionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActiveSessionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActiveSessionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActiveSessionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActiveSessionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ActiveSessionUpdate ¶
type ActiveSessionUpdate struct {
// contains filtered or unexported fields
}
ActiveSessionUpdate is the builder for updating ActiveSession entities.
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) SetCreatedAt ¶
func (asu *ActiveSessionUpdate) SetCreatedAt(t time.Time) *ActiveSessionUpdate
SetCreatedAt sets the "created_at" field.
func (*ActiveSessionUpdate) SetEnabled ¶
func (asu *ActiveSessionUpdate) SetEnabled(b bool) *ActiveSessionUpdate
SetEnabled sets the "enabled" field.
func (*ActiveSessionUpdate) SetExchange ¶
func (asu *ActiveSessionUpdate) SetExchange(s string) *ActiveSessionUpdate
SetExchange sets the "exchange" field.
func (*ActiveSessionUpdate) SetNillableCreatedAt ¶
func (asu *ActiveSessionUpdate) SetNillableCreatedAt(t *time.Time) *ActiveSessionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ActiveSessionUpdate) SetNillableEnabled ¶
func (asu *ActiveSessionUpdate) SetNillableEnabled(b *bool) *ActiveSessionUpdate
SetNillableEnabled sets the "enabled" 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) SetNillableSessionID ¶
func (asu *ActiveSessionUpdate) SetNillableSessionID(s *string) *ActiveSessionUpdate
SetNillableSessionID sets the "session_id" field if the given value is not nil.
func (*ActiveSessionUpdate) SetNillableSymbol ¶
func (asu *ActiveSessionUpdate) SetNillableSymbol(s *string) *ActiveSessionUpdate
SetNillableSymbol sets the "symbol" 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) SetSymbol ¶
func (asu *ActiveSessionUpdate) SetSymbol(s string) *ActiveSessionUpdate
SetSymbol sets the "symbol" field.
func (*ActiveSessionUpdate) SetTimeframe ¶
func (asu *ActiveSessionUpdate) SetTimeframe(a activesession.Timeframe) *ActiveSessionUpdate
SetTimeframe sets the "timeframe" field.
func (*ActiveSessionUpdate) SetType ¶
func (asu *ActiveSessionUpdate) SetType(a activesession.Type) *ActiveSessionUpdate
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 ¶
func (asu *ActiveSessionUpdate) Where(ps ...predicate.ActiveSession) *ActiveSessionUpdate
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) 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 ¶
func (asuo *ActiveSessionUpdateOne) Mutation() *ActiveSessionMutation
Mutation returns the ActiveSessionMutation object of the builder.
func (*ActiveSessionUpdateOne) Save ¶
func (asuo *ActiveSessionUpdateOne) Save(ctx context.Context) (*ActiveSession, error)
Save executes the query and returns the updated ActiveSession entity.
func (*ActiveSessionUpdateOne) SaveX ¶
func (asuo *ActiveSessionUpdateOne) SaveX(ctx context.Context) *ActiveSession
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) SetCreatedAt ¶
func (asuo *ActiveSessionUpdateOne) SetCreatedAt(t time.Time) *ActiveSessionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ActiveSessionUpdateOne) SetEnabled ¶
func (asuo *ActiveSessionUpdateOne) SetEnabled(b bool) *ActiveSessionUpdateOne
SetEnabled sets the "enabled" field.
func (*ActiveSessionUpdateOne) SetExchange ¶
func (asuo *ActiveSessionUpdateOne) SetExchange(s string) *ActiveSessionUpdateOne
SetExchange sets the "exchange" field.
func (*ActiveSessionUpdateOne) SetNillableCreatedAt ¶
func (asuo *ActiveSessionUpdateOne) SetNillableCreatedAt(t *time.Time) *ActiveSessionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ActiveSessionUpdateOne) SetNillableEnabled ¶
func (asuo *ActiveSessionUpdateOne) SetNillableEnabled(b *bool) *ActiveSessionUpdateOne
SetNillableEnabled sets the "enabled" 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) SetNillableSessionID ¶
func (asuo *ActiveSessionUpdateOne) SetNillableSessionID(s *string) *ActiveSessionUpdateOne
SetNillableSessionID sets the "session_id" field if the given value is not nil.
func (*ActiveSessionUpdateOne) SetNillableSymbol ¶
func (asuo *ActiveSessionUpdateOne) SetNillableSymbol(s *string) *ActiveSessionUpdateOne
SetNillableSymbol sets the "symbol" 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 ¶
func (asuo *ActiveSessionUpdateOne) SetNillableType(a *activesession.Type) *ActiveSessionUpdateOne
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) SetSymbol ¶
func (asuo *ActiveSessionUpdateOne) SetSymbol(s string) *ActiveSessionUpdateOne
SetSymbol sets the "symbol" field.
func (*ActiveSessionUpdateOne) SetTimeframe ¶
func (asuo *ActiveSessionUpdateOne) SetTimeframe(a activesession.Timeframe) *ActiveSessionUpdateOne
SetTimeframe sets the "timeframe" field.
func (*ActiveSessionUpdateOne) SetType ¶
func (asuo *ActiveSessionUpdateOne) SetType(a activesession.Type) *ActiveSessionUpdateOne
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 ¶
func (asuo *ActiveSessionUpdateOne) Where(ps ...predicate.ActiveSession) *ActiveSessionUpdateOne
Where appends a list predicates to the ActiveSessionUpdate builder.
type ActiveSessions ¶
type ActiveSessions []*ActiveSession
ActiveSessions is a parsable slice of ActiveSession.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Candle ¶
type Candle struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Exchange holds the value of the "exchange" field. Exchange string `json:"exchange,omitempty"` // Symbol holds the value of the "symbol" field. Symbol string `json:"symbol,omitempty"` // Timeframe holds the value of the "timeframe" field. Timeframe candle.Timeframe `json:"timeframe,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp int64 `json:"timestamp,omitempty"` // Open holds the value of the "open" field. Open float64 `json:"open,omitempty"` // High holds the value of the "high" field. High float64 `json:"high,omitempty"` // Low holds the value of the "low" field. Low float64 `json:"low,omitempty"` // Close holds the value of the "close" field. Close float64 `json:"close,omitempty"` // Volume holds the value of the "volume" field. Volume float64 `json:"volume,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Candle is the model entity for the Candle schema.
func (*Candle) Unwrap ¶
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.
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) 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) 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) 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) SetLow ¶
func (cc *CandleCreate) SetLow(f float64) *CandleCreate
SetLow sets the "low" field.
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) SetOpen ¶
func (cc *CandleCreate) SetOpen(f float64) *CandleCreate
SetOpen sets the "open" field.
func (*CandleCreate) SetSymbol ¶
func (cc *CandleCreate) SetSymbol(s string) *CandleCreate
SetSymbol sets the "symbol" 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) SetVolume ¶
func (cc *CandleCreate) SetVolume(f float64) *CandleCreate
SetVolume sets the "volume" 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.
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 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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CandleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CandleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CandleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CandleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CandleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CandleMutation ¶
type CandleMutation struct {
// contains filtered or unexported fields
}
CandleMutation represents an operation that mutates the Candle nodes in the graph.
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) AddTimestamp ¶
func (m *CandleMutation) AddTimestamp(i int64)
AddTimestamp adds i to the "timestamp" field.
func (*CandleMutation) AddVolume ¶
func (m *CandleMutation) AddVolume(f float64)
AddVolume adds f to the "volume" field.
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) 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) 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) 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) 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 ¶
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) Low ¶
func (m *CandleMutation) Low() (r float64, exists bool)
Low returns the value of the "low" field in the mutation.
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 ¶
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 ¶
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) 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) 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) OldSymbol ¶
func (m *CandleMutation) OldSymbol(ctx context.Context) (v string, err error)
OldSymbol returns the old "symbol" 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 ¶
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) 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) Open ¶
func (m *CandleMutation) Open() (r float64, exists bool)
Open returns the value of the "open" 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) 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) ResetLow ¶
func (m *CandleMutation) ResetLow()
ResetLow resets all changes to the "low" field.
func (*CandleMutation) ResetOpen ¶
func (m *CandleMutation) ResetOpen()
ResetOpen resets all changes to the "open" field.
func (*CandleMutation) ResetSymbol ¶
func (m *CandleMutation) ResetSymbol()
ResetSymbol resets all changes to the "symbol" 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) ResetVolume ¶
func (m *CandleMutation) ResetVolume()
ResetVolume resets all changes to the "volume" 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) SetLow ¶
func (m *CandleMutation) SetLow(f float64)
SetLow sets the "low" 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) SetSymbol ¶
func (m *CandleMutation) SetSymbol(s string)
SetSymbol sets the "symbol" 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) SetVolume ¶
func (m *CandleMutation) SetVolume(f float64)
SetVolume sets the "volume" field.
func (*CandleMutation) Symbol ¶
func (m *CandleMutation) Symbol() (r string, exists bool)
Symbol returns the value of the "symbol" 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) 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) Volume ¶
func (m *CandleMutation) Volume() (r float64, exists bool)
Volume returns the value of the "volume" field in the 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 ¶
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) 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 ¶
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) 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.
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CandleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CandleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CandleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CandleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CandleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CandleUpdate ¶
type CandleUpdate struct {
// contains filtered or unexported fields
}
CandleUpdate is the builder for updating Candle entities.
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) AddTimestamp ¶
func (cu *CandleUpdate) AddTimestamp(i int64) *CandleUpdate
AddTimestamp adds i to the "timestamp" field.
func (*CandleUpdate) AddVolume ¶
func (cu *CandleUpdate) AddVolume(f float64) *CandleUpdate
AddVolume adds f to the "volume" 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) SetClose ¶
func (cu *CandleUpdate) SetClose(f float64) *CandleUpdate
SetClose sets the "close" field.
func (*CandleUpdate) SetCreatedAt ¶
func (cu *CandleUpdate) SetCreatedAt(t time.Time) *CandleUpdate
SetCreatedAt sets the "created_at" 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) SetLow ¶
func (cu *CandleUpdate) SetLow(f float64) *CandleUpdate
SetLow sets the "low" field.
func (*CandleUpdate) SetNillableClose ¶
func (cu *CandleUpdate) SetNillableClose(f *float64) *CandleUpdate
SetNillableClose sets the "close" field if the given value is not nil.
func (*CandleUpdate) SetNillableCreatedAt ¶
func (cu *CandleUpdate) SetNillableCreatedAt(t *time.Time) *CandleUpdate
SetNillableCreatedAt sets the "created_at" 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) 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) SetNillableSymbol ¶
func (cu *CandleUpdate) SetNillableSymbol(s *string) *CandleUpdate
SetNillableSymbol sets the "symbol" 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) SetNillableVolume ¶
func (cu *CandleUpdate) SetNillableVolume(f *float64) *CandleUpdate
SetNillableVolume sets the "volume" 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) SetSymbol ¶
func (cu *CandleUpdate) SetSymbol(s string) *CandleUpdate
SetSymbol sets the "symbol" 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) SetVolume ¶
func (cu *CandleUpdate) SetVolume(f float64) *CandleUpdate
SetVolume sets the "volume" 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) 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) AddTimestamp ¶
func (cuo *CandleUpdateOne) AddTimestamp(i int64) *CandleUpdateOne
AddTimestamp adds i to the "timestamp" field.
func (*CandleUpdateOne) AddVolume ¶
func (cuo *CandleUpdateOne) AddVolume(f float64) *CandleUpdateOne
AddVolume adds f to the "volume" 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) SetClose ¶
func (cuo *CandleUpdateOne) SetClose(f float64) *CandleUpdateOne
SetClose sets the "close" field.
func (*CandleUpdateOne) SetCreatedAt ¶
func (cuo *CandleUpdateOne) SetCreatedAt(t time.Time) *CandleUpdateOne
SetCreatedAt sets the "created_at" 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) SetLow ¶
func (cuo *CandleUpdateOne) SetLow(f float64) *CandleUpdateOne
SetLow sets the "low" field.
func (*CandleUpdateOne) SetNillableClose ¶
func (cuo *CandleUpdateOne) SetNillableClose(f *float64) *CandleUpdateOne
SetNillableClose sets the "close" field if the given value is not nil.
func (*CandleUpdateOne) SetNillableCreatedAt ¶
func (cuo *CandleUpdateOne) SetNillableCreatedAt(t *time.Time) *CandleUpdateOne
SetNillableCreatedAt sets the "created_at" 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) 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) SetNillableSymbol ¶
func (cuo *CandleUpdateOne) SetNillableSymbol(s *string) *CandleUpdateOne
SetNillableSymbol sets the "symbol" 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) SetNillableVolume ¶
func (cuo *CandleUpdateOne) SetNillableVolume(f *float64) *CandleUpdateOne
SetNillableVolume sets the "volume" 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) SetSymbol ¶
func (cuo *CandleUpdateOne) SetSymbol(s string) *CandleUpdateOne
SetSymbol sets the "symbol" 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) SetVolume ¶
func (cuo *CandleUpdateOne) SetVolume(f float64) *CandleUpdateOne
SetVolume sets the "volume" field.
func (*CandleUpdateOne) Where ¶
func (cuo *CandleUpdateOne) Where(ps ...predicate.Candle) *CandleUpdateOne
Where appends a list predicates to the CandleUpdate builder.
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 // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). 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(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type 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 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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
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 // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.