Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type BarGroup
- type BarGroupClient
- func (c *BarGroupClient) Create() *BarGroupCreate
- func (c *BarGroupClient) CreateBulk(builders ...*BarGroupCreate) *BarGroupCreateBulk
- func (c *BarGroupClient) Delete() *BarGroupDelete
- func (c *BarGroupClient) DeleteOne(bg *BarGroup) *BarGroupDeleteOne
- func (c *BarGroupClient) DeleteOneID(id int) *BarGroupDeleteOne
- func (c *BarGroupClient) Get(ctx context.Context, id int) (*BarGroup, error)
- func (c *BarGroupClient) GetX(ctx context.Context, id int) *BarGroup
- func (c *BarGroupClient) Hooks() []Hook
- func (c *BarGroupClient) Intercept(interceptors ...Interceptor)
- func (c *BarGroupClient) Interceptors() []Interceptor
- func (c *BarGroupClient) Query() *BarGroupQuery
- func (c *BarGroupClient) QueryRecords(bg *BarGroup) *BarRecordQuery
- func (c *BarGroupClient) QueryTimeRange(bg *BarGroup) *BarTimeRangeQuery
- func (c *BarGroupClient) Update() *BarGroupUpdate
- func (c *BarGroupClient) UpdateOne(bg *BarGroup) *BarGroupUpdateOne
- func (c *BarGroupClient) UpdateOneID(id int) *BarGroupUpdateOne
- func (c *BarGroupClient) Use(hooks ...Hook)
- type BarGroupCreate
- func (bgc *BarGroupCreate) AddRecordIDs(ids ...int) *BarGroupCreate
- func (bgc *BarGroupCreate) AddRecords(b ...*BarRecord) *BarGroupCreate
- func (bgc *BarGroupCreate) Exec(ctx context.Context) error
- func (bgc *BarGroupCreate) ExecX(ctx context.Context)
- func (bgc *BarGroupCreate) Mutation() *BarGroupMutation
- func (bgc *BarGroupCreate) Save(ctx context.Context) (*BarGroup, error)
- func (bgc *BarGroupCreate) SaveX(ctx context.Context) *BarGroup
- func (bgc *BarGroupCreate) SetCount(i int) *BarGroupCreate
- func (bgc *BarGroupCreate) SetFirst(t time.Time) *BarGroupCreate
- func (bgc *BarGroupCreate) SetLast(t time.Time) *BarGroupCreate
- func (bgc *BarGroupCreate) SetTimeRange(b *BarTimeRange) *BarGroupCreate
- func (bgc *BarGroupCreate) SetTimeRangeID(i int) *BarGroupCreate
- type BarGroupCreateBulk
- type BarGroupDelete
- type BarGroupDeleteOne
- type BarGroupEdges
- type BarGroupGroupBy
- func (bggb *BarGroupGroupBy) Aggregate(fns ...AggregateFunc) *BarGroupGroupBy
- func (s *BarGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarGroupGroupBy) BoolX(ctx context.Context) bool
- func (s *BarGroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BarGroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BarGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarGroupGroupBy) Float64X(ctx context.Context) float64
- func (s *BarGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarGroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BarGroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BarGroupGroupBy) IntX(ctx context.Context) int
- func (s *BarGroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BarGroupGroupBy) IntsX(ctx context.Context) []int
- func (bggb *BarGroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *BarGroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *BarGroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BarGroupGroupBy) StringX(ctx context.Context) string
- func (s *BarGroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BarGroupGroupBy) StringsX(ctx context.Context) []string
- type BarGroupMutation
- func (m *BarGroupMutation) AddCount(i int)
- func (m *BarGroupMutation) AddField(name string, value ent.Value) error
- func (m *BarGroupMutation) AddRecordIDs(ids ...int)
- func (m *BarGroupMutation) AddedCount() (r int, exists bool)
- func (m *BarGroupMutation) AddedEdges() []string
- func (m *BarGroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *BarGroupMutation) AddedFields() []string
- func (m *BarGroupMutation) AddedIDs(name string) []ent.Value
- func (m *BarGroupMutation) ClearEdge(name string) error
- func (m *BarGroupMutation) ClearField(name string) error
- func (m *BarGroupMutation) ClearRecords()
- func (m *BarGroupMutation) ClearTimeRange()
- func (m *BarGroupMutation) ClearedEdges() []string
- func (m *BarGroupMutation) ClearedFields() []string
- func (m BarGroupMutation) Client() *Client
- func (m *BarGroupMutation) Count() (r int, exists bool)
- func (m *BarGroupMutation) EdgeCleared(name string) bool
- func (m *BarGroupMutation) Field(name string) (ent.Value, bool)
- func (m *BarGroupMutation) FieldCleared(name string) bool
- func (m *BarGroupMutation) Fields() []string
- func (m *BarGroupMutation) First() (r time.Time, exists bool)
- func (m *BarGroupMutation) ID() (id int, exists bool)
- func (m *BarGroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BarGroupMutation) Last() (r time.Time, exists bool)
- func (m *BarGroupMutation) OldCount(ctx context.Context) (v int, err error)
- func (m *BarGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BarGroupMutation) OldFirst(ctx context.Context) (v time.Time, err error)
- func (m *BarGroupMutation) OldLast(ctx context.Context) (v time.Time, err error)
- func (m *BarGroupMutation) OldTimeRangeID(ctx context.Context) (v int, err error)
- func (m *BarGroupMutation) Op() Op
- func (m *BarGroupMutation) RecordsCleared() bool
- func (m *BarGroupMutation) RecordsIDs() (ids []int)
- func (m *BarGroupMutation) RemoveRecordIDs(ids ...int)
- func (m *BarGroupMutation) RemovedEdges() []string
- func (m *BarGroupMutation) RemovedIDs(name string) []ent.Value
- func (m *BarGroupMutation) RemovedRecordsIDs() (ids []int)
- func (m *BarGroupMutation) ResetCount()
- func (m *BarGroupMutation) ResetEdge(name string) error
- func (m *BarGroupMutation) ResetField(name string) error
- func (m *BarGroupMutation) ResetFirst()
- func (m *BarGroupMutation) ResetLast()
- func (m *BarGroupMutation) ResetRecords()
- func (m *BarGroupMutation) ResetTimeRange()
- func (m *BarGroupMutation) ResetTimeRangeID()
- func (m *BarGroupMutation) SetCount(i int)
- func (m *BarGroupMutation) SetField(name string, value ent.Value) error
- func (m *BarGroupMutation) SetFirst(t time.Time)
- func (m *BarGroupMutation) SetLast(t time.Time)
- func (m *BarGroupMutation) SetOp(op Op)
- func (m *BarGroupMutation) SetTimeRangeID(i int)
- func (m *BarGroupMutation) TimeRangeCleared() bool
- func (m *BarGroupMutation) TimeRangeID() (r int, exists bool)
- func (m *BarGroupMutation) TimeRangeIDs() (ids []int)
- func (m BarGroupMutation) Tx() (*Tx, error)
- func (m *BarGroupMutation) Type() string
- func (m *BarGroupMutation) Where(ps ...predicate.BarGroup)
- func (m *BarGroupMutation) WhereP(ps ...func(*sql.Selector))
- type BarGroupQuery
- func (bgq *BarGroupQuery) Aggregate(fns ...AggregateFunc) *BarGroupSelect
- func (bgq *BarGroupQuery) All(ctx context.Context) ([]*BarGroup, error)
- func (bgq *BarGroupQuery) AllX(ctx context.Context) []*BarGroup
- func (bgq *BarGroupQuery) Clone() *BarGroupQuery
- func (bgq *BarGroupQuery) Count(ctx context.Context) (int, error)
- func (bgq *BarGroupQuery) CountX(ctx context.Context) int
- func (bgq *BarGroupQuery) Exist(ctx context.Context) (bool, error)
- func (bgq *BarGroupQuery) ExistX(ctx context.Context) bool
- func (bgq *BarGroupQuery) First(ctx context.Context) (*BarGroup, error)
- func (bgq *BarGroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (bgq *BarGroupQuery) FirstIDX(ctx context.Context) int
- func (bgq *BarGroupQuery) FirstX(ctx context.Context) *BarGroup
- func (bgq *BarGroupQuery) GroupBy(field string, fields ...string) *BarGroupGroupBy
- func (bgq *BarGroupQuery) IDs(ctx context.Context) ([]int, error)
- func (bgq *BarGroupQuery) IDsX(ctx context.Context) []int
- func (bgq *BarGroupQuery) Limit(limit int) *BarGroupQuery
- func (bgq *BarGroupQuery) Offset(offset int) *BarGroupQuery
- func (bgq *BarGroupQuery) Only(ctx context.Context) (*BarGroup, error)
- func (bgq *BarGroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bgq *BarGroupQuery) OnlyIDX(ctx context.Context) int
- func (bgq *BarGroupQuery) OnlyX(ctx context.Context) *BarGroup
- func (bgq *BarGroupQuery) Order(o ...OrderFunc) *BarGroupQuery
- func (bgq *BarGroupQuery) QueryRecords() *BarRecordQuery
- func (bgq *BarGroupQuery) QueryTimeRange() *BarTimeRangeQuery
- func (bgq *BarGroupQuery) Select(fields ...string) *BarGroupSelect
- func (bgq *BarGroupQuery) Unique(unique bool) *BarGroupQuery
- func (bgq *BarGroupQuery) Where(ps ...predicate.BarGroup) *BarGroupQuery
- func (bgq *BarGroupQuery) WithRecords(opts ...func(*BarRecordQuery)) *BarGroupQuery
- func (bgq *BarGroupQuery) WithTimeRange(opts ...func(*BarTimeRangeQuery)) *BarGroupQuery
- type BarGroupSelect
- func (bgs *BarGroupSelect) Aggregate(fns ...AggregateFunc) *BarGroupSelect
- func (s *BarGroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarGroupSelect) BoolX(ctx context.Context) bool
- func (s *BarGroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BarGroupSelect) BoolsX(ctx context.Context) []bool
- func (s *BarGroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarGroupSelect) Float64X(ctx context.Context) float64
- func (s *BarGroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarGroupSelect) Float64sX(ctx context.Context) []float64
- func (s *BarGroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BarGroupSelect) IntX(ctx context.Context) int
- func (s *BarGroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BarGroupSelect) IntsX(ctx context.Context) []int
- func (bgs *BarGroupSelect) Scan(ctx context.Context, v any) error
- func (s *BarGroupSelect) ScanX(ctx context.Context, v any)
- func (s *BarGroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *BarGroupSelect) StringX(ctx context.Context) string
- func (s *BarGroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BarGroupSelect) StringsX(ctx context.Context) []string
- type BarGroupUpdate
- func (bgu *BarGroupUpdate) AddCount(i int) *BarGroupUpdate
- func (bgu *BarGroupUpdate) AddRecordIDs(ids ...int) *BarGroupUpdate
- func (bgu *BarGroupUpdate) AddRecords(b ...*BarRecord) *BarGroupUpdate
- func (bgu *BarGroupUpdate) ClearRecords() *BarGroupUpdate
- func (bgu *BarGroupUpdate) ClearTimeRange() *BarGroupUpdate
- func (bgu *BarGroupUpdate) Exec(ctx context.Context) error
- func (bgu *BarGroupUpdate) ExecX(ctx context.Context)
- func (bgu *BarGroupUpdate) Mutation() *BarGroupMutation
- func (bgu *BarGroupUpdate) RemoveRecordIDs(ids ...int) *BarGroupUpdate
- func (bgu *BarGroupUpdate) RemoveRecords(b ...*BarRecord) *BarGroupUpdate
- func (bgu *BarGroupUpdate) Save(ctx context.Context) (int, error)
- func (bgu *BarGroupUpdate) SaveX(ctx context.Context) int
- func (bgu *BarGroupUpdate) SetCount(i int) *BarGroupUpdate
- func (bgu *BarGroupUpdate) SetFirst(t time.Time) *BarGroupUpdate
- func (bgu *BarGroupUpdate) SetLast(t time.Time) *BarGroupUpdate
- func (bgu *BarGroupUpdate) SetTimeRange(b *BarTimeRange) *BarGroupUpdate
- func (bgu *BarGroupUpdate) SetTimeRangeID(i int) *BarGroupUpdate
- func (bgu *BarGroupUpdate) Where(ps ...predicate.BarGroup) *BarGroupUpdate
- type BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) AddCount(i int) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) AddRecordIDs(ids ...int) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) AddRecords(b ...*BarRecord) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) ClearRecords() *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) ClearTimeRange() *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) Exec(ctx context.Context) error
- func (bguo *BarGroupUpdateOne) ExecX(ctx context.Context)
- func (bguo *BarGroupUpdateOne) Mutation() *BarGroupMutation
- func (bguo *BarGroupUpdateOne) RemoveRecordIDs(ids ...int) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) RemoveRecords(b ...*BarRecord) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) Save(ctx context.Context) (*BarGroup, error)
- func (bguo *BarGroupUpdateOne) SaveX(ctx context.Context) *BarGroup
- func (bguo *BarGroupUpdateOne) Select(field string, fields ...string) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) SetCount(i int) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) SetFirst(t time.Time) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) SetLast(t time.Time) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) SetTimeRange(b *BarTimeRange) *BarGroupUpdateOne
- func (bguo *BarGroupUpdateOne) SetTimeRangeID(i int) *BarGroupUpdateOne
- type BarGroups
- type BarRecord
- type BarRecordClient
- func (c *BarRecordClient) Create() *BarRecordCreate
- func (c *BarRecordClient) CreateBulk(builders ...*BarRecordCreate) *BarRecordCreateBulk
- func (c *BarRecordClient) Delete() *BarRecordDelete
- func (c *BarRecordClient) DeleteOne(br *BarRecord) *BarRecordDeleteOne
- func (c *BarRecordClient) DeleteOneID(id int) *BarRecordDeleteOne
- func (c *BarRecordClient) Get(ctx context.Context, id int) (*BarRecord, error)
- func (c *BarRecordClient) GetX(ctx context.Context, id int) *BarRecord
- func (c *BarRecordClient) Hooks() []Hook
- func (c *BarRecordClient) Intercept(interceptors ...Interceptor)
- func (c *BarRecordClient) Interceptors() []Interceptor
- func (c *BarRecordClient) Query() *BarRecordQuery
- func (c *BarRecordClient) QueryGroup(br *BarRecord) *BarGroupQuery
- func (c *BarRecordClient) Update() *BarRecordUpdate
- func (c *BarRecordClient) UpdateOne(br *BarRecord) *BarRecordUpdateOne
- func (c *BarRecordClient) UpdateOneID(id int) *BarRecordUpdateOne
- func (c *BarRecordClient) Use(hooks ...Hook)
- type BarRecordCreate
- func (brc *BarRecordCreate) Exec(ctx context.Context) error
- func (brc *BarRecordCreate) ExecX(ctx context.Context)
- func (brc *BarRecordCreate) Mutation() *BarRecordMutation
- func (brc *BarRecordCreate) Save(ctx context.Context) (*BarRecord, error)
- func (brc *BarRecordCreate) SaveX(ctx context.Context) *BarRecord
- func (brc *BarRecordCreate) SetClose(f float64) *BarRecordCreate
- func (brc *BarRecordCreate) SetGroup(b *BarGroup) *BarRecordCreate
- func (brc *BarRecordCreate) SetGroupID(id int) *BarRecordCreate
- func (brc *BarRecordCreate) SetHigh(f float64) *BarRecordCreate
- func (brc *BarRecordCreate) SetLow(f float64) *BarRecordCreate
- func (brc *BarRecordCreate) SetNillableGroupID(id *int) *BarRecordCreate
- func (brc *BarRecordCreate) SetOpen(f float64) *BarRecordCreate
- func (brc *BarRecordCreate) SetTimestamp(t time.Time) *BarRecordCreate
- func (brc *BarRecordCreate) SetTransactions(i int32) *BarRecordCreate
- func (brc *BarRecordCreate) SetVolume(f float64) *BarRecordCreate
- type BarRecordCreateBulk
- type BarRecordDelete
- type BarRecordDeleteOne
- type BarRecordEdges
- type BarRecordGroupBy
- func (brgb *BarRecordGroupBy) Aggregate(fns ...AggregateFunc) *BarRecordGroupBy
- func (s *BarRecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarRecordGroupBy) BoolX(ctx context.Context) bool
- func (s *BarRecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BarRecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BarRecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarRecordGroupBy) Float64X(ctx context.Context) float64
- func (s *BarRecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarRecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BarRecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BarRecordGroupBy) IntX(ctx context.Context) int
- func (s *BarRecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BarRecordGroupBy) IntsX(ctx context.Context) []int
- func (brgb *BarRecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *BarRecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *BarRecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BarRecordGroupBy) StringX(ctx context.Context) string
- func (s *BarRecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BarRecordGroupBy) StringsX(ctx context.Context) []string
- type BarRecordMutation
- func (m *BarRecordMutation) AddClose(f float64)
- func (m *BarRecordMutation) AddField(name string, value ent.Value) error
- func (m *BarRecordMutation) AddHigh(f float64)
- func (m *BarRecordMutation) AddLow(f float64)
- func (m *BarRecordMutation) AddOpen(f float64)
- func (m *BarRecordMutation) AddTransactions(i int32)
- func (m *BarRecordMutation) AddVolume(f float64)
- func (m *BarRecordMutation) AddedClose() (r float64, exists bool)
- func (m *BarRecordMutation) AddedEdges() []string
- func (m *BarRecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *BarRecordMutation) AddedFields() []string
- func (m *BarRecordMutation) AddedHigh() (r float64, exists bool)
- func (m *BarRecordMutation) AddedIDs(name string) []ent.Value
- func (m *BarRecordMutation) AddedLow() (r float64, exists bool)
- func (m *BarRecordMutation) AddedOpen() (r float64, exists bool)
- func (m *BarRecordMutation) AddedTransactions() (r int32, exists bool)
- func (m *BarRecordMutation) AddedVolume() (r float64, exists bool)
- func (m *BarRecordMutation) ClearEdge(name string) error
- func (m *BarRecordMutation) ClearField(name string) error
- func (m *BarRecordMutation) ClearGroup()
- func (m *BarRecordMutation) ClearedEdges() []string
- func (m *BarRecordMutation) ClearedFields() []string
- func (m BarRecordMutation) Client() *Client
- func (m *BarRecordMutation) Close() (r float64, exists bool)
- func (m *BarRecordMutation) EdgeCleared(name string) bool
- func (m *BarRecordMutation) Field(name string) (ent.Value, bool)
- func (m *BarRecordMutation) FieldCleared(name string) bool
- func (m *BarRecordMutation) Fields() []string
- func (m *BarRecordMutation) GroupCleared() bool
- func (m *BarRecordMutation) GroupID() (id int, exists bool)
- func (m *BarRecordMutation) GroupIDs() (ids []int)
- func (m *BarRecordMutation) High() (r float64, exists bool)
- func (m *BarRecordMutation) ID() (id int, exists bool)
- func (m *BarRecordMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BarRecordMutation) Low() (r float64, exists bool)
- func (m *BarRecordMutation) OldClose(ctx context.Context) (v float64, err error)
- func (m *BarRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BarRecordMutation) OldHigh(ctx context.Context) (v float64, err error)
- func (m *BarRecordMutation) OldLow(ctx context.Context) (v float64, err error)
- func (m *BarRecordMutation) OldOpen(ctx context.Context) (v float64, err error)
- func (m *BarRecordMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *BarRecordMutation) OldTransactions(ctx context.Context) (v int32, err error)
- func (m *BarRecordMutation) OldVolume(ctx context.Context) (v float64, err error)
- func (m *BarRecordMutation) Op() Op
- func (m *BarRecordMutation) Open() (r float64, exists bool)
- func (m *BarRecordMutation) RemovedEdges() []string
- func (m *BarRecordMutation) RemovedIDs(name string) []ent.Value
- func (m *BarRecordMutation) ResetClose()
- func (m *BarRecordMutation) ResetEdge(name string) error
- func (m *BarRecordMutation) ResetField(name string) error
- func (m *BarRecordMutation) ResetGroup()
- func (m *BarRecordMutation) ResetHigh()
- func (m *BarRecordMutation) ResetLow()
- func (m *BarRecordMutation) ResetOpen()
- func (m *BarRecordMutation) ResetTimestamp()
- func (m *BarRecordMutation) ResetTransactions()
- func (m *BarRecordMutation) ResetVolume()
- func (m *BarRecordMutation) SetClose(f float64)
- func (m *BarRecordMutation) SetField(name string, value ent.Value) error
- func (m *BarRecordMutation) SetGroupID(id int)
- func (m *BarRecordMutation) SetHigh(f float64)
- func (m *BarRecordMutation) SetLow(f float64)
- func (m *BarRecordMutation) SetOp(op Op)
- func (m *BarRecordMutation) SetOpen(f float64)
- func (m *BarRecordMutation) SetTimestamp(t time.Time)
- func (m *BarRecordMutation) SetTransactions(i int32)
- func (m *BarRecordMutation) SetVolume(f float64)
- func (m *BarRecordMutation) Timestamp() (r time.Time, exists bool)
- func (m *BarRecordMutation) Transactions() (r int32, exists bool)
- func (m BarRecordMutation) Tx() (*Tx, error)
- func (m *BarRecordMutation) Type() string
- func (m *BarRecordMutation) Volume() (r float64, exists bool)
- func (m *BarRecordMutation) Where(ps ...predicate.BarRecord)
- func (m *BarRecordMutation) WhereP(ps ...func(*sql.Selector))
- type BarRecordQuery
- func (brq *BarRecordQuery) Aggregate(fns ...AggregateFunc) *BarRecordSelect
- func (brq *BarRecordQuery) All(ctx context.Context) ([]*BarRecord, error)
- func (brq *BarRecordQuery) AllX(ctx context.Context) []*BarRecord
- func (brq *BarRecordQuery) Clone() *BarRecordQuery
- func (brq *BarRecordQuery) Count(ctx context.Context) (int, error)
- func (brq *BarRecordQuery) CountX(ctx context.Context) int
- func (brq *BarRecordQuery) Exist(ctx context.Context) (bool, error)
- func (brq *BarRecordQuery) ExistX(ctx context.Context) bool
- func (brq *BarRecordQuery) First(ctx context.Context) (*BarRecord, error)
- func (brq *BarRecordQuery) FirstID(ctx context.Context) (id int, err error)
- func (brq *BarRecordQuery) FirstIDX(ctx context.Context) int
- func (brq *BarRecordQuery) FirstX(ctx context.Context) *BarRecord
- func (brq *BarRecordQuery) GroupBy(field string, fields ...string) *BarRecordGroupBy
- func (brq *BarRecordQuery) IDs(ctx context.Context) ([]int, error)
- func (brq *BarRecordQuery) IDsX(ctx context.Context) []int
- func (brq *BarRecordQuery) Limit(limit int) *BarRecordQuery
- func (brq *BarRecordQuery) Offset(offset int) *BarRecordQuery
- func (brq *BarRecordQuery) Only(ctx context.Context) (*BarRecord, error)
- func (brq *BarRecordQuery) OnlyID(ctx context.Context) (id int, err error)
- func (brq *BarRecordQuery) OnlyIDX(ctx context.Context) int
- func (brq *BarRecordQuery) OnlyX(ctx context.Context) *BarRecord
- func (brq *BarRecordQuery) Order(o ...OrderFunc) *BarRecordQuery
- func (brq *BarRecordQuery) QueryGroup() *BarGroupQuery
- func (brq *BarRecordQuery) Select(fields ...string) *BarRecordSelect
- func (brq *BarRecordQuery) Unique(unique bool) *BarRecordQuery
- func (brq *BarRecordQuery) Where(ps ...predicate.BarRecord) *BarRecordQuery
- func (brq *BarRecordQuery) WithGroup(opts ...func(*BarGroupQuery)) *BarRecordQuery
- type BarRecordSelect
- func (brs *BarRecordSelect) Aggregate(fns ...AggregateFunc) *BarRecordSelect
- func (s *BarRecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarRecordSelect) BoolX(ctx context.Context) bool
- func (s *BarRecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BarRecordSelect) BoolsX(ctx context.Context) []bool
- func (s *BarRecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarRecordSelect) Float64X(ctx context.Context) float64
- func (s *BarRecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarRecordSelect) Float64sX(ctx context.Context) []float64
- func (s *BarRecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BarRecordSelect) IntX(ctx context.Context) int
- func (s *BarRecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BarRecordSelect) IntsX(ctx context.Context) []int
- func (brs *BarRecordSelect) Scan(ctx context.Context, v any) error
- func (s *BarRecordSelect) ScanX(ctx context.Context, v any)
- func (s *BarRecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *BarRecordSelect) StringX(ctx context.Context) string
- func (s *BarRecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BarRecordSelect) StringsX(ctx context.Context) []string
- type BarRecordUpdate
- func (bru *BarRecordUpdate) AddClose(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) AddHigh(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) AddLow(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) AddOpen(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) AddTransactions(i int32) *BarRecordUpdate
- func (bru *BarRecordUpdate) AddVolume(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) ClearGroup() *BarRecordUpdate
- func (bru *BarRecordUpdate) Exec(ctx context.Context) error
- func (bru *BarRecordUpdate) ExecX(ctx context.Context)
- func (bru *BarRecordUpdate) Mutation() *BarRecordMutation
- func (bru *BarRecordUpdate) Save(ctx context.Context) (int, error)
- func (bru *BarRecordUpdate) SaveX(ctx context.Context) int
- func (bru *BarRecordUpdate) SetClose(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetGroup(b *BarGroup) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetGroupID(id int) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetHigh(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetLow(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetNillableGroupID(id *int) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetOpen(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetTimestamp(t time.Time) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetTransactions(i int32) *BarRecordUpdate
- func (bru *BarRecordUpdate) SetVolume(f float64) *BarRecordUpdate
- func (bru *BarRecordUpdate) Where(ps ...predicate.BarRecord) *BarRecordUpdate
- type BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddClose(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddHigh(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddLow(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddOpen(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddTransactions(i int32) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) AddVolume(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) ClearGroup() *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) Exec(ctx context.Context) error
- func (bruo *BarRecordUpdateOne) ExecX(ctx context.Context)
- func (bruo *BarRecordUpdateOne) Mutation() *BarRecordMutation
- func (bruo *BarRecordUpdateOne) Save(ctx context.Context) (*BarRecord, error)
- func (bruo *BarRecordUpdateOne) SaveX(ctx context.Context) *BarRecord
- func (bruo *BarRecordUpdateOne) Select(field string, fields ...string) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetClose(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetGroup(b *BarGroup) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetGroupID(id int) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetHigh(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetLow(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetNillableGroupID(id *int) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetOpen(f float64) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetTimestamp(t time.Time) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetTransactions(i int32) *BarRecordUpdateOne
- func (bruo *BarRecordUpdateOne) SetVolume(f float64) *BarRecordUpdateOne
- type BarRecords
- type BarTimeRange
- type BarTimeRangeClient
- func (c *BarTimeRangeClient) Create() *BarTimeRangeCreate
- func (c *BarTimeRangeClient) CreateBulk(builders ...*BarTimeRangeCreate) *BarTimeRangeCreateBulk
- func (c *BarTimeRangeClient) Delete() *BarTimeRangeDelete
- func (c *BarTimeRangeClient) DeleteOne(btr *BarTimeRange) *BarTimeRangeDeleteOne
- func (c *BarTimeRangeClient) DeleteOneID(id int) *BarTimeRangeDeleteOne
- func (c *BarTimeRangeClient) Get(ctx context.Context, id int) (*BarTimeRange, error)
- func (c *BarTimeRangeClient) GetX(ctx context.Context, id int) *BarTimeRange
- func (c *BarTimeRangeClient) Hooks() []Hook
- func (c *BarTimeRangeClient) Intercept(interceptors ...Interceptor)
- func (c *BarTimeRangeClient) Interceptors() []Interceptor
- func (c *BarTimeRangeClient) Query() *BarTimeRangeQuery
- func (c *BarTimeRangeClient) QueryGroups(btr *BarTimeRange) *BarGroupQuery
- func (c *BarTimeRangeClient) QueryInterval(btr *BarTimeRange) *IntervalQuery
- func (c *BarTimeRangeClient) Update() *BarTimeRangeUpdate
- func (c *BarTimeRangeClient) UpdateOne(btr *BarTimeRange) *BarTimeRangeUpdateOne
- func (c *BarTimeRangeClient) UpdateOneID(id int) *BarTimeRangeUpdateOne
- func (c *BarTimeRangeClient) Use(hooks ...Hook)
- type BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) AddGroupIDs(ids ...int) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) AddGroups(b ...*BarGroup) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) Exec(ctx context.Context) error
- func (btrc *BarTimeRangeCreate) ExecX(ctx context.Context)
- func (btrc *BarTimeRangeCreate) Mutation() *BarTimeRangeMutation
- func (btrc *BarTimeRangeCreate) Save(ctx context.Context) (*BarTimeRange, error)
- func (btrc *BarTimeRangeCreate) SaveX(ctx context.Context) *BarTimeRange
- func (btrc *BarTimeRangeCreate) SetCount(i int) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetEnd(t time.Time) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetInterval(i *Interval) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetIntervalID(i int) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetNillableCount(i *int) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetNillableUpdateTime(t *time.Time) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetStart(t time.Time) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetStatus(b bartimerange.Status) *BarTimeRangeCreate
- func (btrc *BarTimeRangeCreate) SetUpdateTime(t time.Time) *BarTimeRangeCreate
- type BarTimeRangeCreateBulk
- func (btrcb *BarTimeRangeCreateBulk) Exec(ctx context.Context) error
- func (btrcb *BarTimeRangeCreateBulk) ExecX(ctx context.Context)
- func (btrcb *BarTimeRangeCreateBulk) Save(ctx context.Context) ([]*BarTimeRange, error)
- func (btrcb *BarTimeRangeCreateBulk) SaveX(ctx context.Context) []*BarTimeRange
- type BarTimeRangeDelete
- type BarTimeRangeDeleteOne
- type BarTimeRangeEdges
- type BarTimeRangeGroupBy
- func (btrgb *BarTimeRangeGroupBy) Aggregate(fns ...AggregateFunc) *BarTimeRangeGroupBy
- func (s *BarTimeRangeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarTimeRangeGroupBy) BoolX(ctx context.Context) bool
- func (s *BarTimeRangeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BarTimeRangeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BarTimeRangeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarTimeRangeGroupBy) Float64X(ctx context.Context) float64
- func (s *BarTimeRangeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarTimeRangeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BarTimeRangeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BarTimeRangeGroupBy) IntX(ctx context.Context) int
- func (s *BarTimeRangeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BarTimeRangeGroupBy) IntsX(ctx context.Context) []int
- func (btrgb *BarTimeRangeGroupBy) Scan(ctx context.Context, v any) error
- func (s *BarTimeRangeGroupBy) ScanX(ctx context.Context, v any)
- func (s *BarTimeRangeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BarTimeRangeGroupBy) StringX(ctx context.Context) string
- func (s *BarTimeRangeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BarTimeRangeGroupBy) StringsX(ctx context.Context) []string
- type BarTimeRangeMutation
- func (m *BarTimeRangeMutation) AddCount(i int)
- func (m *BarTimeRangeMutation) AddField(name string, value ent.Value) error
- func (m *BarTimeRangeMutation) AddGroupIDs(ids ...int)
- func (m *BarTimeRangeMutation) AddedCount() (r int, exists bool)
- func (m *BarTimeRangeMutation) AddedEdges() []string
- func (m *BarTimeRangeMutation) AddedField(name string) (ent.Value, bool)
- func (m *BarTimeRangeMutation) AddedFields() []string
- func (m *BarTimeRangeMutation) AddedIDs(name string) []ent.Value
- func (m *BarTimeRangeMutation) ClearEdge(name string) error
- func (m *BarTimeRangeMutation) ClearField(name string) error
- func (m *BarTimeRangeMutation) ClearGroups()
- func (m *BarTimeRangeMutation) ClearInterval()
- func (m *BarTimeRangeMutation) ClearedEdges() []string
- func (m *BarTimeRangeMutation) ClearedFields() []string
- func (m BarTimeRangeMutation) Client() *Client
- func (m *BarTimeRangeMutation) Count() (r int, exists bool)
- func (m *BarTimeRangeMutation) EdgeCleared(name string) bool
- func (m *BarTimeRangeMutation) End() (r time.Time, exists bool)
- func (m *BarTimeRangeMutation) Field(name string) (ent.Value, bool)
- func (m *BarTimeRangeMutation) FieldCleared(name string) bool
- func (m *BarTimeRangeMutation) Fields() []string
- func (m *BarTimeRangeMutation) GroupsCleared() bool
- func (m *BarTimeRangeMutation) GroupsIDs() (ids []int)
- func (m *BarTimeRangeMutation) ID() (id int, exists bool)
- func (m *BarTimeRangeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BarTimeRangeMutation) IntervalCleared() bool
- func (m *BarTimeRangeMutation) IntervalID() (r int, exists bool)
- func (m *BarTimeRangeMutation) IntervalIDs() (ids []int)
- func (m *BarTimeRangeMutation) OldCount(ctx context.Context) (v int, err error)
- func (m *BarTimeRangeMutation) OldEnd(ctx context.Context) (v time.Time, err error)
- func (m *BarTimeRangeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BarTimeRangeMutation) OldIntervalID(ctx context.Context) (v int, err error)
- func (m *BarTimeRangeMutation) OldStart(ctx context.Context) (v time.Time, err error)
- func (m *BarTimeRangeMutation) OldStatus(ctx context.Context) (v bartimerange.Status, err error)
- func (m *BarTimeRangeMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *BarTimeRangeMutation) Op() Op
- func (m *BarTimeRangeMutation) RemoveGroupIDs(ids ...int)
- func (m *BarTimeRangeMutation) RemovedEdges() []string
- func (m *BarTimeRangeMutation) RemovedGroupsIDs() (ids []int)
- func (m *BarTimeRangeMutation) RemovedIDs(name string) []ent.Value
- func (m *BarTimeRangeMutation) ResetCount()
- func (m *BarTimeRangeMutation) ResetEdge(name string) error
- func (m *BarTimeRangeMutation) ResetEnd()
- func (m *BarTimeRangeMutation) ResetField(name string) error
- func (m *BarTimeRangeMutation) ResetGroups()
- func (m *BarTimeRangeMutation) ResetInterval()
- func (m *BarTimeRangeMutation) ResetIntervalID()
- func (m *BarTimeRangeMutation) ResetStart()
- func (m *BarTimeRangeMutation) ResetStatus()
- func (m *BarTimeRangeMutation) ResetUpdateTime()
- func (m *BarTimeRangeMutation) SetCount(i int)
- func (m *BarTimeRangeMutation) SetEnd(t time.Time)
- func (m *BarTimeRangeMutation) SetField(name string, value ent.Value) error
- func (m *BarTimeRangeMutation) SetIntervalID(i int)
- func (m *BarTimeRangeMutation) SetOp(op Op)
- func (m *BarTimeRangeMutation) SetStart(t time.Time)
- func (m *BarTimeRangeMutation) SetStatus(b bartimerange.Status)
- func (m *BarTimeRangeMutation) SetUpdateTime(t time.Time)
- func (m *BarTimeRangeMutation) Start() (r time.Time, exists bool)
- func (m *BarTimeRangeMutation) Status() (r bartimerange.Status, exists bool)
- func (m BarTimeRangeMutation) Tx() (*Tx, error)
- func (m *BarTimeRangeMutation) Type() string
- func (m *BarTimeRangeMutation) UpdateTime() (r time.Time, exists bool)
- func (m *BarTimeRangeMutation) Where(ps ...predicate.BarTimeRange)
- func (m *BarTimeRangeMutation) WhereP(ps ...func(*sql.Selector))
- type BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) Aggregate(fns ...AggregateFunc) *BarTimeRangeSelect
- func (btrq *BarTimeRangeQuery) All(ctx context.Context) ([]*BarTimeRange, error)
- func (btrq *BarTimeRangeQuery) AllX(ctx context.Context) []*BarTimeRange
- func (btrq *BarTimeRangeQuery) Clone() *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) Count(ctx context.Context) (int, error)
- func (btrq *BarTimeRangeQuery) CountX(ctx context.Context) int
- func (btrq *BarTimeRangeQuery) Exist(ctx context.Context) (bool, error)
- func (btrq *BarTimeRangeQuery) ExistX(ctx context.Context) bool
- func (btrq *BarTimeRangeQuery) First(ctx context.Context) (*BarTimeRange, error)
- func (btrq *BarTimeRangeQuery) FirstID(ctx context.Context) (id int, err error)
- func (btrq *BarTimeRangeQuery) FirstIDX(ctx context.Context) int
- func (btrq *BarTimeRangeQuery) FirstX(ctx context.Context) *BarTimeRange
- func (btrq *BarTimeRangeQuery) GroupBy(field string, fields ...string) *BarTimeRangeGroupBy
- func (btrq *BarTimeRangeQuery) IDs(ctx context.Context) ([]int, error)
- func (btrq *BarTimeRangeQuery) IDsX(ctx context.Context) []int
- func (btrq *BarTimeRangeQuery) Limit(limit int) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) Offset(offset int) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) Only(ctx context.Context) (*BarTimeRange, error)
- func (btrq *BarTimeRangeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (btrq *BarTimeRangeQuery) OnlyIDX(ctx context.Context) int
- func (btrq *BarTimeRangeQuery) OnlyX(ctx context.Context) *BarTimeRange
- func (btrq *BarTimeRangeQuery) Order(o ...OrderFunc) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) QueryGroups() *BarGroupQuery
- func (btrq *BarTimeRangeQuery) QueryInterval() *IntervalQuery
- func (btrq *BarTimeRangeQuery) Select(fields ...string) *BarTimeRangeSelect
- func (btrq *BarTimeRangeQuery) Unique(unique bool) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) Where(ps ...predicate.BarTimeRange) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) WithGroups(opts ...func(*BarGroupQuery)) *BarTimeRangeQuery
- func (btrq *BarTimeRangeQuery) WithInterval(opts ...func(*IntervalQuery)) *BarTimeRangeQuery
- type BarTimeRangeSelect
- func (btrs *BarTimeRangeSelect) Aggregate(fns ...AggregateFunc) *BarTimeRangeSelect
- func (s *BarTimeRangeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BarTimeRangeSelect) BoolX(ctx context.Context) bool
- func (s *BarTimeRangeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BarTimeRangeSelect) BoolsX(ctx context.Context) []bool
- func (s *BarTimeRangeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BarTimeRangeSelect) Float64X(ctx context.Context) float64
- func (s *BarTimeRangeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BarTimeRangeSelect) Float64sX(ctx context.Context) []float64
- func (s *BarTimeRangeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BarTimeRangeSelect) IntX(ctx context.Context) int
- func (s *BarTimeRangeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BarTimeRangeSelect) IntsX(ctx context.Context) []int
- func (btrs *BarTimeRangeSelect) Scan(ctx context.Context, v any) error
- func (s *BarTimeRangeSelect) ScanX(ctx context.Context, v any)
- func (s *BarTimeRangeSelect) String(ctx context.Context) (_ string, err error)
- func (s *BarTimeRangeSelect) StringX(ctx context.Context) string
- func (s *BarTimeRangeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BarTimeRangeSelect) StringsX(ctx context.Context) []string
- type BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) AddCount(i int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) AddGroupIDs(ids ...int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) AddGroups(b ...*BarGroup) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) ClearGroups() *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) ClearInterval() *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) Exec(ctx context.Context) error
- func (btru *BarTimeRangeUpdate) ExecX(ctx context.Context)
- func (btru *BarTimeRangeUpdate) Mutation() *BarTimeRangeMutation
- func (btru *BarTimeRangeUpdate) RemoveGroupIDs(ids ...int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) RemoveGroups(b ...*BarGroup) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) Save(ctx context.Context) (int, error)
- func (btru *BarTimeRangeUpdate) SaveX(ctx context.Context) int
- func (btru *BarTimeRangeUpdate) SetCount(i int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetEnd(t time.Time) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetInterval(i *Interval) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetIntervalID(i int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetNillableCount(i *int) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetStart(t time.Time) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetStatus(b bartimerange.Status) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) SetUpdateTime(t time.Time) *BarTimeRangeUpdate
- func (btru *BarTimeRangeUpdate) Where(ps ...predicate.BarTimeRange) *BarTimeRangeUpdate
- type BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) AddCount(i int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) AddGroupIDs(ids ...int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) AddGroups(b ...*BarGroup) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) ClearGroups() *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) ClearInterval() *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) Exec(ctx context.Context) error
- func (btruo *BarTimeRangeUpdateOne) ExecX(ctx context.Context)
- func (btruo *BarTimeRangeUpdateOne) Mutation() *BarTimeRangeMutation
- func (btruo *BarTimeRangeUpdateOne) RemoveGroupIDs(ids ...int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) RemoveGroups(b ...*BarGroup) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) Save(ctx context.Context) (*BarTimeRange, error)
- func (btruo *BarTimeRangeUpdateOne) SaveX(ctx context.Context) *BarTimeRange
- func (btruo *BarTimeRangeUpdateOne) Select(field string, fields ...string) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetCount(i int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetEnd(t time.Time) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetInterval(i *Interval) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetIntervalID(i int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetNillableCount(i *int) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetStart(t time.Time) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetStatus(b bartimerange.Status) *BarTimeRangeUpdateOne
- func (btruo *BarTimeRangeUpdateOne) SetUpdateTime(t time.Time) *BarTimeRangeUpdateOne
- type BarTimeRanges
- 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 DataSource
- type DataSourceClient
- func (c *DataSourceClient) Create() *DataSourceCreate
- func (c *DataSourceClient) CreateBulk(builders ...*DataSourceCreate) *DataSourceCreateBulk
- func (c *DataSourceClient) Delete() *DataSourceDelete
- func (c *DataSourceClient) DeleteOne(ds *DataSource) *DataSourceDeleteOne
- func (c *DataSourceClient) DeleteOneID(id int) *DataSourceDeleteOne
- func (c *DataSourceClient) Get(ctx context.Context, id int) (*DataSource, error)
- func (c *DataSourceClient) GetX(ctx context.Context, id int) *DataSource
- func (c *DataSourceClient) Hooks() []Hook
- func (c *DataSourceClient) Intercept(interceptors ...Interceptor)
- func (c *DataSourceClient) Interceptors() []Interceptor
- func (c *DataSourceClient) Query() *DataSourceQuery
- func (c *DataSourceClient) QueryIntervals(ds *DataSource) *IntervalQuery
- func (c *DataSourceClient) Update() *DataSourceUpdate
- func (c *DataSourceClient) UpdateOne(ds *DataSource) *DataSourceUpdateOne
- func (c *DataSourceClient) UpdateOneID(id int) *DataSourceUpdateOne
- func (c *DataSourceClient) Use(hooks ...Hook)
- type DataSourceCreate
- func (dsc *DataSourceCreate) AddIntervalIDs(ids ...int) *DataSourceCreate
- func (dsc *DataSourceCreate) AddIntervals(i ...*Interval) *DataSourceCreate
- func (dsc *DataSourceCreate) Exec(ctx context.Context) error
- func (dsc *DataSourceCreate) ExecX(ctx context.Context)
- func (dsc *DataSourceCreate) Mutation() *DataSourceMutation
- func (dsc *DataSourceCreate) Save(ctx context.Context) (*DataSource, error)
- func (dsc *DataSourceCreate) SaveX(ctx context.Context) *DataSource
- func (dsc *DataSourceCreate) SetAddress(s string) *DataSourceCreate
- func (dsc *DataSourceCreate) SetName(s string) *DataSourceCreate
- func (dsc *DataSourceCreate) SetNillableAddress(s *string) *DataSourceCreate
- type DataSourceCreateBulk
- type DataSourceDelete
- type DataSourceDeleteOne
- type DataSourceEdges
- type DataSourceGroupBy
- func (dsgb *DataSourceGroupBy) Aggregate(fns ...AggregateFunc) *DataSourceGroupBy
- func (s *DataSourceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DataSourceGroupBy) BoolX(ctx context.Context) bool
- func (s *DataSourceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DataSourceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DataSourceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DataSourceGroupBy) Float64X(ctx context.Context) float64
- func (s *DataSourceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DataSourceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DataSourceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DataSourceGroupBy) IntX(ctx context.Context) int
- func (s *DataSourceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DataSourceGroupBy) IntsX(ctx context.Context) []int
- func (dsgb *DataSourceGroupBy) Scan(ctx context.Context, v any) error
- func (s *DataSourceGroupBy) ScanX(ctx context.Context, v any)
- func (s *DataSourceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DataSourceGroupBy) StringX(ctx context.Context) string
- func (s *DataSourceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DataSourceGroupBy) StringsX(ctx context.Context) []string
- type DataSourceMutation
- func (m *DataSourceMutation) AddField(name string, value ent.Value) error
- func (m *DataSourceMutation) AddIntervalIDs(ids ...int)
- func (m *DataSourceMutation) AddedEdges() []string
- func (m *DataSourceMutation) AddedField(name string) (ent.Value, bool)
- func (m *DataSourceMutation) AddedFields() []string
- func (m *DataSourceMutation) AddedIDs(name string) []ent.Value
- func (m *DataSourceMutation) Address() (r string, exists bool)
- func (m *DataSourceMutation) ClearEdge(name string) error
- func (m *DataSourceMutation) ClearField(name string) error
- func (m *DataSourceMutation) ClearIntervals()
- func (m *DataSourceMutation) ClearedEdges() []string
- func (m *DataSourceMutation) ClearedFields() []string
- func (m DataSourceMutation) Client() *Client
- func (m *DataSourceMutation) EdgeCleared(name string) bool
- func (m *DataSourceMutation) Field(name string) (ent.Value, bool)
- func (m *DataSourceMutation) FieldCleared(name string) bool
- func (m *DataSourceMutation) Fields() []string
- func (m *DataSourceMutation) ID() (id int, exists bool)
- func (m *DataSourceMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DataSourceMutation) IntervalsCleared() bool
- func (m *DataSourceMutation) IntervalsIDs() (ids []int)
- func (m *DataSourceMutation) Name() (r string, exists bool)
- func (m *DataSourceMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *DataSourceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DataSourceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DataSourceMutation) Op() Op
- func (m *DataSourceMutation) RemoveIntervalIDs(ids ...int)
- func (m *DataSourceMutation) RemovedEdges() []string
- func (m *DataSourceMutation) RemovedIDs(name string) []ent.Value
- func (m *DataSourceMutation) RemovedIntervalsIDs() (ids []int)
- func (m *DataSourceMutation) ResetAddress()
- func (m *DataSourceMutation) ResetEdge(name string) error
- func (m *DataSourceMutation) ResetField(name string) error
- func (m *DataSourceMutation) ResetIntervals()
- func (m *DataSourceMutation) ResetName()
- func (m *DataSourceMutation) SetAddress(s string)
- func (m *DataSourceMutation) SetField(name string, value ent.Value) error
- func (m *DataSourceMutation) SetName(s string)
- func (m *DataSourceMutation) SetOp(op Op)
- func (m DataSourceMutation) Tx() (*Tx, error)
- func (m *DataSourceMutation) Type() string
- func (m *DataSourceMutation) Where(ps ...predicate.DataSource)
- func (m *DataSourceMutation) WhereP(ps ...func(*sql.Selector))
- type DataSourceQuery
- func (dsq *DataSourceQuery) Aggregate(fns ...AggregateFunc) *DataSourceSelect
- func (dsq *DataSourceQuery) All(ctx context.Context) ([]*DataSource, error)
- func (dsq *DataSourceQuery) AllX(ctx context.Context) []*DataSource
- func (dsq *DataSourceQuery) Clone() *DataSourceQuery
- func (dsq *DataSourceQuery) Count(ctx context.Context) (int, error)
- func (dsq *DataSourceQuery) CountX(ctx context.Context) int
- func (dsq *DataSourceQuery) Exist(ctx context.Context) (bool, error)
- func (dsq *DataSourceQuery) ExistX(ctx context.Context) bool
- func (dsq *DataSourceQuery) First(ctx context.Context) (*DataSource, error)
- func (dsq *DataSourceQuery) FirstID(ctx context.Context) (id int, err error)
- func (dsq *DataSourceQuery) FirstIDX(ctx context.Context) int
- func (dsq *DataSourceQuery) FirstX(ctx context.Context) *DataSource
- func (dsq *DataSourceQuery) GroupBy(field string, fields ...string) *DataSourceGroupBy
- func (dsq *DataSourceQuery) IDs(ctx context.Context) ([]int, error)
- func (dsq *DataSourceQuery) IDsX(ctx context.Context) []int
- func (dsq *DataSourceQuery) Limit(limit int) *DataSourceQuery
- func (dsq *DataSourceQuery) Offset(offset int) *DataSourceQuery
- func (dsq *DataSourceQuery) Only(ctx context.Context) (*DataSource, error)
- func (dsq *DataSourceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dsq *DataSourceQuery) OnlyIDX(ctx context.Context) int
- func (dsq *DataSourceQuery) OnlyX(ctx context.Context) *DataSource
- func (dsq *DataSourceQuery) Order(o ...OrderFunc) *DataSourceQuery
- func (dsq *DataSourceQuery) QueryIntervals() *IntervalQuery
- func (dsq *DataSourceQuery) Select(fields ...string) *DataSourceSelect
- func (dsq *DataSourceQuery) Unique(unique bool) *DataSourceQuery
- func (dsq *DataSourceQuery) Where(ps ...predicate.DataSource) *DataSourceQuery
- func (dsq *DataSourceQuery) WithIntervals(opts ...func(*IntervalQuery)) *DataSourceQuery
- type DataSourceSelect
- func (dss *DataSourceSelect) Aggregate(fns ...AggregateFunc) *DataSourceSelect
- func (s *DataSourceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DataSourceSelect) BoolX(ctx context.Context) bool
- func (s *DataSourceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DataSourceSelect) BoolsX(ctx context.Context) []bool
- func (s *DataSourceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DataSourceSelect) Float64X(ctx context.Context) float64
- func (s *DataSourceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DataSourceSelect) Float64sX(ctx context.Context) []float64
- func (s *DataSourceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DataSourceSelect) IntX(ctx context.Context) int
- func (s *DataSourceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DataSourceSelect) IntsX(ctx context.Context) []int
- func (dss *DataSourceSelect) Scan(ctx context.Context, v any) error
- func (s *DataSourceSelect) ScanX(ctx context.Context, v any)
- func (s *DataSourceSelect) String(ctx context.Context) (_ string, err error)
- func (s *DataSourceSelect) StringX(ctx context.Context) string
- func (s *DataSourceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DataSourceSelect) StringsX(ctx context.Context) []string
- type DataSourceUpdate
- func (dsu *DataSourceUpdate) AddIntervalIDs(ids ...int) *DataSourceUpdate
- func (dsu *DataSourceUpdate) AddIntervals(i ...*Interval) *DataSourceUpdate
- func (dsu *DataSourceUpdate) ClearIntervals() *DataSourceUpdate
- func (dsu *DataSourceUpdate) Exec(ctx context.Context) error
- func (dsu *DataSourceUpdate) ExecX(ctx context.Context)
- func (dsu *DataSourceUpdate) Mutation() *DataSourceMutation
- func (dsu *DataSourceUpdate) RemoveIntervalIDs(ids ...int) *DataSourceUpdate
- func (dsu *DataSourceUpdate) RemoveIntervals(i ...*Interval) *DataSourceUpdate
- func (dsu *DataSourceUpdate) Save(ctx context.Context) (int, error)
- func (dsu *DataSourceUpdate) SaveX(ctx context.Context) int
- func (dsu *DataSourceUpdate) SetAddress(s string) *DataSourceUpdate
- func (dsu *DataSourceUpdate) SetName(s string) *DataSourceUpdate
- func (dsu *DataSourceUpdate) SetNillableAddress(s *string) *DataSourceUpdate
- func (dsu *DataSourceUpdate) Where(ps ...predicate.DataSource) *DataSourceUpdate
- type DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) AddIntervalIDs(ids ...int) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) AddIntervals(i ...*Interval) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) ClearIntervals() *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) Exec(ctx context.Context) error
- func (dsuo *DataSourceUpdateOne) ExecX(ctx context.Context)
- func (dsuo *DataSourceUpdateOne) Mutation() *DataSourceMutation
- func (dsuo *DataSourceUpdateOne) RemoveIntervalIDs(ids ...int) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) RemoveIntervals(i ...*Interval) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) Save(ctx context.Context) (*DataSource, error)
- func (dsuo *DataSourceUpdateOne) SaveX(ctx context.Context) *DataSource
- func (dsuo *DataSourceUpdateOne) Select(field string, fields ...string) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) SetAddress(s string) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) SetName(s string) *DataSourceUpdateOne
- func (dsuo *DataSourceUpdateOne) SetNillableAddress(s *string) *DataSourceUpdateOne
- type DataSources
- type Dividend
- type DividendClient
- func (c *DividendClient) Create() *DividendCreate
- func (c *DividendClient) CreateBulk(builders ...*DividendCreate) *DividendCreateBulk
- func (c *DividendClient) Delete() *DividendDelete
- func (c *DividendClient) DeleteOne(d *Dividend) *DividendDeleteOne
- func (c *DividendClient) DeleteOneID(id int) *DividendDeleteOne
- func (c *DividendClient) Get(ctx context.Context, id int) (*Dividend, error)
- func (c *DividendClient) GetX(ctx context.Context, id int) *Dividend
- func (c *DividendClient) Hooks() []Hook
- func (c *DividendClient) Intercept(interceptors ...Interceptor)
- func (c *DividendClient) Interceptors() []Interceptor
- func (c *DividendClient) Query() *DividendQuery
- func (c *DividendClient) QueryStock(d *Dividend) *EntityQuery
- func (c *DividendClient) Update() *DividendUpdate
- func (c *DividendClient) UpdateOne(d *Dividend) *DividendUpdateOne
- func (c *DividendClient) UpdateOneID(id int) *DividendUpdateOne
- func (c *DividendClient) Use(hooks ...Hook)
- type DividendCreate
- func (dc *DividendCreate) AddStock(e ...*Entity) *DividendCreate
- func (dc *DividendCreate) AddStockIDs(ids ...int) *DividendCreate
- func (dc *DividendCreate) Exec(ctx context.Context) error
- func (dc *DividendCreate) ExecX(ctx context.Context)
- func (dc *DividendCreate) Mutation() *DividendMutation
- func (dc *DividendCreate) Save(ctx context.Context) (*Dividend, error)
- func (dc *DividendCreate) SaveX(ctx context.Context) *Dividend
- func (dc *DividendCreate) SetCashAmount(f float64) *DividendCreate
- func (dc *DividendCreate) SetDeclarationDate(t time.Time) *DividendCreate
- func (dc *DividendCreate) SetDividendType(dt dividend.DividendType) *DividendCreate
- func (dc *DividendCreate) SetExDividendDate(t time.Time) *DividendCreate
- func (dc *DividendCreate) SetFrequency(i int) *DividendCreate
- func (dc *DividendCreate) SetPayDate(t time.Time) *DividendCreate
- func (dc *DividendCreate) SetRecordDate(t time.Time) *DividendCreate
- type DividendCreateBulk
- type DividendDelete
- type DividendDeleteOne
- type DividendEdges
- type DividendGroupBy
- func (dgb *DividendGroupBy) Aggregate(fns ...AggregateFunc) *DividendGroupBy
- func (s *DividendGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DividendGroupBy) BoolX(ctx context.Context) bool
- func (s *DividendGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DividendGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DividendGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DividendGroupBy) Float64X(ctx context.Context) float64
- func (s *DividendGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DividendGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DividendGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DividendGroupBy) IntX(ctx context.Context) int
- func (s *DividendGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DividendGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DividendGroupBy) Scan(ctx context.Context, v any) error
- func (s *DividendGroupBy) ScanX(ctx context.Context, v any)
- func (s *DividendGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DividendGroupBy) StringX(ctx context.Context) string
- func (s *DividendGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DividendGroupBy) StringsX(ctx context.Context) []string
- type DividendMutation
- func (m *DividendMutation) AddCashAmount(f float64)
- func (m *DividendMutation) AddField(name string, value ent.Value) error
- func (m *DividendMutation) AddFrequency(i int)
- func (m *DividendMutation) AddStockIDs(ids ...int)
- func (m *DividendMutation) AddedCashAmount() (r float64, exists bool)
- func (m *DividendMutation) AddedEdges() []string
- func (m *DividendMutation) AddedField(name string) (ent.Value, bool)
- func (m *DividendMutation) AddedFields() []string
- func (m *DividendMutation) AddedFrequency() (r int, exists bool)
- func (m *DividendMutation) AddedIDs(name string) []ent.Value
- func (m *DividendMutation) CashAmount() (r float64, exists bool)
- func (m *DividendMutation) ClearEdge(name string) error
- func (m *DividendMutation) ClearField(name string) error
- func (m *DividendMutation) ClearStock()
- func (m *DividendMutation) ClearedEdges() []string
- func (m *DividendMutation) ClearedFields() []string
- func (m DividendMutation) Client() *Client
- func (m *DividendMutation) DeclarationDate() (r time.Time, exists bool)
- func (m *DividendMutation) DividendType() (r dividend.DividendType, exists bool)
- func (m *DividendMutation) EdgeCleared(name string) bool
- func (m *DividendMutation) ExDividendDate() (r time.Time, exists bool)
- func (m *DividendMutation) Field(name string) (ent.Value, bool)
- func (m *DividendMutation) FieldCleared(name string) bool
- func (m *DividendMutation) Fields() []string
- func (m *DividendMutation) Frequency() (r int, exists bool)
- func (m *DividendMutation) ID() (id int, exists bool)
- func (m *DividendMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DividendMutation) OldCashAmount(ctx context.Context) (v float64, err error)
- func (m *DividendMutation) OldDeclarationDate(ctx context.Context) (v time.Time, err error)
- func (m *DividendMutation) OldDividendType(ctx context.Context) (v dividend.DividendType, err error)
- func (m *DividendMutation) OldExDividendDate(ctx context.Context) (v time.Time, err error)
- func (m *DividendMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DividendMutation) OldFrequency(ctx context.Context) (v int, err error)
- func (m *DividendMutation) OldPayDate(ctx context.Context) (v time.Time, err error)
- func (m *DividendMutation) OldRecordDate(ctx context.Context) (v time.Time, err error)
- func (m *DividendMutation) Op() Op
- func (m *DividendMutation) PayDate() (r time.Time, exists bool)
- func (m *DividendMutation) RecordDate() (r time.Time, exists bool)
- func (m *DividendMutation) RemoveStockIDs(ids ...int)
- func (m *DividendMutation) RemovedEdges() []string
- func (m *DividendMutation) RemovedIDs(name string) []ent.Value
- func (m *DividendMutation) RemovedStockIDs() (ids []int)
- func (m *DividendMutation) ResetCashAmount()
- func (m *DividendMutation) ResetDeclarationDate()
- func (m *DividendMutation) ResetDividendType()
- func (m *DividendMutation) ResetEdge(name string) error
- func (m *DividendMutation) ResetExDividendDate()
- func (m *DividendMutation) ResetField(name string) error
- func (m *DividendMutation) ResetFrequency()
- func (m *DividendMutation) ResetPayDate()
- func (m *DividendMutation) ResetRecordDate()
- func (m *DividendMutation) ResetStock()
- func (m *DividendMutation) SetCashAmount(f float64)
- func (m *DividendMutation) SetDeclarationDate(t time.Time)
- func (m *DividendMutation) SetDividendType(dt dividend.DividendType)
- func (m *DividendMutation) SetExDividendDate(t time.Time)
- func (m *DividendMutation) SetField(name string, value ent.Value) error
- func (m *DividendMutation) SetFrequency(i int)
- func (m *DividendMutation) SetOp(op Op)
- func (m *DividendMutation) SetPayDate(t time.Time)
- func (m *DividendMutation) SetRecordDate(t time.Time)
- func (m *DividendMutation) StockCleared() bool
- func (m *DividendMutation) StockIDs() (ids []int)
- func (m DividendMutation) Tx() (*Tx, error)
- func (m *DividendMutation) Type() string
- func (m *DividendMutation) Where(ps ...predicate.Dividend)
- func (m *DividendMutation) WhereP(ps ...func(*sql.Selector))
- type DividendQuery
- func (dq *DividendQuery) Aggregate(fns ...AggregateFunc) *DividendSelect
- func (dq *DividendQuery) All(ctx context.Context) ([]*Dividend, error)
- func (dq *DividendQuery) AllX(ctx context.Context) []*Dividend
- func (dq *DividendQuery) Clone() *DividendQuery
- func (dq *DividendQuery) Count(ctx context.Context) (int, error)
- func (dq *DividendQuery) CountX(ctx context.Context) int
- func (dq *DividendQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DividendQuery) ExistX(ctx context.Context) bool
- func (dq *DividendQuery) First(ctx context.Context) (*Dividend, error)
- func (dq *DividendQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DividendQuery) FirstIDX(ctx context.Context) int
- func (dq *DividendQuery) FirstX(ctx context.Context) *Dividend
- func (dq *DividendQuery) GroupBy(field string, fields ...string) *DividendGroupBy
- func (dq *DividendQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DividendQuery) IDsX(ctx context.Context) []int
- func (dq *DividendQuery) Limit(limit int) *DividendQuery
- func (dq *DividendQuery) Offset(offset int) *DividendQuery
- func (dq *DividendQuery) Only(ctx context.Context) (*Dividend, error)
- func (dq *DividendQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DividendQuery) OnlyIDX(ctx context.Context) int
- func (dq *DividendQuery) OnlyX(ctx context.Context) *Dividend
- func (dq *DividendQuery) Order(o ...OrderFunc) *DividendQuery
- func (dq *DividendQuery) QueryStock() *EntityQuery
- func (dq *DividendQuery) Select(fields ...string) *DividendSelect
- func (dq *DividendQuery) Unique(unique bool) *DividendQuery
- func (dq *DividendQuery) Where(ps ...predicate.Dividend) *DividendQuery
- func (dq *DividendQuery) WithStock(opts ...func(*EntityQuery)) *DividendQuery
- type DividendSelect
- func (ds *DividendSelect) Aggregate(fns ...AggregateFunc) *DividendSelect
- func (s *DividendSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DividendSelect) BoolX(ctx context.Context) bool
- func (s *DividendSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DividendSelect) BoolsX(ctx context.Context) []bool
- func (s *DividendSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DividendSelect) Float64X(ctx context.Context) float64
- func (s *DividendSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DividendSelect) Float64sX(ctx context.Context) []float64
- func (s *DividendSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DividendSelect) IntX(ctx context.Context) int
- func (s *DividendSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DividendSelect) IntsX(ctx context.Context) []int
- func (ds *DividendSelect) Scan(ctx context.Context, v any) error
- func (s *DividendSelect) ScanX(ctx context.Context, v any)
- func (s *DividendSelect) String(ctx context.Context) (_ string, err error)
- func (s *DividendSelect) StringX(ctx context.Context) string
- func (s *DividendSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DividendSelect) StringsX(ctx context.Context) []string
- type DividendUpdate
- func (du *DividendUpdate) AddCashAmount(f float64) *DividendUpdate
- func (du *DividendUpdate) AddFrequency(i int) *DividendUpdate
- func (du *DividendUpdate) AddStock(e ...*Entity) *DividendUpdate
- func (du *DividendUpdate) AddStockIDs(ids ...int) *DividendUpdate
- func (du *DividendUpdate) ClearStock() *DividendUpdate
- func (du *DividendUpdate) Exec(ctx context.Context) error
- func (du *DividendUpdate) ExecX(ctx context.Context)
- func (du *DividendUpdate) Mutation() *DividendMutation
- func (du *DividendUpdate) RemoveStock(e ...*Entity) *DividendUpdate
- func (du *DividendUpdate) RemoveStockIDs(ids ...int) *DividendUpdate
- func (du *DividendUpdate) Save(ctx context.Context) (int, error)
- func (du *DividendUpdate) SaveX(ctx context.Context) int
- func (du *DividendUpdate) SetCashAmount(f float64) *DividendUpdate
- func (du *DividendUpdate) SetDeclarationDate(t time.Time) *DividendUpdate
- func (du *DividendUpdate) SetDividendType(dt dividend.DividendType) *DividendUpdate
- func (du *DividendUpdate) SetExDividendDate(t time.Time) *DividendUpdate
- func (du *DividendUpdate) SetFrequency(i int) *DividendUpdate
- func (du *DividendUpdate) SetPayDate(t time.Time) *DividendUpdate
- func (du *DividendUpdate) SetRecordDate(t time.Time) *DividendUpdate
- func (du *DividendUpdate) Where(ps ...predicate.Dividend) *DividendUpdate
- type DividendUpdateOne
- func (duo *DividendUpdateOne) AddCashAmount(f float64) *DividendUpdateOne
- func (duo *DividendUpdateOne) AddFrequency(i int) *DividendUpdateOne
- func (duo *DividendUpdateOne) AddStock(e ...*Entity) *DividendUpdateOne
- func (duo *DividendUpdateOne) AddStockIDs(ids ...int) *DividendUpdateOne
- func (duo *DividendUpdateOne) ClearStock() *DividendUpdateOne
- func (duo *DividendUpdateOne) Exec(ctx context.Context) error
- func (duo *DividendUpdateOne) ExecX(ctx context.Context)
- func (duo *DividendUpdateOne) Mutation() *DividendMutation
- func (duo *DividendUpdateOne) RemoveStock(e ...*Entity) *DividendUpdateOne
- func (duo *DividendUpdateOne) RemoveStockIDs(ids ...int) *DividendUpdateOne
- func (duo *DividendUpdateOne) Save(ctx context.Context) (*Dividend, error)
- func (duo *DividendUpdateOne) SaveX(ctx context.Context) *Dividend
- func (duo *DividendUpdateOne) Select(field string, fields ...string) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetCashAmount(f float64) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetDeclarationDate(t time.Time) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetDividendType(dt dividend.DividendType) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetExDividendDate(t time.Time) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetFrequency(i int) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetPayDate(t time.Time) *DividendUpdateOne
- func (duo *DividendUpdateOne) SetRecordDate(t time.Time) *DividendUpdateOne
- type Dividends
- type Entities
- type Entity
- func (e *Entity) QueryDividends() *DividendQuery
- func (e *Entity) QueryExchanges() *ExchangeQuery
- func (e *Entity) QueryFinancials() *FinancialQuery
- func (e *Entity) QueryIntervals() *IntervalQuery
- func (e *Entity) QuerySplits() *SplitQuery
- func (e *Entity) String() string
- func (e *Entity) Unwrap() *Entity
- func (e *Entity) Update() *EntityUpdateOne
- type EntityClient
- func (c *EntityClient) Create() *EntityCreate
- func (c *EntityClient) CreateBulk(builders ...*EntityCreate) *EntityCreateBulk
- func (c *EntityClient) Delete() *EntityDelete
- func (c *EntityClient) DeleteOne(e *Entity) *EntityDeleteOne
- func (c *EntityClient) DeleteOneID(id int) *EntityDeleteOne
- func (c *EntityClient) Get(ctx context.Context, id int) (*Entity, error)
- func (c *EntityClient) GetX(ctx context.Context, id int) *Entity
- func (c *EntityClient) Hooks() []Hook
- func (c *EntityClient) Intercept(interceptors ...Interceptor)
- func (c *EntityClient) Interceptors() []Interceptor
- func (c *EntityClient) Query() *EntityQuery
- func (c *EntityClient) QueryDividends(e *Entity) *DividendQuery
- func (c *EntityClient) QueryExchanges(e *Entity) *ExchangeQuery
- func (c *EntityClient) QueryFinancials(e *Entity) *FinancialQuery
- func (c *EntityClient) QueryIntervals(e *Entity) *IntervalQuery
- func (c *EntityClient) QuerySplits(e *Entity) *SplitQuery
- func (c *EntityClient) Update() *EntityUpdate
- func (c *EntityClient) UpdateOne(e *Entity) *EntityUpdateOne
- func (c *EntityClient) UpdateOneID(id int) *EntityUpdateOne
- func (c *EntityClient) Use(hooks ...Hook)
- type EntityCreate
- func (ec *EntityCreate) AddDividendIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) AddDividends(d ...*Dividend) *EntityCreate
- func (ec *EntityCreate) AddExchangeIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) AddExchanges(e ...*Exchange) *EntityCreate
- func (ec *EntityCreate) AddFinancialIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) AddFinancials(f ...*Financial) *EntityCreate
- func (ec *EntityCreate) AddIntervalIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) AddIntervals(i ...*Interval) *EntityCreate
- func (ec *EntityCreate) AddSplitIDs(ids ...int) *EntityCreate
- func (ec *EntityCreate) AddSplits(s ...*Split) *EntityCreate
- func (ec *EntityCreate) Exec(ctx context.Context) error
- func (ec *EntityCreate) ExecX(ctx context.Context)
- func (ec *EntityCreate) Mutation() *EntityMutation
- func (ec *EntityCreate) Save(ctx context.Context) (*Entity, error)
- func (ec *EntityCreate) SaveX(ctx context.Context) *Entity
- func (ec *EntityCreate) SetActive(b bool) *EntityCreate
- func (ec *EntityCreate) SetDelisted(t time.Time) *EntityCreate
- func (ec *EntityCreate) SetDescription(s string) *EntityCreate
- func (ec *EntityCreate) SetListDate(t time.Time) *EntityCreate
- func (ec *EntityCreate) SetName(s string) *EntityCreate
- func (ec *EntityCreate) SetNillableDelisted(t *time.Time) *EntityCreate
- func (ec *EntityCreate) SetTicker(s string) *EntityCreate
- type EntityCreateBulk
- type EntityDelete
- type EntityDeleteOne
- type EntityEdges
- type EntityGroupBy
- func (egb *EntityGroupBy) Aggregate(fns ...AggregateFunc) *EntityGroupBy
- func (s *EntityGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntityGroupBy) BoolX(ctx context.Context) bool
- func (s *EntityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EntityGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EntityGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntityGroupBy) Float64X(ctx context.Context) float64
- func (s *EntityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntityGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EntityGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EntityGroupBy) IntX(ctx context.Context) int
- func (s *EntityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EntityGroupBy) IntsX(ctx context.Context) []int
- func (egb *EntityGroupBy) Scan(ctx context.Context, v any) error
- func (s *EntityGroupBy) ScanX(ctx context.Context, v any)
- func (s *EntityGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EntityGroupBy) StringX(ctx context.Context) string
- func (s *EntityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EntityGroupBy) StringsX(ctx context.Context) []string
- type EntityMutation
- func (m *EntityMutation) Active() (r bool, exists bool)
- func (m *EntityMutation) AddDividendIDs(ids ...int)
- func (m *EntityMutation) AddExchangeIDs(ids ...int)
- func (m *EntityMutation) AddField(name string, value ent.Value) error
- func (m *EntityMutation) AddFinancialIDs(ids ...int)
- func (m *EntityMutation) AddIntervalIDs(ids ...int)
- func (m *EntityMutation) AddSplitIDs(ids ...int)
- func (m *EntityMutation) AddedEdges() []string
- func (m *EntityMutation) AddedField(name string) (ent.Value, bool)
- func (m *EntityMutation) AddedFields() []string
- func (m *EntityMutation) AddedIDs(name string) []ent.Value
- func (m *EntityMutation) ClearDelisted()
- func (m *EntityMutation) ClearDividends()
- func (m *EntityMutation) ClearEdge(name string) error
- func (m *EntityMutation) ClearExchanges()
- func (m *EntityMutation) ClearField(name string) error
- func (m *EntityMutation) ClearFinancials()
- func (m *EntityMutation) ClearIntervals()
- func (m *EntityMutation) ClearSplits()
- func (m *EntityMutation) ClearedEdges() []string
- func (m *EntityMutation) ClearedFields() []string
- func (m EntityMutation) Client() *Client
- func (m *EntityMutation) Delisted() (r time.Time, exists bool)
- func (m *EntityMutation) DelistedCleared() bool
- func (m *EntityMutation) Description() (r string, exists bool)
- func (m *EntityMutation) DividendsCleared() bool
- func (m *EntityMutation) DividendsIDs() (ids []int)
- func (m *EntityMutation) EdgeCleared(name string) bool
- func (m *EntityMutation) ExchangesCleared() bool
- func (m *EntityMutation) ExchangesIDs() (ids []int)
- func (m *EntityMutation) Field(name string) (ent.Value, bool)
- func (m *EntityMutation) FieldCleared(name string) bool
- func (m *EntityMutation) Fields() []string
- func (m *EntityMutation) FinancialsCleared() bool
- func (m *EntityMutation) FinancialsIDs() (ids []int)
- func (m *EntityMutation) ID() (id int, exists bool)
- func (m *EntityMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EntityMutation) IntervalsCleared() bool
- func (m *EntityMutation) IntervalsIDs() (ids []int)
- func (m *EntityMutation) ListDate() (r time.Time, exists bool)
- func (m *EntityMutation) Name() (r string, exists bool)
- func (m *EntityMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *EntityMutation) OldDelisted(ctx context.Context) (v *time.Time, err error)
- func (m *EntityMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *EntityMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EntityMutation) OldListDate(ctx context.Context) (v time.Time, err error)
- func (m *EntityMutation) OldName(ctx context.Context) (v string, err error)
- func (m *EntityMutation) OldTicker(ctx context.Context) (v string, err error)
- func (m *EntityMutation) Op() Op
- func (m *EntityMutation) RemoveDividendIDs(ids ...int)
- func (m *EntityMutation) RemoveExchangeIDs(ids ...int)
- func (m *EntityMutation) RemoveFinancialIDs(ids ...int)
- func (m *EntityMutation) RemoveIntervalIDs(ids ...int)
- func (m *EntityMutation) RemoveSplitIDs(ids ...int)
- func (m *EntityMutation) RemovedDividendsIDs() (ids []int)
- func (m *EntityMutation) RemovedEdges() []string
- func (m *EntityMutation) RemovedExchangesIDs() (ids []int)
- func (m *EntityMutation) RemovedFinancialsIDs() (ids []int)
- func (m *EntityMutation) RemovedIDs(name string) []ent.Value
- func (m *EntityMutation) RemovedIntervalsIDs() (ids []int)
- func (m *EntityMutation) RemovedSplitsIDs() (ids []int)
- func (m *EntityMutation) ResetActive()
- func (m *EntityMutation) ResetDelisted()
- func (m *EntityMutation) ResetDescription()
- func (m *EntityMutation) ResetDividends()
- func (m *EntityMutation) ResetEdge(name string) error
- func (m *EntityMutation) ResetExchanges()
- func (m *EntityMutation) ResetField(name string) error
- func (m *EntityMutation) ResetFinancials()
- func (m *EntityMutation) ResetIntervals()
- func (m *EntityMutation) ResetListDate()
- func (m *EntityMutation) ResetName()
- func (m *EntityMutation) ResetSplits()
- func (m *EntityMutation) ResetTicker()
- func (m *EntityMutation) SetActive(b bool)
- func (m *EntityMutation) SetDelisted(t time.Time)
- func (m *EntityMutation) SetDescription(s string)
- func (m *EntityMutation) SetField(name string, value ent.Value) error
- func (m *EntityMutation) SetListDate(t time.Time)
- func (m *EntityMutation) SetName(s string)
- func (m *EntityMutation) SetOp(op Op)
- func (m *EntityMutation) SetTicker(s string)
- func (m *EntityMutation) SplitsCleared() bool
- func (m *EntityMutation) SplitsIDs() (ids []int)
- func (m *EntityMutation) Ticker() (r string, exists bool)
- func (m EntityMutation) Tx() (*Tx, error)
- func (m *EntityMutation) Type() string
- func (m *EntityMutation) Where(ps ...predicate.Entity)
- func (m *EntityMutation) WhereP(ps ...func(*sql.Selector))
- type EntityQuery
- func (eq *EntityQuery) Aggregate(fns ...AggregateFunc) *EntitySelect
- func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error)
- func (eq *EntityQuery) AllX(ctx context.Context) []*Entity
- func (eq *EntityQuery) Clone() *EntityQuery
- func (eq *EntityQuery) Count(ctx context.Context) (int, error)
- func (eq *EntityQuery) CountX(ctx context.Context) int
- func (eq *EntityQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EntityQuery) ExistX(ctx context.Context) bool
- func (eq *EntityQuery) First(ctx context.Context) (*Entity, error)
- func (eq *EntityQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EntityQuery) FirstIDX(ctx context.Context) int
- func (eq *EntityQuery) FirstX(ctx context.Context) *Entity
- func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy
- func (eq *EntityQuery) IDs(ctx context.Context) ([]int, error)
- func (eq *EntityQuery) IDsX(ctx context.Context) []int
- func (eq *EntityQuery) Limit(limit int) *EntityQuery
- func (eq *EntityQuery) Offset(offset int) *EntityQuery
- func (eq *EntityQuery) Only(ctx context.Context) (*Entity, error)
- func (eq *EntityQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EntityQuery) OnlyIDX(ctx context.Context) int
- func (eq *EntityQuery) OnlyX(ctx context.Context) *Entity
- func (eq *EntityQuery) Order(o ...OrderFunc) *EntityQuery
- func (eq *EntityQuery) QueryDividends() *DividendQuery
- func (eq *EntityQuery) QueryExchanges() *ExchangeQuery
- func (eq *EntityQuery) QueryFinancials() *FinancialQuery
- func (eq *EntityQuery) QueryIntervals() *IntervalQuery
- func (eq *EntityQuery) QuerySplits() *SplitQuery
- func (eq *EntityQuery) Select(fields ...string) *EntitySelect
- func (eq *EntityQuery) Unique(unique bool) *EntityQuery
- func (eq *EntityQuery) Where(ps ...predicate.Entity) *EntityQuery
- func (eq *EntityQuery) WithDividends(opts ...func(*DividendQuery)) *EntityQuery
- func (eq *EntityQuery) WithExchanges(opts ...func(*ExchangeQuery)) *EntityQuery
- func (eq *EntityQuery) WithFinancials(opts ...func(*FinancialQuery)) *EntityQuery
- func (eq *EntityQuery) WithIntervals(opts ...func(*IntervalQuery)) *EntityQuery
- func (eq *EntityQuery) WithSplits(opts ...func(*SplitQuery)) *EntityQuery
- type EntitySelect
- func (es *EntitySelect) Aggregate(fns ...AggregateFunc) *EntitySelect
- func (s *EntitySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntitySelect) BoolX(ctx context.Context) bool
- func (s *EntitySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EntitySelect) BoolsX(ctx context.Context) []bool
- func (s *EntitySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntitySelect) Float64X(ctx context.Context) float64
- func (s *EntitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntitySelect) Float64sX(ctx context.Context) []float64
- func (s *EntitySelect) Int(ctx context.Context) (_ int, err error)
- func (s *EntitySelect) IntX(ctx context.Context) int
- func (s *EntitySelect) Ints(ctx context.Context) ([]int, error)
- func (s *EntitySelect) IntsX(ctx context.Context) []int
- func (es *EntitySelect) Scan(ctx context.Context, v any) error
- func (s *EntitySelect) ScanX(ctx context.Context, v any)
- func (s *EntitySelect) String(ctx context.Context) (_ string, err error)
- func (s *EntitySelect) StringX(ctx context.Context) string
- func (s *EntitySelect) Strings(ctx context.Context) ([]string, error)
- func (s *EntitySelect) StringsX(ctx context.Context) []string
- type EntityUpdate
- func (eu *EntityUpdate) AddDividendIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddDividends(d ...*Dividend) *EntityUpdate
- func (eu *EntityUpdate) AddExchangeIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddExchanges(e ...*Exchange) *EntityUpdate
- func (eu *EntityUpdate) AddFinancialIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddFinancials(f ...*Financial) *EntityUpdate
- func (eu *EntityUpdate) AddIntervalIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddIntervals(i ...*Interval) *EntityUpdate
- func (eu *EntityUpdate) AddSplitIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) AddSplits(s ...*Split) *EntityUpdate
- func (eu *EntityUpdate) ClearDelisted() *EntityUpdate
- func (eu *EntityUpdate) ClearDividends() *EntityUpdate
- func (eu *EntityUpdate) ClearExchanges() *EntityUpdate
- func (eu *EntityUpdate) ClearFinancials() *EntityUpdate
- func (eu *EntityUpdate) ClearIntervals() *EntityUpdate
- func (eu *EntityUpdate) ClearSplits() *EntityUpdate
- func (eu *EntityUpdate) Exec(ctx context.Context) error
- func (eu *EntityUpdate) ExecX(ctx context.Context)
- func (eu *EntityUpdate) Mutation() *EntityMutation
- func (eu *EntityUpdate) RemoveDividendIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) RemoveDividends(d ...*Dividend) *EntityUpdate
- func (eu *EntityUpdate) RemoveExchangeIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) RemoveExchanges(e ...*Exchange) *EntityUpdate
- func (eu *EntityUpdate) RemoveFinancialIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) RemoveFinancials(f ...*Financial) *EntityUpdate
- func (eu *EntityUpdate) RemoveIntervalIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) RemoveIntervals(i ...*Interval) *EntityUpdate
- func (eu *EntityUpdate) RemoveSplitIDs(ids ...int) *EntityUpdate
- func (eu *EntityUpdate) RemoveSplits(s ...*Split) *EntityUpdate
- func (eu *EntityUpdate) Save(ctx context.Context) (int, error)
- func (eu *EntityUpdate) SaveX(ctx context.Context) int
- func (eu *EntityUpdate) SetActive(b bool) *EntityUpdate
- func (eu *EntityUpdate) SetDelisted(t time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetDescription(s string) *EntityUpdate
- func (eu *EntityUpdate) SetListDate(t time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetName(s string) *EntityUpdate
- func (eu *EntityUpdate) SetNillableDelisted(t *time.Time) *EntityUpdate
- func (eu *EntityUpdate) SetTicker(s string) *EntityUpdate
- func (eu *EntityUpdate) Where(ps ...predicate.Entity) *EntityUpdate
- type EntityUpdateOne
- func (euo *EntityUpdateOne) AddDividendIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddDividends(d ...*Dividend) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddExchangeIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddExchanges(e ...*Exchange) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddFinancialIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddFinancials(f ...*Financial) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddIntervalIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddIntervals(i ...*Interval) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddSplitIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) AddSplits(s ...*Split) *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearDelisted() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearDividends() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearExchanges() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearFinancials() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearIntervals() *EntityUpdateOne
- func (euo *EntityUpdateOne) ClearSplits() *EntityUpdateOne
- func (euo *EntityUpdateOne) Exec(ctx context.Context) error
- func (euo *EntityUpdateOne) ExecX(ctx context.Context)
- func (euo *EntityUpdateOne) Mutation() *EntityMutation
- func (euo *EntityUpdateOne) RemoveDividendIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveDividends(d ...*Dividend) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveExchangeIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveExchanges(e ...*Exchange) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveFinancialIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveFinancials(f ...*Financial) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveIntervalIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveIntervals(i ...*Interval) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveSplitIDs(ids ...int) *EntityUpdateOne
- func (euo *EntityUpdateOne) RemoveSplits(s ...*Split) *EntityUpdateOne
- func (euo *EntityUpdateOne) Save(ctx context.Context) (*Entity, error)
- func (euo *EntityUpdateOne) SaveX(ctx context.Context) *Entity
- func (euo *EntityUpdateOne) Select(field string, fields ...string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetActive(b bool) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetDelisted(t time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetDescription(s string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetListDate(t time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetName(s string) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetNillableDelisted(t *time.Time) *EntityUpdateOne
- func (euo *EntityUpdateOne) SetTicker(s string) *EntityUpdateOne
- type Exchange
- type ExchangeClient
- func (c *ExchangeClient) Create() *ExchangeCreate
- func (c *ExchangeClient) CreateBulk(builders ...*ExchangeCreate) *ExchangeCreateBulk
- func (c *ExchangeClient) Delete() *ExchangeDelete
- func (c *ExchangeClient) DeleteOne(e *Exchange) *ExchangeDeleteOne
- func (c *ExchangeClient) DeleteOneID(id int) *ExchangeDeleteOne
- func (c *ExchangeClient) Get(ctx context.Context, id int) (*Exchange, error)
- func (c *ExchangeClient) GetX(ctx context.Context, id int) *Exchange
- func (c *ExchangeClient) Hooks() []Hook
- func (c *ExchangeClient) Intercept(interceptors ...Interceptor)
- func (c *ExchangeClient) Interceptors() []Interceptor
- func (c *ExchangeClient) Query() *ExchangeQuery
- func (c *ExchangeClient) QueryStocks(e *Exchange) *EntityQuery
- func (c *ExchangeClient) Update() *ExchangeUpdate
- func (c *ExchangeClient) UpdateOne(e *Exchange) *ExchangeUpdateOne
- func (c *ExchangeClient) UpdateOneID(id int) *ExchangeUpdateOne
- func (c *ExchangeClient) Use(hooks ...Hook)
- type ExchangeCreate
- func (ec *ExchangeCreate) AddStockIDs(ids ...int) *ExchangeCreate
- func (ec *ExchangeCreate) AddStocks(e ...*Entity) *ExchangeCreate
- func (ec *ExchangeCreate) Exec(ctx context.Context) error
- func (ec *ExchangeCreate) ExecX(ctx context.Context)
- func (ec *ExchangeCreate) Mutation() *ExchangeMutation
- func (ec *ExchangeCreate) Save(ctx context.Context) (*Exchange, error)
- func (ec *ExchangeCreate) SaveX(ctx context.Context) *Exchange
- func (ec *ExchangeCreate) SetCode(s string) *ExchangeCreate
- func (ec *ExchangeCreate) SetName(s string) *ExchangeCreate
- type ExchangeCreateBulk
- type ExchangeDelete
- type ExchangeDeleteOne
- type ExchangeEdges
- type ExchangeGroupBy
- func (egb *ExchangeGroupBy) Aggregate(fns ...AggregateFunc) *ExchangeGroupBy
- func (s *ExchangeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ExchangeGroupBy) BoolX(ctx context.Context) bool
- func (s *ExchangeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ExchangeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ExchangeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ExchangeGroupBy) Float64X(ctx context.Context) float64
- func (s *ExchangeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ExchangeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ExchangeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ExchangeGroupBy) IntX(ctx context.Context) int
- func (s *ExchangeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ExchangeGroupBy) IntsX(ctx context.Context) []int
- func (egb *ExchangeGroupBy) Scan(ctx context.Context, v any) error
- func (s *ExchangeGroupBy) ScanX(ctx context.Context, v any)
- func (s *ExchangeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ExchangeGroupBy) StringX(ctx context.Context) string
- func (s *ExchangeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ExchangeGroupBy) StringsX(ctx context.Context) []string
- type ExchangeMutation
- func (m *ExchangeMutation) AddField(name string, value ent.Value) error
- func (m *ExchangeMutation) AddStockIDs(ids ...int)
- func (m *ExchangeMutation) AddedEdges() []string
- func (m *ExchangeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ExchangeMutation) AddedFields() []string
- func (m *ExchangeMutation) AddedIDs(name string) []ent.Value
- func (m *ExchangeMutation) ClearEdge(name string) error
- func (m *ExchangeMutation) ClearField(name string) error
- func (m *ExchangeMutation) ClearStocks()
- func (m *ExchangeMutation) ClearedEdges() []string
- func (m *ExchangeMutation) ClearedFields() []string
- func (m ExchangeMutation) Client() *Client
- func (m *ExchangeMutation) Code() (r string, exists bool)
- func (m *ExchangeMutation) EdgeCleared(name string) bool
- func (m *ExchangeMutation) Field(name string) (ent.Value, bool)
- func (m *ExchangeMutation) FieldCleared(name string) bool
- func (m *ExchangeMutation) Fields() []string
- func (m *ExchangeMutation) ID() (id int, exists bool)
- func (m *ExchangeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ExchangeMutation) Name() (r string, exists bool)
- func (m *ExchangeMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *ExchangeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ExchangeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ExchangeMutation) Op() Op
- func (m *ExchangeMutation) RemoveStockIDs(ids ...int)
- func (m *ExchangeMutation) RemovedEdges() []string
- func (m *ExchangeMutation) RemovedIDs(name string) []ent.Value
- func (m *ExchangeMutation) RemovedStocksIDs() (ids []int)
- func (m *ExchangeMutation) ResetCode()
- func (m *ExchangeMutation) ResetEdge(name string) error
- func (m *ExchangeMutation) ResetField(name string) error
- func (m *ExchangeMutation) ResetName()
- func (m *ExchangeMutation) ResetStocks()
- func (m *ExchangeMutation) SetCode(s string)
- func (m *ExchangeMutation) SetField(name string, value ent.Value) error
- func (m *ExchangeMutation) SetName(s string)
- func (m *ExchangeMutation) SetOp(op Op)
- func (m *ExchangeMutation) StocksCleared() bool
- func (m *ExchangeMutation) StocksIDs() (ids []int)
- func (m ExchangeMutation) Tx() (*Tx, error)
- func (m *ExchangeMutation) Type() string
- func (m *ExchangeMutation) Where(ps ...predicate.Exchange)
- func (m *ExchangeMutation) WhereP(ps ...func(*sql.Selector))
- type ExchangeQuery
- func (eq *ExchangeQuery) Aggregate(fns ...AggregateFunc) *ExchangeSelect
- func (eq *ExchangeQuery) All(ctx context.Context) ([]*Exchange, error)
- func (eq *ExchangeQuery) AllX(ctx context.Context) []*Exchange
- func (eq *ExchangeQuery) Clone() *ExchangeQuery
- func (eq *ExchangeQuery) Count(ctx context.Context) (int, error)
- func (eq *ExchangeQuery) CountX(ctx context.Context) int
- func (eq *ExchangeQuery) Exist(ctx context.Context) (bool, error)
- func (eq *ExchangeQuery) ExistX(ctx context.Context) bool
- func (eq *ExchangeQuery) First(ctx context.Context) (*Exchange, error)
- func (eq *ExchangeQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *ExchangeQuery) FirstIDX(ctx context.Context) int
- func (eq *ExchangeQuery) FirstX(ctx context.Context) *Exchange
- func (eq *ExchangeQuery) GroupBy(field string, fields ...string) *ExchangeGroupBy
- func (eq *ExchangeQuery) IDs(ctx context.Context) ([]int, error)
- func (eq *ExchangeQuery) IDsX(ctx context.Context) []int
- func (eq *ExchangeQuery) Limit(limit int) *ExchangeQuery
- func (eq *ExchangeQuery) Offset(offset int) *ExchangeQuery
- func (eq *ExchangeQuery) Only(ctx context.Context) (*Exchange, error)
- func (eq *ExchangeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *ExchangeQuery) OnlyIDX(ctx context.Context) int
- func (eq *ExchangeQuery) OnlyX(ctx context.Context) *Exchange
- func (eq *ExchangeQuery) Order(o ...OrderFunc) *ExchangeQuery
- func (eq *ExchangeQuery) QueryStocks() *EntityQuery
- func (eq *ExchangeQuery) Select(fields ...string) *ExchangeSelect
- func (eq *ExchangeQuery) Unique(unique bool) *ExchangeQuery
- func (eq *ExchangeQuery) Where(ps ...predicate.Exchange) *ExchangeQuery
- func (eq *ExchangeQuery) WithStocks(opts ...func(*EntityQuery)) *ExchangeQuery
- type ExchangeSelect
- func (es *ExchangeSelect) Aggregate(fns ...AggregateFunc) *ExchangeSelect
- func (s *ExchangeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ExchangeSelect) BoolX(ctx context.Context) bool
- func (s *ExchangeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ExchangeSelect) BoolsX(ctx context.Context) []bool
- func (s *ExchangeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ExchangeSelect) Float64X(ctx context.Context) float64
- func (s *ExchangeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ExchangeSelect) Float64sX(ctx context.Context) []float64
- func (s *ExchangeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ExchangeSelect) IntX(ctx context.Context) int
- func (s *ExchangeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ExchangeSelect) IntsX(ctx context.Context) []int
- func (es *ExchangeSelect) Scan(ctx context.Context, v any) error
- func (s *ExchangeSelect) ScanX(ctx context.Context, v any)
- func (s *ExchangeSelect) String(ctx context.Context) (_ string, err error)
- func (s *ExchangeSelect) StringX(ctx context.Context) string
- func (s *ExchangeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ExchangeSelect) StringsX(ctx context.Context) []string
- type ExchangeUpdate
- func (eu *ExchangeUpdate) AddStockIDs(ids ...int) *ExchangeUpdate
- func (eu *ExchangeUpdate) AddStocks(e ...*Entity) *ExchangeUpdate
- func (eu *ExchangeUpdate) ClearStocks() *ExchangeUpdate
- func (eu *ExchangeUpdate) Exec(ctx context.Context) error
- func (eu *ExchangeUpdate) ExecX(ctx context.Context)
- func (eu *ExchangeUpdate) Mutation() *ExchangeMutation
- func (eu *ExchangeUpdate) RemoveStockIDs(ids ...int) *ExchangeUpdate
- func (eu *ExchangeUpdate) RemoveStocks(e ...*Entity) *ExchangeUpdate
- func (eu *ExchangeUpdate) Save(ctx context.Context) (int, error)
- func (eu *ExchangeUpdate) SaveX(ctx context.Context) int
- func (eu *ExchangeUpdate) SetCode(s string) *ExchangeUpdate
- func (eu *ExchangeUpdate) SetName(s string) *ExchangeUpdate
- func (eu *ExchangeUpdate) Where(ps ...predicate.Exchange) *ExchangeUpdate
- type ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) AddStockIDs(ids ...int) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) AddStocks(e ...*Entity) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) ClearStocks() *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) Exec(ctx context.Context) error
- func (euo *ExchangeUpdateOne) ExecX(ctx context.Context)
- func (euo *ExchangeUpdateOne) Mutation() *ExchangeMutation
- func (euo *ExchangeUpdateOne) RemoveStockIDs(ids ...int) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) RemoveStocks(e ...*Entity) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) Save(ctx context.Context) (*Exchange, error)
- func (euo *ExchangeUpdateOne) SaveX(ctx context.Context) *Exchange
- func (euo *ExchangeUpdateOne) Select(field string, fields ...string) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) SetCode(s string) *ExchangeUpdateOne
- func (euo *ExchangeUpdateOne) SetName(s string) *ExchangeUpdateOne
- type Exchanges
- type Financial
- type FinancialClient
- func (c *FinancialClient) Create() *FinancialCreate
- func (c *FinancialClient) CreateBulk(builders ...*FinancialCreate) *FinancialCreateBulk
- func (c *FinancialClient) Delete() *FinancialDelete
- func (c *FinancialClient) DeleteOne(f *Financial) *FinancialDeleteOne
- func (c *FinancialClient) DeleteOneID(id int) *FinancialDeleteOne
- func (c *FinancialClient) Get(ctx context.Context, id int) (*Financial, error)
- func (c *FinancialClient) GetX(ctx context.Context, id int) *Financial
- func (c *FinancialClient) Hooks() []Hook
- func (c *FinancialClient) Intercept(interceptors ...Interceptor)
- func (c *FinancialClient) Interceptors() []Interceptor
- func (c *FinancialClient) Query() *FinancialQuery
- func (c *FinancialClient) QueryStock(f *Financial) *EntityQuery
- func (c *FinancialClient) Update() *FinancialUpdate
- func (c *FinancialClient) UpdateOne(f *Financial) *FinancialUpdateOne
- func (c *FinancialClient) UpdateOneID(id int) *FinancialUpdateOne
- func (c *FinancialClient) Use(hooks ...Hook)
- type FinancialCreate
- func (fc *FinancialCreate) AddStock(e ...*Entity) *FinancialCreate
- func (fc *FinancialCreate) AddStockIDs(ids ...int) *FinancialCreate
- func (fc *FinancialCreate) Exec(ctx context.Context) error
- func (fc *FinancialCreate) ExecX(ctx context.Context)
- func (fc *FinancialCreate) Mutation() *FinancialMutation
- func (fc *FinancialCreate) Save(ctx context.Context) (*Financial, error)
- func (fc *FinancialCreate) SaveX(ctx context.Context) *Financial
- type FinancialCreateBulk
- type FinancialDelete
- type FinancialDeleteOne
- type FinancialEdges
- type FinancialGroupBy
- func (fgb *FinancialGroupBy) Aggregate(fns ...AggregateFunc) *FinancialGroupBy
- func (s *FinancialGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialGroupBy) BoolX(ctx context.Context) bool
- func (s *FinancialGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FinancialGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialGroupBy) Float64X(ctx context.Context) float64
- func (s *FinancialGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FinancialGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialGroupBy) IntX(ctx context.Context) int
- func (s *FinancialGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FinancialGroupBy) Scan(ctx context.Context, v any) error
- func (s *FinancialGroupBy) ScanX(ctx context.Context, v any)
- func (s *FinancialGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FinancialGroupBy) StringX(ctx context.Context) string
- func (s *FinancialGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialGroupBy) StringsX(ctx context.Context) []string
- type FinancialMutation
- func (m *FinancialMutation) AddField(name string, value ent.Value) error
- func (m *FinancialMutation) AddStockIDs(ids ...int)
- func (m *FinancialMutation) AddedEdges() []string
- func (m *FinancialMutation) AddedField(name string) (ent.Value, bool)
- func (m *FinancialMutation) AddedFields() []string
- func (m *FinancialMutation) AddedIDs(name string) []ent.Value
- func (m *FinancialMutation) ClearEdge(name string) error
- func (m *FinancialMutation) ClearField(name string) error
- func (m *FinancialMutation) ClearStock()
- func (m *FinancialMutation) ClearedEdges() []string
- func (m *FinancialMutation) ClearedFields() []string
- func (m FinancialMutation) Client() *Client
- func (m *FinancialMutation) EdgeCleared(name string) bool
- func (m *FinancialMutation) Field(name string) (ent.Value, bool)
- func (m *FinancialMutation) FieldCleared(name string) bool
- func (m *FinancialMutation) Fields() []string
- func (m *FinancialMutation) ID() (id int, exists bool)
- func (m *FinancialMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FinancialMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FinancialMutation) Op() Op
- func (m *FinancialMutation) RemoveStockIDs(ids ...int)
- func (m *FinancialMutation) RemovedEdges() []string
- func (m *FinancialMutation) RemovedIDs(name string) []ent.Value
- func (m *FinancialMutation) RemovedStockIDs() (ids []int)
- func (m *FinancialMutation) ResetEdge(name string) error
- func (m *FinancialMutation) ResetField(name string) error
- func (m *FinancialMutation) ResetStock()
- func (m *FinancialMutation) SetField(name string, value ent.Value) error
- func (m *FinancialMutation) SetOp(op Op)
- func (m *FinancialMutation) StockCleared() bool
- func (m *FinancialMutation) StockIDs() (ids []int)
- func (m FinancialMutation) Tx() (*Tx, error)
- func (m *FinancialMutation) Type() string
- func (m *FinancialMutation) Where(ps ...predicate.Financial)
- func (m *FinancialMutation) WhereP(ps ...func(*sql.Selector))
- type FinancialQuery
- func (fq *FinancialQuery) Aggregate(fns ...AggregateFunc) *FinancialSelect
- func (fq *FinancialQuery) All(ctx context.Context) ([]*Financial, error)
- func (fq *FinancialQuery) AllX(ctx context.Context) []*Financial
- func (fq *FinancialQuery) Clone() *FinancialQuery
- func (fq *FinancialQuery) Count(ctx context.Context) (int, error)
- func (fq *FinancialQuery) CountX(ctx context.Context) int
- func (fq *FinancialQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FinancialQuery) ExistX(ctx context.Context) bool
- func (fq *FinancialQuery) First(ctx context.Context) (*Financial, error)
- func (fq *FinancialQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FinancialQuery) FirstIDX(ctx context.Context) int
- func (fq *FinancialQuery) FirstX(ctx context.Context) *Financial
- func (fq *FinancialQuery) GroupBy(field string, fields ...string) *FinancialGroupBy
- func (fq *FinancialQuery) IDs(ctx context.Context) ([]int, error)
- func (fq *FinancialQuery) IDsX(ctx context.Context) []int
- func (fq *FinancialQuery) Limit(limit int) *FinancialQuery
- func (fq *FinancialQuery) Offset(offset int) *FinancialQuery
- func (fq *FinancialQuery) Only(ctx context.Context) (*Financial, error)
- func (fq *FinancialQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FinancialQuery) OnlyIDX(ctx context.Context) int
- func (fq *FinancialQuery) OnlyX(ctx context.Context) *Financial
- func (fq *FinancialQuery) Order(o ...OrderFunc) *FinancialQuery
- func (fq *FinancialQuery) QueryStock() *EntityQuery
- func (fq *FinancialQuery) Select(fields ...string) *FinancialSelect
- func (fq *FinancialQuery) Unique(unique bool) *FinancialQuery
- func (fq *FinancialQuery) Where(ps ...predicate.Financial) *FinancialQuery
- func (fq *FinancialQuery) WithStock(opts ...func(*EntityQuery)) *FinancialQuery
- type FinancialSelect
- func (fs *FinancialSelect) Aggregate(fns ...AggregateFunc) *FinancialSelect
- func (s *FinancialSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialSelect) BoolX(ctx context.Context) bool
- func (s *FinancialSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialSelect) BoolsX(ctx context.Context) []bool
- func (s *FinancialSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialSelect) Float64X(ctx context.Context) float64
- func (s *FinancialSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialSelect) Float64sX(ctx context.Context) []float64
- func (s *FinancialSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialSelect) IntX(ctx context.Context) int
- func (s *FinancialSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialSelect) IntsX(ctx context.Context) []int
- func (fs *FinancialSelect) Scan(ctx context.Context, v any) error
- func (s *FinancialSelect) ScanX(ctx context.Context, v any)
- func (s *FinancialSelect) String(ctx context.Context) (_ string, err error)
- func (s *FinancialSelect) StringX(ctx context.Context) string
- func (s *FinancialSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialSelect) StringsX(ctx context.Context) []string
- type FinancialUpdate
- func (fu *FinancialUpdate) AddStock(e ...*Entity) *FinancialUpdate
- func (fu *FinancialUpdate) AddStockIDs(ids ...int) *FinancialUpdate
- func (fu *FinancialUpdate) ClearStock() *FinancialUpdate
- func (fu *FinancialUpdate) Exec(ctx context.Context) error
- func (fu *FinancialUpdate) ExecX(ctx context.Context)
- func (fu *FinancialUpdate) Mutation() *FinancialMutation
- func (fu *FinancialUpdate) RemoveStock(e ...*Entity) *FinancialUpdate
- func (fu *FinancialUpdate) RemoveStockIDs(ids ...int) *FinancialUpdate
- func (fu *FinancialUpdate) Save(ctx context.Context) (int, error)
- func (fu *FinancialUpdate) SaveX(ctx context.Context) int
- func (fu *FinancialUpdate) Where(ps ...predicate.Financial) *FinancialUpdate
- type FinancialUpdateOne
- func (fuo *FinancialUpdateOne) AddStock(e ...*Entity) *FinancialUpdateOne
- func (fuo *FinancialUpdateOne) AddStockIDs(ids ...int) *FinancialUpdateOne
- func (fuo *FinancialUpdateOne) ClearStock() *FinancialUpdateOne
- func (fuo *FinancialUpdateOne) Exec(ctx context.Context) error
- func (fuo *FinancialUpdateOne) ExecX(ctx context.Context)
- func (fuo *FinancialUpdateOne) Mutation() *FinancialMutation
- func (fuo *FinancialUpdateOne) RemoveStock(e ...*Entity) *FinancialUpdateOne
- func (fuo *FinancialUpdateOne) RemoveStockIDs(ids ...int) *FinancialUpdateOne
- func (fuo *FinancialUpdateOne) Save(ctx context.Context) (*Financial, error)
- func (fuo *FinancialUpdateOne) SaveX(ctx context.Context) *Financial
- func (fuo *FinancialUpdateOne) Select(field string, fields ...string) *FinancialUpdateOne
- type Financials
- type Hook
- type InterceptFunc
- type Interceptor
- type Interval
- func (i *Interval) QueryBars() *BarTimeRangeQuery
- func (i *Interval) QueryDataSource() *DataSourceQuery
- func (i *Interval) QueryStock() *EntityQuery
- func (i *Interval) QueryTrades() *TradeTimeRangeQuery
- func (i *Interval) String() string
- func (i *Interval) Unwrap() *Interval
- func (i *Interval) Update() *IntervalUpdateOne
- type IntervalClient
- func (c *IntervalClient) Create() *IntervalCreate
- func (c *IntervalClient) CreateBulk(builders ...*IntervalCreate) *IntervalCreateBulk
- func (c *IntervalClient) Delete() *IntervalDelete
- func (c *IntervalClient) DeleteOne(i *Interval) *IntervalDeleteOne
- func (c *IntervalClient) DeleteOneID(id int) *IntervalDeleteOne
- func (c *IntervalClient) Get(ctx context.Context, id int) (*Interval, error)
- func (c *IntervalClient) GetX(ctx context.Context, id int) *Interval
- func (c *IntervalClient) Hooks() []Hook
- func (c *IntervalClient) Intercept(interceptors ...Interceptor)
- func (c *IntervalClient) Interceptors() []Interceptor
- func (c *IntervalClient) Query() *IntervalQuery
- func (c *IntervalClient) QueryBars(i *Interval) *BarTimeRangeQuery
- func (c *IntervalClient) QueryDataSource(i *Interval) *DataSourceQuery
- func (c *IntervalClient) QueryStock(i *Interval) *EntityQuery
- func (c *IntervalClient) QueryTrades(i *Interval) *TradeTimeRangeQuery
- func (c *IntervalClient) Update() *IntervalUpdate
- func (c *IntervalClient) UpdateOne(i *Interval) *IntervalUpdateOne
- func (c *IntervalClient) UpdateOneID(id int) *IntervalUpdateOne
- func (c *IntervalClient) Use(hooks ...Hook)
- type IntervalCreate
- func (ic *IntervalCreate) AddBarIDs(ids ...int) *IntervalCreate
- func (ic *IntervalCreate) AddBars(b ...*BarTimeRange) *IntervalCreate
- func (ic *IntervalCreate) AddTradeIDs(ids ...int) *IntervalCreate
- func (ic *IntervalCreate) AddTrades(t ...*TradeTimeRange) *IntervalCreate
- func (ic *IntervalCreate) Exec(ctx context.Context) error
- func (ic *IntervalCreate) ExecX(ctx context.Context)
- func (ic *IntervalCreate) Mutation() *IntervalMutation
- func (ic *IntervalCreate) Save(ctx context.Context) (*Interval, error)
- func (ic *IntervalCreate) SaveX(ctx context.Context) *Interval
- func (ic *IntervalCreate) SetActive(b bool) *IntervalCreate
- func (ic *IntervalCreate) SetDataSource(d *DataSource) *IntervalCreate
- func (ic *IntervalCreate) SetDataSourceID(i int) *IntervalCreate
- func (ic *IntervalCreate) SetInterval(i interval.Interval) *IntervalCreate
- func (ic *IntervalCreate) SetNillableActive(b *bool) *IntervalCreate
- func (ic *IntervalCreate) SetStock(e *Entity) *IntervalCreate
- func (ic *IntervalCreate) SetStockID(i int) *IntervalCreate
- type IntervalCreateBulk
- type IntervalDelete
- type IntervalDeleteOne
- type IntervalEdges
- type IntervalGroupBy
- func (igb *IntervalGroupBy) Aggregate(fns ...AggregateFunc) *IntervalGroupBy
- func (s *IntervalGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IntervalGroupBy) BoolX(ctx context.Context) bool
- func (s *IntervalGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IntervalGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IntervalGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IntervalGroupBy) Float64X(ctx context.Context) float64
- func (s *IntervalGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IntervalGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IntervalGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IntervalGroupBy) IntX(ctx context.Context) int
- func (s *IntervalGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IntervalGroupBy) IntsX(ctx context.Context) []int
- func (igb *IntervalGroupBy) Scan(ctx context.Context, v any) error
- func (s *IntervalGroupBy) ScanX(ctx context.Context, v any)
- func (s *IntervalGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IntervalGroupBy) StringX(ctx context.Context) string
- func (s *IntervalGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IntervalGroupBy) StringsX(ctx context.Context) []string
- type IntervalMutation
- func (m *IntervalMutation) Active() (r bool, exists bool)
- func (m *IntervalMutation) AddBarIDs(ids ...int)
- func (m *IntervalMutation) AddField(name string, value ent.Value) error
- func (m *IntervalMutation) AddTradeIDs(ids ...int)
- func (m *IntervalMutation) AddedEdges() []string
- func (m *IntervalMutation) AddedField(name string) (ent.Value, bool)
- func (m *IntervalMutation) AddedFields() []string
- func (m *IntervalMutation) AddedIDs(name string) []ent.Value
- func (m *IntervalMutation) BarsCleared() bool
- func (m *IntervalMutation) BarsIDs() (ids []int)
- func (m *IntervalMutation) ClearBars()
- func (m *IntervalMutation) ClearDataSource()
- func (m *IntervalMutation) ClearEdge(name string) error
- func (m *IntervalMutation) ClearField(name string) error
- func (m *IntervalMutation) ClearStock()
- func (m *IntervalMutation) ClearTrades()
- func (m *IntervalMutation) ClearedEdges() []string
- func (m *IntervalMutation) ClearedFields() []string
- func (m IntervalMutation) Client() *Client
- func (m *IntervalMutation) DataSourceCleared() bool
- func (m *IntervalMutation) DataSourceID() (r int, exists bool)
- func (m *IntervalMutation) DataSourceIDs() (ids []int)
- func (m *IntervalMutation) EdgeCleared(name string) bool
- func (m *IntervalMutation) Field(name string) (ent.Value, bool)
- func (m *IntervalMutation) FieldCleared(name string) bool
- func (m *IntervalMutation) Fields() []string
- func (m *IntervalMutation) ID() (id int, exists bool)
- func (m *IntervalMutation) IDs(ctx context.Context) ([]int, error)
- func (m *IntervalMutation) Interval() (r interval.Interval, exists bool)
- func (m *IntervalMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *IntervalMutation) OldDataSourceID(ctx context.Context) (v int, err error)
- func (m *IntervalMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IntervalMutation) OldInterval(ctx context.Context) (v interval.Interval, err error)
- func (m *IntervalMutation) OldStockID(ctx context.Context) (v int, err error)
- func (m *IntervalMutation) Op() Op
- func (m *IntervalMutation) RemoveBarIDs(ids ...int)
- func (m *IntervalMutation) RemoveTradeIDs(ids ...int)
- func (m *IntervalMutation) RemovedBarsIDs() (ids []int)
- func (m *IntervalMutation) RemovedEdges() []string
- func (m *IntervalMutation) RemovedIDs(name string) []ent.Value
- func (m *IntervalMutation) RemovedTradesIDs() (ids []int)
- func (m *IntervalMutation) ResetActive()
- func (m *IntervalMutation) ResetBars()
- func (m *IntervalMutation) ResetDataSource()
- func (m *IntervalMutation) ResetDataSourceID()
- func (m *IntervalMutation) ResetEdge(name string) error
- func (m *IntervalMutation) ResetField(name string) error
- func (m *IntervalMutation) ResetInterval()
- func (m *IntervalMutation) ResetStock()
- func (m *IntervalMutation) ResetStockID()
- func (m *IntervalMutation) ResetTrades()
- func (m *IntervalMutation) SetActive(b bool)
- func (m *IntervalMutation) SetDataSourceID(i int)
- func (m *IntervalMutation) SetField(name string, value ent.Value) error
- func (m *IntervalMutation) SetInterval(i interval.Interval)
- func (m *IntervalMutation) SetOp(op Op)
- func (m *IntervalMutation) SetStockID(i int)
- func (m *IntervalMutation) StockCleared() bool
- func (m *IntervalMutation) StockID() (r int, exists bool)
- func (m *IntervalMutation) StockIDs() (ids []int)
- func (m *IntervalMutation) TradesCleared() bool
- func (m *IntervalMutation) TradesIDs() (ids []int)
- func (m IntervalMutation) Tx() (*Tx, error)
- func (m *IntervalMutation) Type() string
- func (m *IntervalMutation) Where(ps ...predicate.Interval)
- func (m *IntervalMutation) WhereP(ps ...func(*sql.Selector))
- type IntervalQuery
- func (iq *IntervalQuery) Aggregate(fns ...AggregateFunc) *IntervalSelect
- func (iq *IntervalQuery) All(ctx context.Context) ([]*Interval, error)
- func (iq *IntervalQuery) AllX(ctx context.Context) []*Interval
- func (iq *IntervalQuery) Clone() *IntervalQuery
- func (iq *IntervalQuery) Count(ctx context.Context) (int, error)
- func (iq *IntervalQuery) CountX(ctx context.Context) int
- func (iq *IntervalQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IntervalQuery) ExistX(ctx context.Context) bool
- func (iq *IntervalQuery) First(ctx context.Context) (*Interval, error)
- func (iq *IntervalQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *IntervalQuery) FirstIDX(ctx context.Context) int
- func (iq *IntervalQuery) FirstX(ctx context.Context) *Interval
- func (iq *IntervalQuery) GroupBy(field string, fields ...string) *IntervalGroupBy
- func (iq *IntervalQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *IntervalQuery) IDsX(ctx context.Context) []int
- func (iq *IntervalQuery) Limit(limit int) *IntervalQuery
- func (iq *IntervalQuery) Offset(offset int) *IntervalQuery
- func (iq *IntervalQuery) Only(ctx context.Context) (*Interval, error)
- func (iq *IntervalQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *IntervalQuery) OnlyIDX(ctx context.Context) int
- func (iq *IntervalQuery) OnlyX(ctx context.Context) *Interval
- func (iq *IntervalQuery) Order(o ...OrderFunc) *IntervalQuery
- func (iq *IntervalQuery) QueryBars() *BarTimeRangeQuery
- func (iq *IntervalQuery) QueryDataSource() *DataSourceQuery
- func (iq *IntervalQuery) QueryStock() *EntityQuery
- func (iq *IntervalQuery) QueryTrades() *TradeTimeRangeQuery
- func (iq *IntervalQuery) Select(fields ...string) *IntervalSelect
- func (iq *IntervalQuery) Unique(unique bool) *IntervalQuery
- func (iq *IntervalQuery) Where(ps ...predicate.Interval) *IntervalQuery
- func (iq *IntervalQuery) WithBars(opts ...func(*BarTimeRangeQuery)) *IntervalQuery
- func (iq *IntervalQuery) WithDataSource(opts ...func(*DataSourceQuery)) *IntervalQuery
- func (iq *IntervalQuery) WithStock(opts ...func(*EntityQuery)) *IntervalQuery
- func (iq *IntervalQuery) WithTrades(opts ...func(*TradeTimeRangeQuery)) *IntervalQuery
- type IntervalSelect
- func (is *IntervalSelect) Aggregate(fns ...AggregateFunc) *IntervalSelect
- func (s *IntervalSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IntervalSelect) BoolX(ctx context.Context) bool
- func (s *IntervalSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IntervalSelect) BoolsX(ctx context.Context) []bool
- func (s *IntervalSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IntervalSelect) Float64X(ctx context.Context) float64
- func (s *IntervalSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IntervalSelect) Float64sX(ctx context.Context) []float64
- func (s *IntervalSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IntervalSelect) IntX(ctx context.Context) int
- func (s *IntervalSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IntervalSelect) IntsX(ctx context.Context) []int
- func (is *IntervalSelect) Scan(ctx context.Context, v any) error
- func (s *IntervalSelect) ScanX(ctx context.Context, v any)
- func (s *IntervalSelect) String(ctx context.Context) (_ string, err error)
- func (s *IntervalSelect) StringX(ctx context.Context) string
- func (s *IntervalSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IntervalSelect) StringsX(ctx context.Context) []string
- type IntervalUpdate
- func (iu *IntervalUpdate) AddBarIDs(ids ...int) *IntervalUpdate
- func (iu *IntervalUpdate) AddBars(b ...*BarTimeRange) *IntervalUpdate
- func (iu *IntervalUpdate) AddTradeIDs(ids ...int) *IntervalUpdate
- func (iu *IntervalUpdate) AddTrades(t ...*TradeTimeRange) *IntervalUpdate
- func (iu *IntervalUpdate) ClearBars() *IntervalUpdate
- func (iu *IntervalUpdate) ClearDataSource() *IntervalUpdate
- func (iu *IntervalUpdate) ClearStock() *IntervalUpdate
- func (iu *IntervalUpdate) ClearTrades() *IntervalUpdate
- func (iu *IntervalUpdate) Exec(ctx context.Context) error
- func (iu *IntervalUpdate) ExecX(ctx context.Context)
- func (iu *IntervalUpdate) Mutation() *IntervalMutation
- func (iu *IntervalUpdate) RemoveBarIDs(ids ...int) *IntervalUpdate
- func (iu *IntervalUpdate) RemoveBars(b ...*BarTimeRange) *IntervalUpdate
- func (iu *IntervalUpdate) RemoveTradeIDs(ids ...int) *IntervalUpdate
- func (iu *IntervalUpdate) RemoveTrades(t ...*TradeTimeRange) *IntervalUpdate
- func (iu *IntervalUpdate) Save(ctx context.Context) (int, error)
- func (iu *IntervalUpdate) SaveX(ctx context.Context) int
- func (iu *IntervalUpdate) SetActive(b bool) *IntervalUpdate
- func (iu *IntervalUpdate) SetDataSource(d *DataSource) *IntervalUpdate
- func (iu *IntervalUpdate) SetDataSourceID(i int) *IntervalUpdate
- func (iu *IntervalUpdate) SetInterval(i interval.Interval) *IntervalUpdate
- func (iu *IntervalUpdate) SetNillableActive(b *bool) *IntervalUpdate
- func (iu *IntervalUpdate) SetStock(e *Entity) *IntervalUpdate
- func (iu *IntervalUpdate) SetStockID(i int) *IntervalUpdate
- func (iu *IntervalUpdate) Where(ps ...predicate.Interval) *IntervalUpdate
- type IntervalUpdateOne
- func (iuo *IntervalUpdateOne) AddBarIDs(ids ...int) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) AddBars(b ...*BarTimeRange) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) AddTradeIDs(ids ...int) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) AddTrades(t ...*TradeTimeRange) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) ClearBars() *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) ClearDataSource() *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) ClearStock() *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) ClearTrades() *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) Exec(ctx context.Context) error
- func (iuo *IntervalUpdateOne) ExecX(ctx context.Context)
- func (iuo *IntervalUpdateOne) Mutation() *IntervalMutation
- func (iuo *IntervalUpdateOne) RemoveBarIDs(ids ...int) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) RemoveBars(b ...*BarTimeRange) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) RemoveTradeIDs(ids ...int) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) RemoveTrades(t ...*TradeTimeRange) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) Save(ctx context.Context) (*Interval, error)
- func (iuo *IntervalUpdateOne) SaveX(ctx context.Context) *Interval
- func (iuo *IntervalUpdateOne) Select(field string, fields ...string) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetActive(b bool) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetDataSource(d *DataSource) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetDataSourceID(i int) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetInterval(i interval.Interval) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetNillableActive(b *bool) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetStock(e *Entity) *IntervalUpdateOne
- func (iuo *IntervalUpdateOne) SetStockID(i int) *IntervalUpdateOne
- type Intervals
- type MarketHours
- type MarketHoursClient
- func (c *MarketHoursClient) Create() *MarketHoursCreate
- func (c *MarketHoursClient) CreateBulk(builders ...*MarketHoursCreate) *MarketHoursCreateBulk
- func (c *MarketHoursClient) Delete() *MarketHoursDelete
- func (c *MarketHoursClient) DeleteOne(mh *MarketHours) *MarketHoursDeleteOne
- func (c *MarketHoursClient) DeleteOneID(id int) *MarketHoursDeleteOne
- func (c *MarketHoursClient) Get(ctx context.Context, id int) (*MarketHours, error)
- func (c *MarketHoursClient) GetX(ctx context.Context, id int) *MarketHours
- func (c *MarketHoursClient) Hooks() []Hook
- func (c *MarketHoursClient) Intercept(interceptors ...Interceptor)
- func (c *MarketHoursClient) Interceptors() []Interceptor
- func (c *MarketHoursClient) Query() *MarketHoursQuery
- func (c *MarketHoursClient) QueryMarketInfo(mh *MarketHours) *MarketInfoQuery
- func (c *MarketHoursClient) Update() *MarketHoursUpdate
- func (c *MarketHoursClient) UpdateOne(mh *MarketHours) *MarketHoursUpdateOne
- func (c *MarketHoursClient) UpdateOneID(id int) *MarketHoursUpdateOne
- func (c *MarketHoursClient) Use(hooks ...Hook)
- type MarketHoursCreate
- func (mhc *MarketHoursCreate) Exec(ctx context.Context) error
- func (mhc *MarketHoursCreate) ExecX(ctx context.Context)
- func (mhc *MarketHoursCreate) Mutation() *MarketHoursMutation
- func (mhc *MarketHoursCreate) Save(ctx context.Context) (*MarketHours, error)
- func (mhc *MarketHoursCreate) SaveX(ctx context.Context) *MarketHours
- func (mhc *MarketHoursCreate) SetDate(t time.Time) *MarketHoursCreate
- func (mhc *MarketHoursCreate) SetEndTime(t time.Time) *MarketHoursCreate
- func (mhc *MarketHoursCreate) SetMarketInfo(m *MarketInfo) *MarketHoursCreate
- func (mhc *MarketHoursCreate) SetMarketInfoID(id int) *MarketHoursCreate
- func (mhc *MarketHoursCreate) SetNillableMarketInfoID(id *int) *MarketHoursCreate
- func (mhc *MarketHoursCreate) SetStartTime(t time.Time) *MarketHoursCreate
- type MarketHoursCreateBulk
- type MarketHoursDelete
- type MarketHoursDeleteOne
- type MarketHoursEdges
- type MarketHoursGroupBy
- func (mhgb *MarketHoursGroupBy) Aggregate(fns ...AggregateFunc) *MarketHoursGroupBy
- func (s *MarketHoursGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MarketHoursGroupBy) BoolX(ctx context.Context) bool
- func (s *MarketHoursGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MarketHoursGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MarketHoursGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MarketHoursGroupBy) Float64X(ctx context.Context) float64
- func (s *MarketHoursGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MarketHoursGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MarketHoursGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MarketHoursGroupBy) IntX(ctx context.Context) int
- func (s *MarketHoursGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MarketHoursGroupBy) IntsX(ctx context.Context) []int
- func (mhgb *MarketHoursGroupBy) Scan(ctx context.Context, v any) error
- func (s *MarketHoursGroupBy) ScanX(ctx context.Context, v any)
- func (s *MarketHoursGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MarketHoursGroupBy) StringX(ctx context.Context) string
- func (s *MarketHoursGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MarketHoursGroupBy) StringsX(ctx context.Context) []string
- type MarketHoursMutation
- func (m *MarketHoursMutation) AddField(name string, value ent.Value) error
- func (m *MarketHoursMutation) AddedEdges() []string
- func (m *MarketHoursMutation) AddedField(name string) (ent.Value, bool)
- func (m *MarketHoursMutation) AddedFields() []string
- func (m *MarketHoursMutation) AddedIDs(name string) []ent.Value
- func (m *MarketHoursMutation) ClearEdge(name string) error
- func (m *MarketHoursMutation) ClearField(name string) error
- func (m *MarketHoursMutation) ClearMarketInfo()
- func (m *MarketHoursMutation) ClearedEdges() []string
- func (m *MarketHoursMutation) ClearedFields() []string
- func (m MarketHoursMutation) Client() *Client
- func (m *MarketHoursMutation) Date() (r time.Time, exists bool)
- func (m *MarketHoursMutation) EdgeCleared(name string) bool
- func (m *MarketHoursMutation) EndTime() (r time.Time, exists bool)
- func (m *MarketHoursMutation) Field(name string) (ent.Value, bool)
- func (m *MarketHoursMutation) FieldCleared(name string) bool
- func (m *MarketHoursMutation) Fields() []string
- func (m *MarketHoursMutation) ID() (id int, exists bool)
- func (m *MarketHoursMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MarketHoursMutation) MarketInfoCleared() bool
- func (m *MarketHoursMutation) MarketInfoID() (id int, exists bool)
- func (m *MarketHoursMutation) MarketInfoIDs() (ids []int)
- func (m *MarketHoursMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *MarketHoursMutation) OldEndTime(ctx context.Context) (v time.Time, err error)
- func (m *MarketHoursMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MarketHoursMutation) OldStartTime(ctx context.Context) (v time.Time, err error)
- func (m *MarketHoursMutation) Op() Op
- func (m *MarketHoursMutation) RemovedEdges() []string
- func (m *MarketHoursMutation) RemovedIDs(name string) []ent.Value
- func (m *MarketHoursMutation) ResetDate()
- func (m *MarketHoursMutation) ResetEdge(name string) error
- func (m *MarketHoursMutation) ResetEndTime()
- func (m *MarketHoursMutation) ResetField(name string) error
- func (m *MarketHoursMutation) ResetMarketInfo()
- func (m *MarketHoursMutation) ResetStartTime()
- func (m *MarketHoursMutation) SetDate(t time.Time)
- func (m *MarketHoursMutation) SetEndTime(t time.Time)
- func (m *MarketHoursMutation) SetField(name string, value ent.Value) error
- func (m *MarketHoursMutation) SetMarketInfoID(id int)
- func (m *MarketHoursMutation) SetOp(op Op)
- func (m *MarketHoursMutation) SetStartTime(t time.Time)
- func (m *MarketHoursMutation) StartTime() (r time.Time, exists bool)
- func (m MarketHoursMutation) Tx() (*Tx, error)
- func (m *MarketHoursMutation) Type() string
- func (m *MarketHoursMutation) Where(ps ...predicate.MarketHours)
- func (m *MarketHoursMutation) WhereP(ps ...func(*sql.Selector))
- type MarketHoursQuery
- func (mhq *MarketHoursQuery) Aggregate(fns ...AggregateFunc) *MarketHoursSelect
- func (mhq *MarketHoursQuery) All(ctx context.Context) ([]*MarketHours, error)
- func (mhq *MarketHoursQuery) AllX(ctx context.Context) []*MarketHours
- func (mhq *MarketHoursQuery) Clone() *MarketHoursQuery
- func (mhq *MarketHoursQuery) Count(ctx context.Context) (int, error)
- func (mhq *MarketHoursQuery) CountX(ctx context.Context) int
- func (mhq *MarketHoursQuery) Exist(ctx context.Context) (bool, error)
- func (mhq *MarketHoursQuery) ExistX(ctx context.Context) bool
- func (mhq *MarketHoursQuery) First(ctx context.Context) (*MarketHours, error)
- func (mhq *MarketHoursQuery) FirstID(ctx context.Context) (id int, err error)
- func (mhq *MarketHoursQuery) FirstIDX(ctx context.Context) int
- func (mhq *MarketHoursQuery) FirstX(ctx context.Context) *MarketHours
- func (mhq *MarketHoursQuery) GroupBy(field string, fields ...string) *MarketHoursGroupBy
- func (mhq *MarketHoursQuery) IDs(ctx context.Context) ([]int, error)
- func (mhq *MarketHoursQuery) IDsX(ctx context.Context) []int
- func (mhq *MarketHoursQuery) Limit(limit int) *MarketHoursQuery
- func (mhq *MarketHoursQuery) Offset(offset int) *MarketHoursQuery
- func (mhq *MarketHoursQuery) Only(ctx context.Context) (*MarketHours, error)
- func (mhq *MarketHoursQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mhq *MarketHoursQuery) OnlyIDX(ctx context.Context) int
- func (mhq *MarketHoursQuery) OnlyX(ctx context.Context) *MarketHours
- func (mhq *MarketHoursQuery) Order(o ...OrderFunc) *MarketHoursQuery
- func (mhq *MarketHoursQuery) QueryMarketInfo() *MarketInfoQuery
- func (mhq *MarketHoursQuery) Select(fields ...string) *MarketHoursSelect
- func (mhq *MarketHoursQuery) Unique(unique bool) *MarketHoursQuery
- func (mhq *MarketHoursQuery) Where(ps ...predicate.MarketHours) *MarketHoursQuery
- func (mhq *MarketHoursQuery) WithMarketInfo(opts ...func(*MarketInfoQuery)) *MarketHoursQuery
- type MarketHoursSelect
- func (mhs *MarketHoursSelect) Aggregate(fns ...AggregateFunc) *MarketHoursSelect
- func (s *MarketHoursSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MarketHoursSelect) BoolX(ctx context.Context) bool
- func (s *MarketHoursSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MarketHoursSelect) BoolsX(ctx context.Context) []bool
- func (s *MarketHoursSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MarketHoursSelect) Float64X(ctx context.Context) float64
- func (s *MarketHoursSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MarketHoursSelect) Float64sX(ctx context.Context) []float64
- func (s *MarketHoursSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MarketHoursSelect) IntX(ctx context.Context) int
- func (s *MarketHoursSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MarketHoursSelect) IntsX(ctx context.Context) []int
- func (mhs *MarketHoursSelect) Scan(ctx context.Context, v any) error
- func (s *MarketHoursSelect) ScanX(ctx context.Context, v any)
- func (s *MarketHoursSelect) String(ctx context.Context) (_ string, err error)
- func (s *MarketHoursSelect) StringX(ctx context.Context) string
- func (s *MarketHoursSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MarketHoursSelect) StringsX(ctx context.Context) []string
- type MarketHoursSlice
- type MarketHoursUpdate
- func (mhu *MarketHoursUpdate) ClearMarketInfo() *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) Exec(ctx context.Context) error
- func (mhu *MarketHoursUpdate) ExecX(ctx context.Context)
- func (mhu *MarketHoursUpdate) Mutation() *MarketHoursMutation
- func (mhu *MarketHoursUpdate) Save(ctx context.Context) (int, error)
- func (mhu *MarketHoursUpdate) SaveX(ctx context.Context) int
- func (mhu *MarketHoursUpdate) SetDate(t time.Time) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) SetEndTime(t time.Time) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) SetMarketInfo(m *MarketInfo) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) SetMarketInfoID(id int) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) SetNillableMarketInfoID(id *int) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) SetStartTime(t time.Time) *MarketHoursUpdate
- func (mhu *MarketHoursUpdate) Where(ps ...predicate.MarketHours) *MarketHoursUpdate
- type MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) ClearMarketInfo() *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) Exec(ctx context.Context) error
- func (mhuo *MarketHoursUpdateOne) ExecX(ctx context.Context)
- func (mhuo *MarketHoursUpdateOne) Mutation() *MarketHoursMutation
- func (mhuo *MarketHoursUpdateOne) Save(ctx context.Context) (*MarketHours, error)
- func (mhuo *MarketHoursUpdateOne) SaveX(ctx context.Context) *MarketHours
- func (mhuo *MarketHoursUpdateOne) Select(field string, fields ...string) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetDate(t time.Time) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetEndTime(t time.Time) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetMarketInfo(m *MarketInfo) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetMarketInfoID(id int) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetNillableMarketInfoID(id *int) *MarketHoursUpdateOne
- func (mhuo *MarketHoursUpdateOne) SetStartTime(t time.Time) *MarketHoursUpdateOne
- type MarketInfo
- type MarketInfoClient
- func (c *MarketInfoClient) Create() *MarketInfoCreate
- func (c *MarketInfoClient) CreateBulk(builders ...*MarketInfoCreate) *MarketInfoCreateBulk
- func (c *MarketInfoClient) Delete() *MarketInfoDelete
- func (c *MarketInfoClient) DeleteOne(mi *MarketInfo) *MarketInfoDeleteOne
- func (c *MarketInfoClient) DeleteOneID(id int) *MarketInfoDeleteOne
- func (c *MarketInfoClient) Get(ctx context.Context, id int) (*MarketInfo, error)
- func (c *MarketInfoClient) GetX(ctx context.Context, id int) *MarketInfo
- func (c *MarketInfoClient) Hooks() []Hook
- func (c *MarketInfoClient) Intercept(interceptors ...Interceptor)
- func (c *MarketInfoClient) Interceptors() []Interceptor
- func (c *MarketInfoClient) Query() *MarketInfoQuery
- func (c *MarketInfoClient) QueryHours(mi *MarketInfo) *MarketHoursQuery
- func (c *MarketInfoClient) Update() *MarketInfoUpdate
- func (c *MarketInfoClient) UpdateOne(mi *MarketInfo) *MarketInfoUpdateOne
- func (c *MarketInfoClient) UpdateOneID(id int) *MarketInfoUpdateOne
- func (c *MarketInfoClient) Use(hooks ...Hook)
- type MarketInfoCreate
- func (mic *MarketInfoCreate) AddHourIDs(ids ...int) *MarketInfoCreate
- func (mic *MarketInfoCreate) AddHours(m ...*MarketHours) *MarketInfoCreate
- func (mic *MarketInfoCreate) Exec(ctx context.Context) error
- func (mic *MarketInfoCreate) ExecX(ctx context.Context)
- func (mic *MarketInfoCreate) Mutation() *MarketInfoMutation
- func (mic *MarketInfoCreate) Save(ctx context.Context) (*MarketInfo, error)
- func (mic *MarketInfoCreate) SaveX(ctx context.Context) *MarketInfo
- func (mic *MarketInfoCreate) SetHoursEnd(t time.Time) *MarketInfoCreate
- func (mic *MarketInfoCreate) SetHoursStart(t time.Time) *MarketInfoCreate
- type MarketInfoCreateBulk
- type MarketInfoDelete
- type MarketInfoDeleteOne
- type MarketInfoEdges
- type MarketInfoGroupBy
- func (migb *MarketInfoGroupBy) Aggregate(fns ...AggregateFunc) *MarketInfoGroupBy
- func (s *MarketInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MarketInfoGroupBy) BoolX(ctx context.Context) bool
- func (s *MarketInfoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MarketInfoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MarketInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MarketInfoGroupBy) Float64X(ctx context.Context) float64
- func (s *MarketInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MarketInfoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MarketInfoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MarketInfoGroupBy) IntX(ctx context.Context) int
- func (s *MarketInfoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MarketInfoGroupBy) IntsX(ctx context.Context) []int
- func (migb *MarketInfoGroupBy) Scan(ctx context.Context, v any) error
- func (s *MarketInfoGroupBy) ScanX(ctx context.Context, v any)
- func (s *MarketInfoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MarketInfoGroupBy) StringX(ctx context.Context) string
- func (s *MarketInfoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MarketInfoGroupBy) StringsX(ctx context.Context) []string
- type MarketInfoMutation
- func (m *MarketInfoMutation) AddField(name string, value ent.Value) error
- func (m *MarketInfoMutation) AddHourIDs(ids ...int)
- func (m *MarketInfoMutation) AddedEdges() []string
- func (m *MarketInfoMutation) AddedField(name string) (ent.Value, bool)
- func (m *MarketInfoMutation) AddedFields() []string
- func (m *MarketInfoMutation) AddedIDs(name string) []ent.Value
- func (m *MarketInfoMutation) ClearEdge(name string) error
- func (m *MarketInfoMutation) ClearField(name string) error
- func (m *MarketInfoMutation) ClearHours()
- func (m *MarketInfoMutation) ClearedEdges() []string
- func (m *MarketInfoMutation) ClearedFields() []string
- func (m MarketInfoMutation) Client() *Client
- func (m *MarketInfoMutation) EdgeCleared(name string) bool
- func (m *MarketInfoMutation) Field(name string) (ent.Value, bool)
- func (m *MarketInfoMutation) FieldCleared(name string) bool
- func (m *MarketInfoMutation) Fields() []string
- func (m *MarketInfoMutation) HoursCleared() bool
- func (m *MarketInfoMutation) HoursEnd() (r time.Time, exists bool)
- func (m *MarketInfoMutation) HoursIDs() (ids []int)
- func (m *MarketInfoMutation) HoursStart() (r time.Time, exists bool)
- func (m *MarketInfoMutation) ID() (id int, exists bool)
- func (m *MarketInfoMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MarketInfoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MarketInfoMutation) OldHoursEnd(ctx context.Context) (v time.Time, err error)
- func (m *MarketInfoMutation) OldHoursStart(ctx context.Context) (v time.Time, err error)
- func (m *MarketInfoMutation) Op() Op
- func (m *MarketInfoMutation) RemoveHourIDs(ids ...int)
- func (m *MarketInfoMutation) RemovedEdges() []string
- func (m *MarketInfoMutation) RemovedHoursIDs() (ids []int)
- func (m *MarketInfoMutation) RemovedIDs(name string) []ent.Value
- func (m *MarketInfoMutation) ResetEdge(name string) error
- func (m *MarketInfoMutation) ResetField(name string) error
- func (m *MarketInfoMutation) ResetHours()
- func (m *MarketInfoMutation) ResetHoursEnd()
- func (m *MarketInfoMutation) ResetHoursStart()
- func (m *MarketInfoMutation) SetField(name string, value ent.Value) error
- func (m *MarketInfoMutation) SetHoursEnd(t time.Time)
- func (m *MarketInfoMutation) SetHoursStart(t time.Time)
- func (m *MarketInfoMutation) SetOp(op Op)
- func (m MarketInfoMutation) Tx() (*Tx, error)
- func (m *MarketInfoMutation) Type() string
- func (m *MarketInfoMutation) Where(ps ...predicate.MarketInfo)
- func (m *MarketInfoMutation) WhereP(ps ...func(*sql.Selector))
- type MarketInfoQuery
- func (miq *MarketInfoQuery) Aggregate(fns ...AggregateFunc) *MarketInfoSelect
- func (miq *MarketInfoQuery) All(ctx context.Context) ([]*MarketInfo, error)
- func (miq *MarketInfoQuery) AllX(ctx context.Context) []*MarketInfo
- func (miq *MarketInfoQuery) Clone() *MarketInfoQuery
- func (miq *MarketInfoQuery) Count(ctx context.Context) (int, error)
- func (miq *MarketInfoQuery) CountX(ctx context.Context) int
- func (miq *MarketInfoQuery) Exist(ctx context.Context) (bool, error)
- func (miq *MarketInfoQuery) ExistX(ctx context.Context) bool
- func (miq *MarketInfoQuery) First(ctx context.Context) (*MarketInfo, error)
- func (miq *MarketInfoQuery) FirstID(ctx context.Context) (id int, err error)
- func (miq *MarketInfoQuery) FirstIDX(ctx context.Context) int
- func (miq *MarketInfoQuery) FirstX(ctx context.Context) *MarketInfo
- func (miq *MarketInfoQuery) GroupBy(field string, fields ...string) *MarketInfoGroupBy
- func (miq *MarketInfoQuery) IDs(ctx context.Context) ([]int, error)
- func (miq *MarketInfoQuery) IDsX(ctx context.Context) []int
- func (miq *MarketInfoQuery) Limit(limit int) *MarketInfoQuery
- func (miq *MarketInfoQuery) Offset(offset int) *MarketInfoQuery
- func (miq *MarketInfoQuery) Only(ctx context.Context) (*MarketInfo, error)
- func (miq *MarketInfoQuery) OnlyID(ctx context.Context) (id int, err error)
- func (miq *MarketInfoQuery) OnlyIDX(ctx context.Context) int
- func (miq *MarketInfoQuery) OnlyX(ctx context.Context) *MarketInfo
- func (miq *MarketInfoQuery) Order(o ...OrderFunc) *MarketInfoQuery
- func (miq *MarketInfoQuery) QueryHours() *MarketHoursQuery
- func (miq *MarketInfoQuery) Select(fields ...string) *MarketInfoSelect
- func (miq *MarketInfoQuery) Unique(unique bool) *MarketInfoQuery
- func (miq *MarketInfoQuery) Where(ps ...predicate.MarketInfo) *MarketInfoQuery
- func (miq *MarketInfoQuery) WithHours(opts ...func(*MarketHoursQuery)) *MarketInfoQuery
- type MarketInfoSelect
- func (mis *MarketInfoSelect) Aggregate(fns ...AggregateFunc) *MarketInfoSelect
- func (s *MarketInfoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MarketInfoSelect) BoolX(ctx context.Context) bool
- func (s *MarketInfoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MarketInfoSelect) BoolsX(ctx context.Context) []bool
- func (s *MarketInfoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MarketInfoSelect) Float64X(ctx context.Context) float64
- func (s *MarketInfoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MarketInfoSelect) Float64sX(ctx context.Context) []float64
- func (s *MarketInfoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MarketInfoSelect) IntX(ctx context.Context) int
- func (s *MarketInfoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MarketInfoSelect) IntsX(ctx context.Context) []int
- func (mis *MarketInfoSelect) Scan(ctx context.Context, v any) error
- func (s *MarketInfoSelect) ScanX(ctx context.Context, v any)
- func (s *MarketInfoSelect) String(ctx context.Context) (_ string, err error)
- func (s *MarketInfoSelect) StringX(ctx context.Context) string
- func (s *MarketInfoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MarketInfoSelect) StringsX(ctx context.Context) []string
- type MarketInfoUpdate
- func (miu *MarketInfoUpdate) AddHourIDs(ids ...int) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) AddHours(m ...*MarketHours) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) ClearHours() *MarketInfoUpdate
- func (miu *MarketInfoUpdate) Exec(ctx context.Context) error
- func (miu *MarketInfoUpdate) ExecX(ctx context.Context)
- func (miu *MarketInfoUpdate) Mutation() *MarketInfoMutation
- func (miu *MarketInfoUpdate) RemoveHourIDs(ids ...int) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) RemoveHours(m ...*MarketHours) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) Save(ctx context.Context) (int, error)
- func (miu *MarketInfoUpdate) SaveX(ctx context.Context) int
- func (miu *MarketInfoUpdate) SetHoursEnd(t time.Time) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) SetHoursStart(t time.Time) *MarketInfoUpdate
- func (miu *MarketInfoUpdate) Where(ps ...predicate.MarketInfo) *MarketInfoUpdate
- type MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) AddHourIDs(ids ...int) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) AddHours(m ...*MarketHours) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) ClearHours() *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) Exec(ctx context.Context) error
- func (miuo *MarketInfoUpdateOne) ExecX(ctx context.Context)
- func (miuo *MarketInfoUpdateOne) Mutation() *MarketInfoMutation
- func (miuo *MarketInfoUpdateOne) RemoveHourIDs(ids ...int) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) RemoveHours(m ...*MarketHours) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) Save(ctx context.Context) (*MarketInfo, error)
- func (miuo *MarketInfoUpdateOne) SaveX(ctx context.Context) *MarketInfo
- func (miuo *MarketInfoUpdateOne) Select(field string, fields ...string) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) SetHoursEnd(t time.Time) *MarketInfoUpdateOne
- func (miuo *MarketInfoUpdateOne) SetHoursStart(t time.Time) *MarketInfoUpdateOne
- type MarketInfos
- 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 RollbackFunc
- type RollbackHook
- type Rollbacker
- type Split
- type SplitClient
- func (c *SplitClient) Create() *SplitCreate
- func (c *SplitClient) CreateBulk(builders ...*SplitCreate) *SplitCreateBulk
- func (c *SplitClient) Delete() *SplitDelete
- func (c *SplitClient) DeleteOne(s *Split) *SplitDeleteOne
- func (c *SplitClient) DeleteOneID(id int) *SplitDeleteOne
- func (c *SplitClient) Get(ctx context.Context, id int) (*Split, error)
- func (c *SplitClient) GetX(ctx context.Context, id int) *Split
- func (c *SplitClient) Hooks() []Hook
- func (c *SplitClient) Intercept(interceptors ...Interceptor)
- func (c *SplitClient) Interceptors() []Interceptor
- func (c *SplitClient) Query() *SplitQuery
- func (c *SplitClient) QueryStock(s *Split) *EntityQuery
- func (c *SplitClient) Update() *SplitUpdate
- func (c *SplitClient) UpdateOne(s *Split) *SplitUpdateOne
- func (c *SplitClient) UpdateOneID(id int) *SplitUpdateOne
- func (c *SplitClient) Use(hooks ...Hook)
- type SplitCreate
- func (sc *SplitCreate) Exec(ctx context.Context) error
- func (sc *SplitCreate) ExecX(ctx context.Context)
- func (sc *SplitCreate) Mutation() *SplitMutation
- func (sc *SplitCreate) Save(ctx context.Context) (*Split, error)
- func (sc *SplitCreate) SaveX(ctx context.Context) *Split
- func (sc *SplitCreate) SetExecutionDate(t time.Time) *SplitCreate
- func (sc *SplitCreate) SetFrom(f float64) *SplitCreate
- func (sc *SplitCreate) SetNillableStockID(id *int) *SplitCreate
- func (sc *SplitCreate) SetStock(e *Entity) *SplitCreate
- func (sc *SplitCreate) SetStockID(id int) *SplitCreate
- func (sc *SplitCreate) SetTo(f float64) *SplitCreate
- type SplitCreateBulk
- type SplitDelete
- type SplitDeleteOne
- type SplitEdges
- type SplitGroupBy
- func (sgb *SplitGroupBy) Aggregate(fns ...AggregateFunc) *SplitGroupBy
- func (s *SplitGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SplitGroupBy) BoolX(ctx context.Context) bool
- func (s *SplitGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SplitGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SplitGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SplitGroupBy) Float64X(ctx context.Context) float64
- func (s *SplitGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SplitGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SplitGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SplitGroupBy) IntX(ctx context.Context) int
- func (s *SplitGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SplitGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SplitGroupBy) Scan(ctx context.Context, v any) error
- func (s *SplitGroupBy) ScanX(ctx context.Context, v any)
- func (s *SplitGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SplitGroupBy) StringX(ctx context.Context) string
- func (s *SplitGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SplitGroupBy) StringsX(ctx context.Context) []string
- type SplitMutation
- func (m *SplitMutation) AddField(name string, value ent.Value) error
- func (m *SplitMutation) AddFrom(f float64)
- func (m *SplitMutation) AddTo(f float64)
- func (m *SplitMutation) AddedEdges() []string
- func (m *SplitMutation) AddedField(name string) (ent.Value, bool)
- func (m *SplitMutation) AddedFields() []string
- func (m *SplitMutation) AddedFrom() (r float64, exists bool)
- func (m *SplitMutation) AddedIDs(name string) []ent.Value
- func (m *SplitMutation) AddedTo() (r float64, exists bool)
- func (m *SplitMutation) ClearEdge(name string) error
- func (m *SplitMutation) ClearField(name string) error
- func (m *SplitMutation) ClearStock()
- func (m *SplitMutation) ClearedEdges() []string
- func (m *SplitMutation) ClearedFields() []string
- func (m SplitMutation) Client() *Client
- func (m *SplitMutation) EdgeCleared(name string) bool
- func (m *SplitMutation) ExecutionDate() (r time.Time, exists bool)
- func (m *SplitMutation) Field(name string) (ent.Value, bool)
- func (m *SplitMutation) FieldCleared(name string) bool
- func (m *SplitMutation) Fields() []string
- func (m *SplitMutation) From() (r float64, exists bool)
- func (m *SplitMutation) ID() (id int, exists bool)
- func (m *SplitMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SplitMutation) OldExecutionDate(ctx context.Context) (v time.Time, err error)
- func (m *SplitMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SplitMutation) OldFrom(ctx context.Context) (v float64, err error)
- func (m *SplitMutation) OldTo(ctx context.Context) (v float64, err error)
- func (m *SplitMutation) Op() Op
- func (m *SplitMutation) RemovedEdges() []string
- func (m *SplitMutation) RemovedIDs(name string) []ent.Value
- func (m *SplitMutation) ResetEdge(name string) error
- func (m *SplitMutation) ResetExecutionDate()
- func (m *SplitMutation) ResetField(name string) error
- func (m *SplitMutation) ResetFrom()
- func (m *SplitMutation) ResetStock()
- func (m *SplitMutation) ResetTo()
- func (m *SplitMutation) SetExecutionDate(t time.Time)
- func (m *SplitMutation) SetField(name string, value ent.Value) error
- func (m *SplitMutation) SetFrom(f float64)
- func (m *SplitMutation) SetOp(op Op)
- func (m *SplitMutation) SetStockID(id int)
- func (m *SplitMutation) SetTo(f float64)
- func (m *SplitMutation) StockCleared() bool
- func (m *SplitMutation) StockID() (id int, exists bool)
- func (m *SplitMutation) StockIDs() (ids []int)
- func (m *SplitMutation) To() (r float64, exists bool)
- func (m SplitMutation) Tx() (*Tx, error)
- func (m *SplitMutation) Type() string
- func (m *SplitMutation) Where(ps ...predicate.Split)
- func (m *SplitMutation) WhereP(ps ...func(*sql.Selector))
- type SplitQuery
- func (sq *SplitQuery) Aggregate(fns ...AggregateFunc) *SplitSelect
- func (sq *SplitQuery) All(ctx context.Context) ([]*Split, error)
- func (sq *SplitQuery) AllX(ctx context.Context) []*Split
- func (sq *SplitQuery) Clone() *SplitQuery
- func (sq *SplitQuery) Count(ctx context.Context) (int, error)
- func (sq *SplitQuery) CountX(ctx context.Context) int
- func (sq *SplitQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SplitQuery) ExistX(ctx context.Context) bool
- func (sq *SplitQuery) First(ctx context.Context) (*Split, error)
- func (sq *SplitQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SplitQuery) FirstIDX(ctx context.Context) int
- func (sq *SplitQuery) FirstX(ctx context.Context) *Split
- func (sq *SplitQuery) GroupBy(field string, fields ...string) *SplitGroupBy
- func (sq *SplitQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SplitQuery) IDsX(ctx context.Context) []int
- func (sq *SplitQuery) Limit(limit int) *SplitQuery
- func (sq *SplitQuery) Offset(offset int) *SplitQuery
- func (sq *SplitQuery) Only(ctx context.Context) (*Split, error)
- func (sq *SplitQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SplitQuery) OnlyIDX(ctx context.Context) int
- func (sq *SplitQuery) OnlyX(ctx context.Context) *Split
- func (sq *SplitQuery) Order(o ...OrderFunc) *SplitQuery
- func (sq *SplitQuery) QueryStock() *EntityQuery
- func (sq *SplitQuery) Select(fields ...string) *SplitSelect
- func (sq *SplitQuery) Unique(unique bool) *SplitQuery
- func (sq *SplitQuery) Where(ps ...predicate.Split) *SplitQuery
- func (sq *SplitQuery) WithStock(opts ...func(*EntityQuery)) *SplitQuery
- type SplitSelect
- func (ss *SplitSelect) Aggregate(fns ...AggregateFunc) *SplitSelect
- func (s *SplitSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SplitSelect) BoolX(ctx context.Context) bool
- func (s *SplitSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SplitSelect) BoolsX(ctx context.Context) []bool
- func (s *SplitSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SplitSelect) Float64X(ctx context.Context) float64
- func (s *SplitSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SplitSelect) Float64sX(ctx context.Context) []float64
- func (s *SplitSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SplitSelect) IntX(ctx context.Context) int
- func (s *SplitSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SplitSelect) IntsX(ctx context.Context) []int
- func (ss *SplitSelect) Scan(ctx context.Context, v any) error
- func (s *SplitSelect) ScanX(ctx context.Context, v any)
- func (s *SplitSelect) String(ctx context.Context) (_ string, err error)
- func (s *SplitSelect) StringX(ctx context.Context) string
- func (s *SplitSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SplitSelect) StringsX(ctx context.Context) []string
- type SplitUpdate
- func (su *SplitUpdate) AddFrom(f float64) *SplitUpdate
- func (su *SplitUpdate) AddTo(f float64) *SplitUpdate
- func (su *SplitUpdate) ClearStock() *SplitUpdate
- func (su *SplitUpdate) Exec(ctx context.Context) error
- func (su *SplitUpdate) ExecX(ctx context.Context)
- func (su *SplitUpdate) Mutation() *SplitMutation
- func (su *SplitUpdate) Save(ctx context.Context) (int, error)
- func (su *SplitUpdate) SaveX(ctx context.Context) int
- func (su *SplitUpdate) SetExecutionDate(t time.Time) *SplitUpdate
- func (su *SplitUpdate) SetFrom(f float64) *SplitUpdate
- func (su *SplitUpdate) SetNillableStockID(id *int) *SplitUpdate
- func (su *SplitUpdate) SetStock(e *Entity) *SplitUpdate
- func (su *SplitUpdate) SetStockID(id int) *SplitUpdate
- func (su *SplitUpdate) SetTo(f float64) *SplitUpdate
- func (su *SplitUpdate) Where(ps ...predicate.Split) *SplitUpdate
- type SplitUpdateOne
- func (suo *SplitUpdateOne) AddFrom(f float64) *SplitUpdateOne
- func (suo *SplitUpdateOne) AddTo(f float64) *SplitUpdateOne
- func (suo *SplitUpdateOne) ClearStock() *SplitUpdateOne
- func (suo *SplitUpdateOne) Exec(ctx context.Context) error
- func (suo *SplitUpdateOne) ExecX(ctx context.Context)
- func (suo *SplitUpdateOne) Mutation() *SplitMutation
- func (suo *SplitUpdateOne) Save(ctx context.Context) (*Split, error)
- func (suo *SplitUpdateOne) SaveX(ctx context.Context) *Split
- func (suo *SplitUpdateOne) Select(field string, fields ...string) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetExecutionDate(t time.Time) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetFrom(f float64) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetNillableStockID(id *int) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetStock(e *Entity) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetStockID(id int) *SplitUpdateOne
- func (suo *SplitUpdateOne) SetTo(f float64) *SplitUpdateOne
- type Splits
- type TradeCondition
- type TradeConditionClient
- func (c *TradeConditionClient) Create() *TradeConditionCreate
- func (c *TradeConditionClient) CreateBulk(builders ...*TradeConditionCreate) *TradeConditionCreateBulk
- func (c *TradeConditionClient) Delete() *TradeConditionDelete
- func (c *TradeConditionClient) DeleteOne(tc *TradeCondition) *TradeConditionDeleteOne
- func (c *TradeConditionClient) DeleteOneID(id int) *TradeConditionDeleteOne
- func (c *TradeConditionClient) Get(ctx context.Context, id int) (*TradeCondition, error)
- func (c *TradeConditionClient) GetX(ctx context.Context, id int) *TradeCondition
- func (c *TradeConditionClient) Hooks() []Hook
- func (c *TradeConditionClient) Intercept(interceptors ...Interceptor)
- func (c *TradeConditionClient) Interceptors() []Interceptor
- func (c *TradeConditionClient) Query() *TradeConditionQuery
- func (c *TradeConditionClient) QueryRecord(tc *TradeCondition) *TradeRecordQuery
- func (c *TradeConditionClient) Update() *TradeConditionUpdate
- func (c *TradeConditionClient) UpdateOne(tc *TradeCondition) *TradeConditionUpdateOne
- func (c *TradeConditionClient) UpdateOneID(id int) *TradeConditionUpdateOne
- func (c *TradeConditionClient) Use(hooks ...Hook)
- type TradeConditionCreate
- func (tcc *TradeConditionCreate) AddRecord(t ...*TradeRecord) *TradeConditionCreate
- func (tcc *TradeConditionCreate) AddRecordIDs(ids ...int) *TradeConditionCreate
- func (tcc *TradeConditionCreate) Exec(ctx context.Context) error
- func (tcc *TradeConditionCreate) ExecX(ctx context.Context)
- func (tcc *TradeConditionCreate) Mutation() *TradeConditionMutation
- func (tcc *TradeConditionCreate) Save(ctx context.Context) (*TradeCondition, error)
- func (tcc *TradeConditionCreate) SaveX(ctx context.Context) *TradeCondition
- func (tcc *TradeConditionCreate) SetCondition(s string) *TradeConditionCreate
- type TradeConditionCreateBulk
- func (tccb *TradeConditionCreateBulk) Exec(ctx context.Context) error
- func (tccb *TradeConditionCreateBulk) ExecX(ctx context.Context)
- func (tccb *TradeConditionCreateBulk) Save(ctx context.Context) ([]*TradeCondition, error)
- func (tccb *TradeConditionCreateBulk) SaveX(ctx context.Context) []*TradeCondition
- type TradeConditionDelete
- type TradeConditionDeleteOne
- type TradeConditionEdges
- type TradeConditionGroupBy
- func (tcgb *TradeConditionGroupBy) Aggregate(fns ...AggregateFunc) *TradeConditionGroupBy
- func (s *TradeConditionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeConditionGroupBy) BoolX(ctx context.Context) bool
- func (s *TradeConditionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeConditionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TradeConditionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeConditionGroupBy) Float64X(ctx context.Context) float64
- func (s *TradeConditionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeConditionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TradeConditionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TradeConditionGroupBy) IntX(ctx context.Context) int
- func (s *TradeConditionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TradeConditionGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *TradeConditionGroupBy) Scan(ctx context.Context, v any) error
- func (s *TradeConditionGroupBy) ScanX(ctx context.Context, v any)
- func (s *TradeConditionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TradeConditionGroupBy) StringX(ctx context.Context) string
- func (s *TradeConditionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TradeConditionGroupBy) StringsX(ctx context.Context) []string
- type TradeConditionMutation
- func (m *TradeConditionMutation) AddField(name string, value ent.Value) error
- func (m *TradeConditionMutation) AddRecordIDs(ids ...int)
- func (m *TradeConditionMutation) AddedEdges() []string
- func (m *TradeConditionMutation) AddedField(name string) (ent.Value, bool)
- func (m *TradeConditionMutation) AddedFields() []string
- func (m *TradeConditionMutation) AddedIDs(name string) []ent.Value
- func (m *TradeConditionMutation) ClearEdge(name string) error
- func (m *TradeConditionMutation) ClearField(name string) error
- func (m *TradeConditionMutation) ClearRecord()
- func (m *TradeConditionMutation) ClearedEdges() []string
- func (m *TradeConditionMutation) ClearedFields() []string
- func (m TradeConditionMutation) Client() *Client
- func (m *TradeConditionMutation) Condition() (r string, exists bool)
- func (m *TradeConditionMutation) EdgeCleared(name string) bool
- func (m *TradeConditionMutation) Field(name string) (ent.Value, bool)
- func (m *TradeConditionMutation) FieldCleared(name string) bool
- func (m *TradeConditionMutation) Fields() []string
- func (m *TradeConditionMutation) ID() (id int, exists bool)
- func (m *TradeConditionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TradeConditionMutation) OldCondition(ctx context.Context) (v string, err error)
- func (m *TradeConditionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TradeConditionMutation) Op() Op
- func (m *TradeConditionMutation) RecordCleared() bool
- func (m *TradeConditionMutation) RecordIDs() (ids []int)
- func (m *TradeConditionMutation) RemoveRecordIDs(ids ...int)
- func (m *TradeConditionMutation) RemovedEdges() []string
- func (m *TradeConditionMutation) RemovedIDs(name string) []ent.Value
- func (m *TradeConditionMutation) RemovedRecordIDs() (ids []int)
- func (m *TradeConditionMutation) ResetCondition()
- func (m *TradeConditionMutation) ResetEdge(name string) error
- func (m *TradeConditionMutation) ResetField(name string) error
- func (m *TradeConditionMutation) ResetRecord()
- func (m *TradeConditionMutation) SetCondition(s string)
- func (m *TradeConditionMutation) SetField(name string, value ent.Value) error
- func (m *TradeConditionMutation) SetOp(op Op)
- func (m TradeConditionMutation) Tx() (*Tx, error)
- func (m *TradeConditionMutation) Type() string
- func (m *TradeConditionMutation) Where(ps ...predicate.TradeCondition)
- func (m *TradeConditionMutation) WhereP(ps ...func(*sql.Selector))
- type TradeConditionQuery
- func (tcq *TradeConditionQuery) Aggregate(fns ...AggregateFunc) *TradeConditionSelect
- func (tcq *TradeConditionQuery) All(ctx context.Context) ([]*TradeCondition, error)
- func (tcq *TradeConditionQuery) AllX(ctx context.Context) []*TradeCondition
- func (tcq *TradeConditionQuery) Clone() *TradeConditionQuery
- func (tcq *TradeConditionQuery) Count(ctx context.Context) (int, error)
- func (tcq *TradeConditionQuery) CountX(ctx context.Context) int
- func (tcq *TradeConditionQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *TradeConditionQuery) ExistX(ctx context.Context) bool
- func (tcq *TradeConditionQuery) First(ctx context.Context) (*TradeCondition, error)
- func (tcq *TradeConditionQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *TradeConditionQuery) FirstIDX(ctx context.Context) int
- func (tcq *TradeConditionQuery) FirstX(ctx context.Context) *TradeCondition
- func (tcq *TradeConditionQuery) GroupBy(field string, fields ...string) *TradeConditionGroupBy
- func (tcq *TradeConditionQuery) IDs(ctx context.Context) ([]int, error)
- func (tcq *TradeConditionQuery) IDsX(ctx context.Context) []int
- func (tcq *TradeConditionQuery) Limit(limit int) *TradeConditionQuery
- func (tcq *TradeConditionQuery) Offset(offset int) *TradeConditionQuery
- func (tcq *TradeConditionQuery) Only(ctx context.Context) (*TradeCondition, error)
- func (tcq *TradeConditionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *TradeConditionQuery) OnlyIDX(ctx context.Context) int
- func (tcq *TradeConditionQuery) OnlyX(ctx context.Context) *TradeCondition
- func (tcq *TradeConditionQuery) Order(o ...OrderFunc) *TradeConditionQuery
- func (tcq *TradeConditionQuery) QueryRecord() *TradeRecordQuery
- func (tcq *TradeConditionQuery) Select(fields ...string) *TradeConditionSelect
- func (tcq *TradeConditionQuery) Unique(unique bool) *TradeConditionQuery
- func (tcq *TradeConditionQuery) Where(ps ...predicate.TradeCondition) *TradeConditionQuery
- func (tcq *TradeConditionQuery) WithRecord(opts ...func(*TradeRecordQuery)) *TradeConditionQuery
- type TradeConditionSelect
- func (tcs *TradeConditionSelect) Aggregate(fns ...AggregateFunc) *TradeConditionSelect
- func (s *TradeConditionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeConditionSelect) BoolX(ctx context.Context) bool
- func (s *TradeConditionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeConditionSelect) BoolsX(ctx context.Context) []bool
- func (s *TradeConditionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeConditionSelect) Float64X(ctx context.Context) float64
- func (s *TradeConditionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeConditionSelect) Float64sX(ctx context.Context) []float64
- func (s *TradeConditionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TradeConditionSelect) IntX(ctx context.Context) int
- func (s *TradeConditionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TradeConditionSelect) IntsX(ctx context.Context) []int
- func (tcs *TradeConditionSelect) Scan(ctx context.Context, v any) error
- func (s *TradeConditionSelect) ScanX(ctx context.Context, v any)
- func (s *TradeConditionSelect) String(ctx context.Context) (_ string, err error)
- func (s *TradeConditionSelect) StringX(ctx context.Context) string
- func (s *TradeConditionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TradeConditionSelect) StringsX(ctx context.Context) []string
- type TradeConditionUpdate
- func (tcu *TradeConditionUpdate) AddRecord(t ...*TradeRecord) *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) AddRecordIDs(ids ...int) *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) ClearRecord() *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) Exec(ctx context.Context) error
- func (tcu *TradeConditionUpdate) ExecX(ctx context.Context)
- func (tcu *TradeConditionUpdate) Mutation() *TradeConditionMutation
- func (tcu *TradeConditionUpdate) RemoveRecord(t ...*TradeRecord) *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) RemoveRecordIDs(ids ...int) *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) Save(ctx context.Context) (int, error)
- func (tcu *TradeConditionUpdate) SaveX(ctx context.Context) int
- func (tcu *TradeConditionUpdate) SetCondition(s string) *TradeConditionUpdate
- func (tcu *TradeConditionUpdate) Where(ps ...predicate.TradeCondition) *TradeConditionUpdate
- type TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) AddRecord(t ...*TradeRecord) *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) AddRecordIDs(ids ...int) *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) ClearRecord() *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) Exec(ctx context.Context) error
- func (tcuo *TradeConditionUpdateOne) ExecX(ctx context.Context)
- func (tcuo *TradeConditionUpdateOne) Mutation() *TradeConditionMutation
- func (tcuo *TradeConditionUpdateOne) RemoveRecord(t ...*TradeRecord) *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) RemoveRecordIDs(ids ...int) *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) Save(ctx context.Context) (*TradeCondition, error)
- func (tcuo *TradeConditionUpdateOne) SaveX(ctx context.Context) *TradeCondition
- func (tcuo *TradeConditionUpdateOne) Select(field string, fields ...string) *TradeConditionUpdateOne
- func (tcuo *TradeConditionUpdateOne) SetCondition(s string) *TradeConditionUpdateOne
- type TradeConditions
- type TradeCorrection
- type TradeCorrectionClient
- func (c *TradeCorrectionClient) Create() *TradeCorrectionCreate
- func (c *TradeCorrectionClient) CreateBulk(builders ...*TradeCorrectionCreate) *TradeCorrectionCreateBulk
- func (c *TradeCorrectionClient) Delete() *TradeCorrectionDelete
- func (c *TradeCorrectionClient) DeleteOne(tc *TradeCorrection) *TradeCorrectionDeleteOne
- func (c *TradeCorrectionClient) DeleteOneID(id int) *TradeCorrectionDeleteOne
- func (c *TradeCorrectionClient) Get(ctx context.Context, id int) (*TradeCorrection, error)
- func (c *TradeCorrectionClient) GetX(ctx context.Context, id int) *TradeCorrection
- func (c *TradeCorrectionClient) Hooks() []Hook
- func (c *TradeCorrectionClient) Intercept(interceptors ...Interceptor)
- func (c *TradeCorrectionClient) Interceptors() []Interceptor
- func (c *TradeCorrectionClient) Query() *TradeCorrectionQuery
- func (c *TradeCorrectionClient) QueryRecord(tc *TradeCorrection) *TradeRecordQuery
- func (c *TradeCorrectionClient) Update() *TradeCorrectionUpdate
- func (c *TradeCorrectionClient) UpdateOne(tc *TradeCorrection) *TradeCorrectionUpdateOne
- func (c *TradeCorrectionClient) UpdateOneID(id int) *TradeCorrectionUpdateOne
- func (c *TradeCorrectionClient) Use(hooks ...Hook)
- type TradeCorrectionCreate
- func (tcc *TradeCorrectionCreate) AddRecord(t ...*TradeRecord) *TradeCorrectionCreate
- func (tcc *TradeCorrectionCreate) AddRecordIDs(ids ...int) *TradeCorrectionCreate
- func (tcc *TradeCorrectionCreate) Exec(ctx context.Context) error
- func (tcc *TradeCorrectionCreate) ExecX(ctx context.Context)
- func (tcc *TradeCorrectionCreate) Mutation() *TradeCorrectionMutation
- func (tcc *TradeCorrectionCreate) Save(ctx context.Context) (*TradeCorrection, error)
- func (tcc *TradeCorrectionCreate) SaveX(ctx context.Context) *TradeCorrection
- func (tcc *TradeCorrectionCreate) SetCorrection(s string) *TradeCorrectionCreate
- type TradeCorrectionCreateBulk
- func (tccb *TradeCorrectionCreateBulk) Exec(ctx context.Context) error
- func (tccb *TradeCorrectionCreateBulk) ExecX(ctx context.Context)
- func (tccb *TradeCorrectionCreateBulk) Save(ctx context.Context) ([]*TradeCorrection, error)
- func (tccb *TradeCorrectionCreateBulk) SaveX(ctx context.Context) []*TradeCorrection
- type TradeCorrectionDelete
- type TradeCorrectionDeleteOne
- type TradeCorrectionEdges
- type TradeCorrectionGroupBy
- func (tcgb *TradeCorrectionGroupBy) Aggregate(fns ...AggregateFunc) *TradeCorrectionGroupBy
- func (s *TradeCorrectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeCorrectionGroupBy) BoolX(ctx context.Context) bool
- func (s *TradeCorrectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeCorrectionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TradeCorrectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeCorrectionGroupBy) Float64X(ctx context.Context) float64
- func (s *TradeCorrectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeCorrectionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TradeCorrectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TradeCorrectionGroupBy) IntX(ctx context.Context) int
- func (s *TradeCorrectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TradeCorrectionGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *TradeCorrectionGroupBy) Scan(ctx context.Context, v any) error
- func (s *TradeCorrectionGroupBy) ScanX(ctx context.Context, v any)
- func (s *TradeCorrectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TradeCorrectionGroupBy) StringX(ctx context.Context) string
- func (s *TradeCorrectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TradeCorrectionGroupBy) StringsX(ctx context.Context) []string
- type TradeCorrectionMutation
- func (m *TradeCorrectionMutation) AddField(name string, value ent.Value) error
- func (m *TradeCorrectionMutation) AddRecordIDs(ids ...int)
- func (m *TradeCorrectionMutation) AddedEdges() []string
- func (m *TradeCorrectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *TradeCorrectionMutation) AddedFields() []string
- func (m *TradeCorrectionMutation) AddedIDs(name string) []ent.Value
- func (m *TradeCorrectionMutation) ClearEdge(name string) error
- func (m *TradeCorrectionMutation) ClearField(name string) error
- func (m *TradeCorrectionMutation) ClearRecord()
- func (m *TradeCorrectionMutation) ClearedEdges() []string
- func (m *TradeCorrectionMutation) ClearedFields() []string
- func (m TradeCorrectionMutation) Client() *Client
- func (m *TradeCorrectionMutation) Correction() (r string, exists bool)
- func (m *TradeCorrectionMutation) EdgeCleared(name string) bool
- func (m *TradeCorrectionMutation) Field(name string) (ent.Value, bool)
- func (m *TradeCorrectionMutation) FieldCleared(name string) bool
- func (m *TradeCorrectionMutation) Fields() []string
- func (m *TradeCorrectionMutation) ID() (id int, exists bool)
- func (m *TradeCorrectionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TradeCorrectionMutation) OldCorrection(ctx context.Context) (v string, err error)
- func (m *TradeCorrectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TradeCorrectionMutation) Op() Op
- func (m *TradeCorrectionMutation) RecordCleared() bool
- func (m *TradeCorrectionMutation) RecordIDs() (ids []int)
- func (m *TradeCorrectionMutation) RemoveRecordIDs(ids ...int)
- func (m *TradeCorrectionMutation) RemovedEdges() []string
- func (m *TradeCorrectionMutation) RemovedIDs(name string) []ent.Value
- func (m *TradeCorrectionMutation) RemovedRecordIDs() (ids []int)
- func (m *TradeCorrectionMutation) ResetCorrection()
- func (m *TradeCorrectionMutation) ResetEdge(name string) error
- func (m *TradeCorrectionMutation) ResetField(name string) error
- func (m *TradeCorrectionMutation) ResetRecord()
- func (m *TradeCorrectionMutation) SetCorrection(s string)
- func (m *TradeCorrectionMutation) SetField(name string, value ent.Value) error
- func (m *TradeCorrectionMutation) SetOp(op Op)
- func (m TradeCorrectionMutation) Tx() (*Tx, error)
- func (m *TradeCorrectionMutation) Type() string
- func (m *TradeCorrectionMutation) Where(ps ...predicate.TradeCorrection)
- func (m *TradeCorrectionMutation) WhereP(ps ...func(*sql.Selector))
- type TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) Aggregate(fns ...AggregateFunc) *TradeCorrectionSelect
- func (tcq *TradeCorrectionQuery) All(ctx context.Context) ([]*TradeCorrection, error)
- func (tcq *TradeCorrectionQuery) AllX(ctx context.Context) []*TradeCorrection
- func (tcq *TradeCorrectionQuery) Clone() *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) Count(ctx context.Context) (int, error)
- func (tcq *TradeCorrectionQuery) CountX(ctx context.Context) int
- func (tcq *TradeCorrectionQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *TradeCorrectionQuery) ExistX(ctx context.Context) bool
- func (tcq *TradeCorrectionQuery) First(ctx context.Context) (*TradeCorrection, error)
- func (tcq *TradeCorrectionQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *TradeCorrectionQuery) FirstIDX(ctx context.Context) int
- func (tcq *TradeCorrectionQuery) FirstX(ctx context.Context) *TradeCorrection
- func (tcq *TradeCorrectionQuery) GroupBy(field string, fields ...string) *TradeCorrectionGroupBy
- func (tcq *TradeCorrectionQuery) IDs(ctx context.Context) ([]int, error)
- func (tcq *TradeCorrectionQuery) IDsX(ctx context.Context) []int
- func (tcq *TradeCorrectionQuery) Limit(limit int) *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) Offset(offset int) *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) Only(ctx context.Context) (*TradeCorrection, error)
- func (tcq *TradeCorrectionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *TradeCorrectionQuery) OnlyIDX(ctx context.Context) int
- func (tcq *TradeCorrectionQuery) OnlyX(ctx context.Context) *TradeCorrection
- func (tcq *TradeCorrectionQuery) Order(o ...OrderFunc) *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) QueryRecord() *TradeRecordQuery
- func (tcq *TradeCorrectionQuery) Select(fields ...string) *TradeCorrectionSelect
- func (tcq *TradeCorrectionQuery) Unique(unique bool) *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) Where(ps ...predicate.TradeCorrection) *TradeCorrectionQuery
- func (tcq *TradeCorrectionQuery) WithRecord(opts ...func(*TradeRecordQuery)) *TradeCorrectionQuery
- type TradeCorrectionSelect
- func (tcs *TradeCorrectionSelect) Aggregate(fns ...AggregateFunc) *TradeCorrectionSelect
- func (s *TradeCorrectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeCorrectionSelect) BoolX(ctx context.Context) bool
- func (s *TradeCorrectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeCorrectionSelect) BoolsX(ctx context.Context) []bool
- func (s *TradeCorrectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeCorrectionSelect) Float64X(ctx context.Context) float64
- func (s *TradeCorrectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeCorrectionSelect) Float64sX(ctx context.Context) []float64
- func (s *TradeCorrectionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TradeCorrectionSelect) IntX(ctx context.Context) int
- func (s *TradeCorrectionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TradeCorrectionSelect) IntsX(ctx context.Context) []int
- func (tcs *TradeCorrectionSelect) Scan(ctx context.Context, v any) error
- func (s *TradeCorrectionSelect) ScanX(ctx context.Context, v any)
- func (s *TradeCorrectionSelect) String(ctx context.Context) (_ string, err error)
- func (s *TradeCorrectionSelect) StringX(ctx context.Context) string
- func (s *TradeCorrectionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TradeCorrectionSelect) StringsX(ctx context.Context) []string
- type TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) AddRecord(t ...*TradeRecord) *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) AddRecordIDs(ids ...int) *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) ClearRecord() *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) Exec(ctx context.Context) error
- func (tcu *TradeCorrectionUpdate) ExecX(ctx context.Context)
- func (tcu *TradeCorrectionUpdate) Mutation() *TradeCorrectionMutation
- func (tcu *TradeCorrectionUpdate) RemoveRecord(t ...*TradeRecord) *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) RemoveRecordIDs(ids ...int) *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) Save(ctx context.Context) (int, error)
- func (tcu *TradeCorrectionUpdate) SaveX(ctx context.Context) int
- func (tcu *TradeCorrectionUpdate) SetCorrection(s string) *TradeCorrectionUpdate
- func (tcu *TradeCorrectionUpdate) Where(ps ...predicate.TradeCorrection) *TradeCorrectionUpdate
- type TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) AddRecord(t ...*TradeRecord) *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) AddRecordIDs(ids ...int) *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) ClearRecord() *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) Exec(ctx context.Context) error
- func (tcuo *TradeCorrectionUpdateOne) ExecX(ctx context.Context)
- func (tcuo *TradeCorrectionUpdateOne) Mutation() *TradeCorrectionMutation
- func (tcuo *TradeCorrectionUpdateOne) RemoveRecord(t ...*TradeRecord) *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) RemoveRecordIDs(ids ...int) *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) Save(ctx context.Context) (*TradeCorrection, error)
- func (tcuo *TradeCorrectionUpdateOne) SaveX(ctx context.Context) *TradeCorrection
- func (tcuo *TradeCorrectionUpdateOne) Select(field string, fields ...string) *TradeCorrectionUpdateOne
- func (tcuo *TradeCorrectionUpdateOne) SetCorrection(s string) *TradeCorrectionUpdateOne
- type TradeCorrections
- type TradeRecord
- func (tr *TradeRecord) QueryConditions() *TradeConditionQuery
- func (tr *TradeRecord) QueryCorrection() *TradeCorrectionQuery
- func (tr *TradeRecord) QueryExchange() *ExchangeQuery
- func (tr *TradeRecord) QueryTimeRange() *TradeTimeRangeQuery
- func (tr *TradeRecord) String() string
- func (tr *TradeRecord) Unwrap() *TradeRecord
- func (tr *TradeRecord) Update() *TradeRecordUpdateOne
- type TradeRecordClient
- func (c *TradeRecordClient) Create() *TradeRecordCreate
- func (c *TradeRecordClient) CreateBulk(builders ...*TradeRecordCreate) *TradeRecordCreateBulk
- func (c *TradeRecordClient) Delete() *TradeRecordDelete
- func (c *TradeRecordClient) DeleteOne(tr *TradeRecord) *TradeRecordDeleteOne
- func (c *TradeRecordClient) DeleteOneID(id int) *TradeRecordDeleteOne
- func (c *TradeRecordClient) Get(ctx context.Context, id int) (*TradeRecord, error)
- func (c *TradeRecordClient) GetX(ctx context.Context, id int) *TradeRecord
- func (c *TradeRecordClient) Hooks() []Hook
- func (c *TradeRecordClient) Intercept(interceptors ...Interceptor)
- func (c *TradeRecordClient) Interceptors() []Interceptor
- func (c *TradeRecordClient) Query() *TradeRecordQuery
- func (c *TradeRecordClient) QueryConditions(tr *TradeRecord) *TradeConditionQuery
- func (c *TradeRecordClient) QueryCorrection(tr *TradeRecord) *TradeCorrectionQuery
- func (c *TradeRecordClient) QueryExchange(tr *TradeRecord) *ExchangeQuery
- func (c *TradeRecordClient) QueryTimeRange(tr *TradeRecord) *TradeTimeRangeQuery
- func (c *TradeRecordClient) Update() *TradeRecordUpdate
- func (c *TradeRecordClient) UpdateOne(tr *TradeRecord) *TradeRecordUpdateOne
- func (c *TradeRecordClient) UpdateOneID(id int) *TradeRecordUpdateOne
- func (c *TradeRecordClient) Use(hooks ...Hook)
- type TradeRecordCreate
- func (trc *TradeRecordCreate) AddConditionIDs(ids ...int) *TradeRecordCreate
- func (trc *TradeRecordCreate) AddConditions(t ...*TradeCondition) *TradeRecordCreate
- func (trc *TradeRecordCreate) AddCorrection(t ...*TradeCorrection) *TradeRecordCreate
- func (trc *TradeRecordCreate) AddCorrectionIDs(ids ...int) *TradeRecordCreate
- func (trc *TradeRecordCreate) AddExchange(e ...*Exchange) *TradeRecordCreate
- func (trc *TradeRecordCreate) AddExchangeIDs(ids ...int) *TradeRecordCreate
- func (trc *TradeRecordCreate) Exec(ctx context.Context) error
- func (trc *TradeRecordCreate) ExecX(ctx context.Context)
- func (trc *TradeRecordCreate) Mutation() *TradeRecordMutation
- func (trc *TradeRecordCreate) Save(ctx context.Context) (*TradeRecord, error)
- func (trc *TradeRecordCreate) SaveX(ctx context.Context) *TradeRecord
- func (trc *TradeRecordCreate) SetPrice(f float64) *TradeRecordCreate
- func (trc *TradeRecordCreate) SetTimeRange(t *TradeTimeRange) *TradeRecordCreate
- func (trc *TradeRecordCreate) SetTimeRangeID(i int) *TradeRecordCreate
- func (trc *TradeRecordCreate) SetTimestamp(t time.Time) *TradeRecordCreate
- func (trc *TradeRecordCreate) SetVolume(i int32) *TradeRecordCreate
- type TradeRecordCreateBulk
- type TradeRecordDelete
- type TradeRecordDeleteOne
- type TradeRecordEdges
- type TradeRecordGroupBy
- func (trgb *TradeRecordGroupBy) Aggregate(fns ...AggregateFunc) *TradeRecordGroupBy
- func (s *TradeRecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeRecordGroupBy) BoolX(ctx context.Context) bool
- func (s *TradeRecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeRecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TradeRecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeRecordGroupBy) Float64X(ctx context.Context) float64
- func (s *TradeRecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeRecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TradeRecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TradeRecordGroupBy) IntX(ctx context.Context) int
- func (s *TradeRecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TradeRecordGroupBy) IntsX(ctx context.Context) []int
- func (trgb *TradeRecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *TradeRecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *TradeRecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TradeRecordGroupBy) StringX(ctx context.Context) string
- func (s *TradeRecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TradeRecordGroupBy) StringsX(ctx context.Context) []string
- type TradeRecordMutation
- func (m *TradeRecordMutation) AddConditionIDs(ids ...int)
- func (m *TradeRecordMutation) AddCorrectionIDs(ids ...int)
- func (m *TradeRecordMutation) AddExchangeIDs(ids ...int)
- func (m *TradeRecordMutation) AddField(name string, value ent.Value) error
- func (m *TradeRecordMutation) AddPrice(f float64)
- func (m *TradeRecordMutation) AddVolume(i int32)
- func (m *TradeRecordMutation) AddedEdges() []string
- func (m *TradeRecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *TradeRecordMutation) AddedFields() []string
- func (m *TradeRecordMutation) AddedIDs(name string) []ent.Value
- func (m *TradeRecordMutation) AddedPrice() (r float64, exists bool)
- func (m *TradeRecordMutation) AddedVolume() (r int32, exists bool)
- func (m *TradeRecordMutation) ClearConditions()
- func (m *TradeRecordMutation) ClearCorrection()
- func (m *TradeRecordMutation) ClearEdge(name string) error
- func (m *TradeRecordMutation) ClearExchange()
- func (m *TradeRecordMutation) ClearField(name string) error
- func (m *TradeRecordMutation) ClearTimeRange()
- func (m *TradeRecordMutation) ClearedEdges() []string
- func (m *TradeRecordMutation) ClearedFields() []string
- func (m TradeRecordMutation) Client() *Client
- func (m *TradeRecordMutation) ConditionsCleared() bool
- func (m *TradeRecordMutation) ConditionsIDs() (ids []int)
- func (m *TradeRecordMutation) CorrectionCleared() bool
- func (m *TradeRecordMutation) CorrectionIDs() (ids []int)
- func (m *TradeRecordMutation) EdgeCleared(name string) bool
- func (m *TradeRecordMutation) ExchangeCleared() bool
- func (m *TradeRecordMutation) ExchangeIDs() (ids []int)
- func (m *TradeRecordMutation) Field(name string) (ent.Value, bool)
- func (m *TradeRecordMutation) FieldCleared(name string) bool
- func (m *TradeRecordMutation) Fields() []string
- func (m *TradeRecordMutation) ID() (id int, exists bool)
- func (m *TradeRecordMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TradeRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TradeRecordMutation) OldPrice(ctx context.Context) (v float64, err error)
- func (m *TradeRecordMutation) OldTimeRangeID(ctx context.Context) (v int, err error)
- func (m *TradeRecordMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *TradeRecordMutation) OldVolume(ctx context.Context) (v int32, err error)
- func (m *TradeRecordMutation) Op() Op
- func (m *TradeRecordMutation) Price() (r float64, exists bool)
- func (m *TradeRecordMutation) RemoveConditionIDs(ids ...int)
- func (m *TradeRecordMutation) RemoveCorrectionIDs(ids ...int)
- func (m *TradeRecordMutation) RemoveExchangeIDs(ids ...int)
- func (m *TradeRecordMutation) RemovedConditionsIDs() (ids []int)
- func (m *TradeRecordMutation) RemovedCorrectionIDs() (ids []int)
- func (m *TradeRecordMutation) RemovedEdges() []string
- func (m *TradeRecordMutation) RemovedExchangeIDs() (ids []int)
- func (m *TradeRecordMutation) RemovedIDs(name string) []ent.Value
- func (m *TradeRecordMutation) ResetConditions()
- func (m *TradeRecordMutation) ResetCorrection()
- func (m *TradeRecordMutation) ResetEdge(name string) error
- func (m *TradeRecordMutation) ResetExchange()
- func (m *TradeRecordMutation) ResetField(name string) error
- func (m *TradeRecordMutation) ResetPrice()
- func (m *TradeRecordMutation) ResetTimeRange()
- func (m *TradeRecordMutation) ResetTimeRangeID()
- func (m *TradeRecordMutation) ResetTimestamp()
- func (m *TradeRecordMutation) ResetVolume()
- func (m *TradeRecordMutation) SetField(name string, value ent.Value) error
- func (m *TradeRecordMutation) SetOp(op Op)
- func (m *TradeRecordMutation) SetPrice(f float64)
- func (m *TradeRecordMutation) SetTimeRangeID(i int)
- func (m *TradeRecordMutation) SetTimestamp(t time.Time)
- func (m *TradeRecordMutation) SetVolume(i int32)
- func (m *TradeRecordMutation) TimeRangeCleared() bool
- func (m *TradeRecordMutation) TimeRangeID() (r int, exists bool)
- func (m *TradeRecordMutation) TimeRangeIDs() (ids []int)
- func (m *TradeRecordMutation) Timestamp() (r time.Time, exists bool)
- func (m TradeRecordMutation) Tx() (*Tx, error)
- func (m *TradeRecordMutation) Type() string
- func (m *TradeRecordMutation) Volume() (r int32, exists bool)
- func (m *TradeRecordMutation) Where(ps ...predicate.TradeRecord)
- func (m *TradeRecordMutation) WhereP(ps ...func(*sql.Selector))
- type TradeRecordQuery
- func (trq *TradeRecordQuery) Aggregate(fns ...AggregateFunc) *TradeRecordSelect
- func (trq *TradeRecordQuery) All(ctx context.Context) ([]*TradeRecord, error)
- func (trq *TradeRecordQuery) AllX(ctx context.Context) []*TradeRecord
- func (trq *TradeRecordQuery) Clone() *TradeRecordQuery
- func (trq *TradeRecordQuery) Count(ctx context.Context) (int, error)
- func (trq *TradeRecordQuery) CountX(ctx context.Context) int
- func (trq *TradeRecordQuery) Exist(ctx context.Context) (bool, error)
- func (trq *TradeRecordQuery) ExistX(ctx context.Context) bool
- func (trq *TradeRecordQuery) First(ctx context.Context) (*TradeRecord, error)
- func (trq *TradeRecordQuery) FirstID(ctx context.Context) (id int, err error)
- func (trq *TradeRecordQuery) FirstIDX(ctx context.Context) int
- func (trq *TradeRecordQuery) FirstX(ctx context.Context) *TradeRecord
- func (trq *TradeRecordQuery) GroupBy(field string, fields ...string) *TradeRecordGroupBy
- func (trq *TradeRecordQuery) IDs(ctx context.Context) ([]int, error)
- func (trq *TradeRecordQuery) IDsX(ctx context.Context) []int
- func (trq *TradeRecordQuery) Limit(limit int) *TradeRecordQuery
- func (trq *TradeRecordQuery) Offset(offset int) *TradeRecordQuery
- func (trq *TradeRecordQuery) Only(ctx context.Context) (*TradeRecord, error)
- func (trq *TradeRecordQuery) OnlyID(ctx context.Context) (id int, err error)
- func (trq *TradeRecordQuery) OnlyIDX(ctx context.Context) int
- func (trq *TradeRecordQuery) OnlyX(ctx context.Context) *TradeRecord
- func (trq *TradeRecordQuery) Order(o ...OrderFunc) *TradeRecordQuery
- func (trq *TradeRecordQuery) QueryConditions() *TradeConditionQuery
- func (trq *TradeRecordQuery) QueryCorrection() *TradeCorrectionQuery
- func (trq *TradeRecordQuery) QueryExchange() *ExchangeQuery
- func (trq *TradeRecordQuery) QueryTimeRange() *TradeTimeRangeQuery
- func (trq *TradeRecordQuery) Select(fields ...string) *TradeRecordSelect
- func (trq *TradeRecordQuery) Unique(unique bool) *TradeRecordQuery
- func (trq *TradeRecordQuery) Where(ps ...predicate.TradeRecord) *TradeRecordQuery
- func (trq *TradeRecordQuery) WithConditions(opts ...func(*TradeConditionQuery)) *TradeRecordQuery
- func (trq *TradeRecordQuery) WithCorrection(opts ...func(*TradeCorrectionQuery)) *TradeRecordQuery
- func (trq *TradeRecordQuery) WithExchange(opts ...func(*ExchangeQuery)) *TradeRecordQuery
- func (trq *TradeRecordQuery) WithTimeRange(opts ...func(*TradeTimeRangeQuery)) *TradeRecordQuery
- type TradeRecordSelect
- func (trs *TradeRecordSelect) Aggregate(fns ...AggregateFunc) *TradeRecordSelect
- func (s *TradeRecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeRecordSelect) BoolX(ctx context.Context) bool
- func (s *TradeRecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeRecordSelect) BoolsX(ctx context.Context) []bool
- func (s *TradeRecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeRecordSelect) Float64X(ctx context.Context) float64
- func (s *TradeRecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeRecordSelect) Float64sX(ctx context.Context) []float64
- func (s *TradeRecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TradeRecordSelect) IntX(ctx context.Context) int
- func (s *TradeRecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TradeRecordSelect) IntsX(ctx context.Context) []int
- func (trs *TradeRecordSelect) Scan(ctx context.Context, v any) error
- func (s *TradeRecordSelect) ScanX(ctx context.Context, v any)
- func (s *TradeRecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *TradeRecordSelect) StringX(ctx context.Context) string
- func (s *TradeRecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TradeRecordSelect) StringsX(ctx context.Context) []string
- type TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddConditionIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddConditions(t ...*TradeCondition) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddCorrection(t ...*TradeCorrection) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddCorrectionIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddExchange(e ...*Exchange) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddExchangeIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddPrice(f float64) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) AddVolume(i int32) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) ClearConditions() *TradeRecordUpdate
- func (tru *TradeRecordUpdate) ClearCorrection() *TradeRecordUpdate
- func (tru *TradeRecordUpdate) ClearExchange() *TradeRecordUpdate
- func (tru *TradeRecordUpdate) ClearTimeRange() *TradeRecordUpdate
- func (tru *TradeRecordUpdate) Exec(ctx context.Context) error
- func (tru *TradeRecordUpdate) ExecX(ctx context.Context)
- func (tru *TradeRecordUpdate) Mutation() *TradeRecordMutation
- func (tru *TradeRecordUpdate) RemoveConditionIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) RemoveConditions(t ...*TradeCondition) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) RemoveCorrection(t ...*TradeCorrection) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) RemoveCorrectionIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) RemoveExchange(e ...*Exchange) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) RemoveExchangeIDs(ids ...int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) Save(ctx context.Context) (int, error)
- func (tru *TradeRecordUpdate) SaveX(ctx context.Context) int
- func (tru *TradeRecordUpdate) SetPrice(f float64) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) SetTimeRange(t *TradeTimeRange) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) SetTimeRangeID(i int) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) SetTimestamp(t time.Time) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) SetVolume(i int32) *TradeRecordUpdate
- func (tru *TradeRecordUpdate) Where(ps ...predicate.TradeRecord) *TradeRecordUpdate
- type TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddConditionIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddConditions(t ...*TradeCondition) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddCorrection(t ...*TradeCorrection) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddCorrectionIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddExchange(e ...*Exchange) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddExchangeIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddPrice(f float64) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) AddVolume(i int32) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) ClearConditions() *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) ClearCorrection() *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) ClearExchange() *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) ClearTimeRange() *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) Exec(ctx context.Context) error
- func (truo *TradeRecordUpdateOne) ExecX(ctx context.Context)
- func (truo *TradeRecordUpdateOne) Mutation() *TradeRecordMutation
- func (truo *TradeRecordUpdateOne) RemoveConditionIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) RemoveConditions(t ...*TradeCondition) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) RemoveCorrection(t ...*TradeCorrection) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) RemoveCorrectionIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) RemoveExchange(e ...*Exchange) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) RemoveExchangeIDs(ids ...int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) Save(ctx context.Context) (*TradeRecord, error)
- func (truo *TradeRecordUpdateOne) SaveX(ctx context.Context) *TradeRecord
- func (truo *TradeRecordUpdateOne) Select(field string, fields ...string) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) SetPrice(f float64) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) SetTimeRange(t *TradeTimeRange) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) SetTimeRangeID(i int) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) SetTimestamp(t time.Time) *TradeRecordUpdateOne
- func (truo *TradeRecordUpdateOne) SetVolume(i int32) *TradeRecordUpdateOne
- type TradeRecords
- type TradeTimeRange
- type TradeTimeRangeClient
- func (c *TradeTimeRangeClient) Create() *TradeTimeRangeCreate
- func (c *TradeTimeRangeClient) CreateBulk(builders ...*TradeTimeRangeCreate) *TradeTimeRangeCreateBulk
- func (c *TradeTimeRangeClient) Delete() *TradeTimeRangeDelete
- func (c *TradeTimeRangeClient) DeleteOne(ttr *TradeTimeRange) *TradeTimeRangeDeleteOne
- func (c *TradeTimeRangeClient) DeleteOneID(id int) *TradeTimeRangeDeleteOne
- func (c *TradeTimeRangeClient) Get(ctx context.Context, id int) (*TradeTimeRange, error)
- func (c *TradeTimeRangeClient) GetX(ctx context.Context, id int) *TradeTimeRange
- func (c *TradeTimeRangeClient) Hooks() []Hook
- func (c *TradeTimeRangeClient) Intercept(interceptors ...Interceptor)
- func (c *TradeTimeRangeClient) Interceptors() []Interceptor
- func (c *TradeTimeRangeClient) Query() *TradeTimeRangeQuery
- func (c *TradeTimeRangeClient) QueryInterval(ttr *TradeTimeRange) *IntervalQuery
- func (c *TradeTimeRangeClient) QueryRecords(ttr *TradeTimeRange) *TradeRecordQuery
- func (c *TradeTimeRangeClient) Update() *TradeTimeRangeUpdate
- func (c *TradeTimeRangeClient) UpdateOne(ttr *TradeTimeRange) *TradeTimeRangeUpdateOne
- func (c *TradeTimeRangeClient) UpdateOneID(id int) *TradeTimeRangeUpdateOne
- func (c *TradeTimeRangeClient) Use(hooks ...Hook)
- type TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) AddRecordIDs(ids ...int) *TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) AddRecords(t ...*TradeRecord) *TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) Exec(ctx context.Context) error
- func (ttrc *TradeTimeRangeCreate) ExecX(ctx context.Context)
- func (ttrc *TradeTimeRangeCreate) Mutation() *TradeTimeRangeMutation
- func (ttrc *TradeTimeRangeCreate) Save(ctx context.Context) (*TradeTimeRange, error)
- func (ttrc *TradeTimeRangeCreate) SaveX(ctx context.Context) *TradeTimeRange
- func (ttrc *TradeTimeRangeCreate) SetEnd(t time.Time) *TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) SetInterval(i *Interval) *TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) SetIntervalID(i int) *TradeTimeRangeCreate
- func (ttrc *TradeTimeRangeCreate) SetStart(t time.Time) *TradeTimeRangeCreate
- type TradeTimeRangeCreateBulk
- func (ttrcb *TradeTimeRangeCreateBulk) Exec(ctx context.Context) error
- func (ttrcb *TradeTimeRangeCreateBulk) ExecX(ctx context.Context)
- func (ttrcb *TradeTimeRangeCreateBulk) Save(ctx context.Context) ([]*TradeTimeRange, error)
- func (ttrcb *TradeTimeRangeCreateBulk) SaveX(ctx context.Context) []*TradeTimeRange
- type TradeTimeRangeDelete
- type TradeTimeRangeDeleteOne
- type TradeTimeRangeEdges
- type TradeTimeRangeGroupBy
- func (ttrgb *TradeTimeRangeGroupBy) Aggregate(fns ...AggregateFunc) *TradeTimeRangeGroupBy
- func (s *TradeTimeRangeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeTimeRangeGroupBy) BoolX(ctx context.Context) bool
- func (s *TradeTimeRangeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeTimeRangeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TradeTimeRangeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeTimeRangeGroupBy) Float64X(ctx context.Context) float64
- func (s *TradeTimeRangeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeTimeRangeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TradeTimeRangeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TradeTimeRangeGroupBy) IntX(ctx context.Context) int
- func (s *TradeTimeRangeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TradeTimeRangeGroupBy) IntsX(ctx context.Context) []int
- func (ttrgb *TradeTimeRangeGroupBy) Scan(ctx context.Context, v any) error
- func (s *TradeTimeRangeGroupBy) ScanX(ctx context.Context, v any)
- func (s *TradeTimeRangeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TradeTimeRangeGroupBy) StringX(ctx context.Context) string
- func (s *TradeTimeRangeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TradeTimeRangeGroupBy) StringsX(ctx context.Context) []string
- type TradeTimeRangeMutation
- func (m *TradeTimeRangeMutation) AddField(name string, value ent.Value) error
- func (m *TradeTimeRangeMutation) AddRecordIDs(ids ...int)
- func (m *TradeTimeRangeMutation) AddedEdges() []string
- func (m *TradeTimeRangeMutation) AddedField(name string) (ent.Value, bool)
- func (m *TradeTimeRangeMutation) AddedFields() []string
- func (m *TradeTimeRangeMutation) AddedIDs(name string) []ent.Value
- func (m *TradeTimeRangeMutation) ClearEdge(name string) error
- func (m *TradeTimeRangeMutation) ClearField(name string) error
- func (m *TradeTimeRangeMutation) ClearInterval()
- func (m *TradeTimeRangeMutation) ClearRecords()
- func (m *TradeTimeRangeMutation) ClearedEdges() []string
- func (m *TradeTimeRangeMutation) ClearedFields() []string
- func (m TradeTimeRangeMutation) Client() *Client
- func (m *TradeTimeRangeMutation) EdgeCleared(name string) bool
- func (m *TradeTimeRangeMutation) End() (r time.Time, exists bool)
- func (m *TradeTimeRangeMutation) Field(name string) (ent.Value, bool)
- func (m *TradeTimeRangeMutation) FieldCleared(name string) bool
- func (m *TradeTimeRangeMutation) Fields() []string
- func (m *TradeTimeRangeMutation) ID() (id int, exists bool)
- func (m *TradeTimeRangeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TradeTimeRangeMutation) IntervalCleared() bool
- func (m *TradeTimeRangeMutation) IntervalID() (r int, exists bool)
- func (m *TradeTimeRangeMutation) IntervalIDs() (ids []int)
- func (m *TradeTimeRangeMutation) OldEnd(ctx context.Context) (v time.Time, err error)
- func (m *TradeTimeRangeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TradeTimeRangeMutation) OldIntervalID(ctx context.Context) (v int, err error)
- func (m *TradeTimeRangeMutation) OldStart(ctx context.Context) (v time.Time, err error)
- func (m *TradeTimeRangeMutation) Op() Op
- func (m *TradeTimeRangeMutation) RecordsCleared() bool
- func (m *TradeTimeRangeMutation) RecordsIDs() (ids []int)
- func (m *TradeTimeRangeMutation) RemoveRecordIDs(ids ...int)
- func (m *TradeTimeRangeMutation) RemovedEdges() []string
- func (m *TradeTimeRangeMutation) RemovedIDs(name string) []ent.Value
- func (m *TradeTimeRangeMutation) RemovedRecordsIDs() (ids []int)
- func (m *TradeTimeRangeMutation) ResetEdge(name string) error
- func (m *TradeTimeRangeMutation) ResetEnd()
- func (m *TradeTimeRangeMutation) ResetField(name string) error
- func (m *TradeTimeRangeMutation) ResetInterval()
- func (m *TradeTimeRangeMutation) ResetIntervalID()
- func (m *TradeTimeRangeMutation) ResetRecords()
- func (m *TradeTimeRangeMutation) ResetStart()
- func (m *TradeTimeRangeMutation) SetEnd(t time.Time)
- func (m *TradeTimeRangeMutation) SetField(name string, value ent.Value) error
- func (m *TradeTimeRangeMutation) SetIntervalID(i int)
- func (m *TradeTimeRangeMutation) SetOp(op Op)
- func (m *TradeTimeRangeMutation) SetStart(t time.Time)
- func (m *TradeTimeRangeMutation) Start() (r time.Time, exists bool)
- func (m TradeTimeRangeMutation) Tx() (*Tx, error)
- func (m *TradeTimeRangeMutation) Type() string
- func (m *TradeTimeRangeMutation) Where(ps ...predicate.TradeTimeRange)
- func (m *TradeTimeRangeMutation) WhereP(ps ...func(*sql.Selector))
- type TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) Aggregate(fns ...AggregateFunc) *TradeTimeRangeSelect
- func (ttrq *TradeTimeRangeQuery) All(ctx context.Context) ([]*TradeTimeRange, error)
- func (ttrq *TradeTimeRangeQuery) AllX(ctx context.Context) []*TradeTimeRange
- func (ttrq *TradeTimeRangeQuery) Clone() *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) Count(ctx context.Context) (int, error)
- func (ttrq *TradeTimeRangeQuery) CountX(ctx context.Context) int
- func (ttrq *TradeTimeRangeQuery) Exist(ctx context.Context) (bool, error)
- func (ttrq *TradeTimeRangeQuery) ExistX(ctx context.Context) bool
- func (ttrq *TradeTimeRangeQuery) First(ctx context.Context) (*TradeTimeRange, error)
- func (ttrq *TradeTimeRangeQuery) FirstID(ctx context.Context) (id int, err error)
- func (ttrq *TradeTimeRangeQuery) FirstIDX(ctx context.Context) int
- func (ttrq *TradeTimeRangeQuery) FirstX(ctx context.Context) *TradeTimeRange
- func (ttrq *TradeTimeRangeQuery) GroupBy(field string, fields ...string) *TradeTimeRangeGroupBy
- func (ttrq *TradeTimeRangeQuery) IDs(ctx context.Context) ([]int, error)
- func (ttrq *TradeTimeRangeQuery) IDsX(ctx context.Context) []int
- func (ttrq *TradeTimeRangeQuery) Limit(limit int) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) Offset(offset int) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) Only(ctx context.Context) (*TradeTimeRange, error)
- func (ttrq *TradeTimeRangeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ttrq *TradeTimeRangeQuery) OnlyIDX(ctx context.Context) int
- func (ttrq *TradeTimeRangeQuery) OnlyX(ctx context.Context) *TradeTimeRange
- func (ttrq *TradeTimeRangeQuery) Order(o ...OrderFunc) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) QueryInterval() *IntervalQuery
- func (ttrq *TradeTimeRangeQuery) QueryRecords() *TradeRecordQuery
- func (ttrq *TradeTimeRangeQuery) Select(fields ...string) *TradeTimeRangeSelect
- func (ttrq *TradeTimeRangeQuery) Unique(unique bool) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) Where(ps ...predicate.TradeTimeRange) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) WithInterval(opts ...func(*IntervalQuery)) *TradeTimeRangeQuery
- func (ttrq *TradeTimeRangeQuery) WithRecords(opts ...func(*TradeRecordQuery)) *TradeTimeRangeQuery
- type TradeTimeRangeSelect
- func (ttrs *TradeTimeRangeSelect) Aggregate(fns ...AggregateFunc) *TradeTimeRangeSelect
- func (s *TradeTimeRangeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TradeTimeRangeSelect) BoolX(ctx context.Context) bool
- func (s *TradeTimeRangeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TradeTimeRangeSelect) BoolsX(ctx context.Context) []bool
- func (s *TradeTimeRangeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TradeTimeRangeSelect) Float64X(ctx context.Context) float64
- func (s *TradeTimeRangeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TradeTimeRangeSelect) Float64sX(ctx context.Context) []float64
- func (s *TradeTimeRangeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TradeTimeRangeSelect) IntX(ctx context.Context) int
- func (s *TradeTimeRangeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TradeTimeRangeSelect) IntsX(ctx context.Context) []int
- func (ttrs *TradeTimeRangeSelect) Scan(ctx context.Context, v any) error
- func (s *TradeTimeRangeSelect) ScanX(ctx context.Context, v any)
- func (s *TradeTimeRangeSelect) String(ctx context.Context) (_ string, err error)
- func (s *TradeTimeRangeSelect) StringX(ctx context.Context) string
- func (s *TradeTimeRangeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TradeTimeRangeSelect) StringsX(ctx context.Context) []string
- type TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) AddRecordIDs(ids ...int) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) AddRecords(t ...*TradeRecord) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) ClearInterval() *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) ClearRecords() *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) Exec(ctx context.Context) error
- func (ttru *TradeTimeRangeUpdate) ExecX(ctx context.Context)
- func (ttru *TradeTimeRangeUpdate) Mutation() *TradeTimeRangeMutation
- func (ttru *TradeTimeRangeUpdate) RemoveRecordIDs(ids ...int) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) RemoveRecords(t ...*TradeRecord) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) Save(ctx context.Context) (int, error)
- func (ttru *TradeTimeRangeUpdate) SaveX(ctx context.Context) int
- func (ttru *TradeTimeRangeUpdate) SetEnd(t time.Time) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) SetInterval(i *Interval) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) SetIntervalID(i int) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) SetStart(t time.Time) *TradeTimeRangeUpdate
- func (ttru *TradeTimeRangeUpdate) Where(ps ...predicate.TradeTimeRange) *TradeTimeRangeUpdate
- type TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) AddRecordIDs(ids ...int) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) AddRecords(t ...*TradeRecord) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) ClearInterval() *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) ClearRecords() *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) Exec(ctx context.Context) error
- func (ttruo *TradeTimeRangeUpdateOne) ExecX(ctx context.Context)
- func (ttruo *TradeTimeRangeUpdateOne) Mutation() *TradeTimeRangeMutation
- func (ttruo *TradeTimeRangeUpdateOne) RemoveRecordIDs(ids ...int) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) RemoveRecords(t ...*TradeRecord) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) Save(ctx context.Context) (*TradeTimeRange, error)
- func (ttruo *TradeTimeRangeUpdateOne) SaveX(ctx context.Context) *TradeTimeRange
- func (ttruo *TradeTimeRangeUpdateOne) Select(field string, fields ...string) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) SetEnd(t time.Time) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) SetInterval(i *Interval) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) SetIntervalID(i int) *TradeTimeRangeUpdateOne
- func (ttruo *TradeTimeRangeUpdateOne) SetStart(t time.Time) *TradeTimeRangeUpdateOne
- type TradeTimeRanges
- 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. TypeBarGroup = "BarGroup" TypeBarRecord = "BarRecord" TypeBarTimeRange = "BarTimeRange" TypeDataSource = "DataSource" TypeDividend = "Dividend" TypeEntity = "Entity" TypeExchange = "Exchange" TypeFinancial = "Financial" TypeInterval = "Interval" TypeMarketHours = "MarketHours" TypeMarketInfo = "MarketInfo" TypeSplit = "Split" TypeTradeCondition = "TradeCondition" TypeTradeCorrection = "TradeCorrection" TypeTradeRecord = "TradeRecord" TypeTradeTimeRange = "TradeTimeRange" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type BarGroup ¶
type BarGroup struct { // ID of the ent. ID int `json:"id,omitempty"` // First holds the value of the "first" field. First time.Time `json:"first,omitempty"` // Last holds the value of the "last" field. Last time.Time `json:"last,omitempty"` // Count holds the value of the "count" field. Count int `json:"count,omitempty"` // TimeRangeID holds the value of the "time_range_id" field. TimeRangeID int `json:"time_range_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BarGroupQuery when eager-loading is set. Edges BarGroupEdges `json:"edges"` // contains filtered or unexported fields }
BarGroup is the model entity for the BarGroup schema.
func (*BarGroup) QueryRecords ¶
func (bg *BarGroup) QueryRecords() *BarRecordQuery
QueryRecords queries the "records" edge of the BarGroup entity.
func (*BarGroup) QueryTimeRange ¶
func (bg *BarGroup) QueryTimeRange() *BarTimeRangeQuery
QueryTimeRange queries the "time_range" edge of the BarGroup entity.
func (*BarGroup) Unwrap ¶
Unwrap unwraps the BarGroup 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 (*BarGroup) Update ¶
func (bg *BarGroup) Update() *BarGroupUpdateOne
Update returns a builder for updating this BarGroup. Note that you need to call BarGroup.Unwrap() before calling this method if this BarGroup was returned from a transaction, and the transaction was committed or rolled back.
type BarGroupClient ¶
type BarGroupClient struct {
// contains filtered or unexported fields
}
BarGroupClient is a client for the BarGroup schema.
func NewBarGroupClient ¶
func NewBarGroupClient(c config) *BarGroupClient
NewBarGroupClient returns a client for the BarGroup from the given config.
func (*BarGroupClient) Create ¶
func (c *BarGroupClient) Create() *BarGroupCreate
Create returns a builder for creating a BarGroup entity.
func (*BarGroupClient) CreateBulk ¶
func (c *BarGroupClient) CreateBulk(builders ...*BarGroupCreate) *BarGroupCreateBulk
CreateBulk returns a builder for creating a bulk of BarGroup entities.
func (*BarGroupClient) Delete ¶
func (c *BarGroupClient) Delete() *BarGroupDelete
Delete returns a delete builder for BarGroup.
func (*BarGroupClient) DeleteOne ¶
func (c *BarGroupClient) DeleteOne(bg *BarGroup) *BarGroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BarGroupClient) DeleteOneID ¶
func (c *BarGroupClient) DeleteOneID(id int) *BarGroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BarGroupClient) GetX ¶
func (c *BarGroupClient) GetX(ctx context.Context, id int) *BarGroup
GetX is like Get, but panics if an error occurs.
func (*BarGroupClient) Hooks ¶
func (c *BarGroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BarGroupClient) Intercept ¶
func (c *BarGroupClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `bargroup.Intercept(f(g(h())))`.
func (*BarGroupClient) Interceptors ¶
func (c *BarGroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BarGroupClient) Query ¶
func (c *BarGroupClient) Query() *BarGroupQuery
Query returns a query builder for BarGroup.
func (*BarGroupClient) QueryRecords ¶
func (c *BarGroupClient) QueryRecords(bg *BarGroup) *BarRecordQuery
QueryRecords queries the records edge of a BarGroup.
func (*BarGroupClient) QueryTimeRange ¶
func (c *BarGroupClient) QueryTimeRange(bg *BarGroup) *BarTimeRangeQuery
QueryTimeRange queries the time_range edge of a BarGroup.
func (*BarGroupClient) Update ¶
func (c *BarGroupClient) Update() *BarGroupUpdate
Update returns an update builder for BarGroup.
func (*BarGroupClient) UpdateOne ¶
func (c *BarGroupClient) UpdateOne(bg *BarGroup) *BarGroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BarGroupClient) UpdateOneID ¶
func (c *BarGroupClient) UpdateOneID(id int) *BarGroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BarGroupClient) Use ¶
func (c *BarGroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `bargroup.Hooks(f(g(h())))`.
type BarGroupCreate ¶
type BarGroupCreate struct {
// contains filtered or unexported fields
}
BarGroupCreate is the builder for creating a BarGroup entity.
func (*BarGroupCreate) AddRecordIDs ¶
func (bgc *BarGroupCreate) AddRecordIDs(ids ...int) *BarGroupCreate
AddRecordIDs adds the "records" edge to the BarRecord entity by IDs.
func (*BarGroupCreate) AddRecords ¶
func (bgc *BarGroupCreate) AddRecords(b ...*BarRecord) *BarGroupCreate
AddRecords adds the "records" edges to the BarRecord entity.
func (*BarGroupCreate) Exec ¶
func (bgc *BarGroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarGroupCreate) ExecX ¶
func (bgc *BarGroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarGroupCreate) Mutation ¶
func (bgc *BarGroupCreate) Mutation() *BarGroupMutation
Mutation returns the BarGroupMutation object of the builder.
func (*BarGroupCreate) Save ¶
func (bgc *BarGroupCreate) Save(ctx context.Context) (*BarGroup, error)
Save creates the BarGroup in the database.
func (*BarGroupCreate) SaveX ¶
func (bgc *BarGroupCreate) SaveX(ctx context.Context) *BarGroup
SaveX calls Save and panics if Save returns an error.
func (*BarGroupCreate) SetCount ¶
func (bgc *BarGroupCreate) SetCount(i int) *BarGroupCreate
SetCount sets the "count" field.
func (*BarGroupCreate) SetFirst ¶
func (bgc *BarGroupCreate) SetFirst(t time.Time) *BarGroupCreate
SetFirst sets the "first" field.
func (*BarGroupCreate) SetLast ¶
func (bgc *BarGroupCreate) SetLast(t time.Time) *BarGroupCreate
SetLast sets the "last" field.
func (*BarGroupCreate) SetTimeRange ¶
func (bgc *BarGroupCreate) SetTimeRange(b *BarTimeRange) *BarGroupCreate
SetTimeRange sets the "time_range" edge to the BarTimeRange entity.
func (*BarGroupCreate) SetTimeRangeID ¶
func (bgc *BarGroupCreate) SetTimeRangeID(i int) *BarGroupCreate
SetTimeRangeID sets the "time_range_id" field.
type BarGroupCreateBulk ¶
type BarGroupCreateBulk struct {
// contains filtered or unexported fields
}
BarGroupCreateBulk is the builder for creating many BarGroup entities in bulk.
func (*BarGroupCreateBulk) Exec ¶
func (bgcb *BarGroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BarGroupCreateBulk) ExecX ¶
func (bgcb *BarGroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BarGroupDelete ¶
type BarGroupDelete struct {
// contains filtered or unexported fields
}
BarGroupDelete is the builder for deleting a BarGroup entity.
func (*BarGroupDelete) Exec ¶
func (bgd *BarGroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BarGroupDelete) ExecX ¶
func (bgd *BarGroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BarGroupDelete) Where ¶
func (bgd *BarGroupDelete) Where(ps ...predicate.BarGroup) *BarGroupDelete
Where appends a list predicates to the BarGroupDelete builder.
type BarGroupDeleteOne ¶
type BarGroupDeleteOne struct {
// contains filtered or unexported fields
}
BarGroupDeleteOne is the builder for deleting a single BarGroup entity.
func (*BarGroupDeleteOne) Exec ¶
func (bgdo *BarGroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BarGroupDeleteOne) ExecX ¶
func (bgdo *BarGroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BarGroupEdges ¶
type BarGroupEdges struct { // TimeRange holds the value of the time_range edge. TimeRange *BarTimeRange `json:"time_range,omitempty"` // Records holds the value of the records edge. Records []*BarRecord `json:"records,omitempty"` // contains filtered or unexported fields }
BarGroupEdges holds the relations/edges for other nodes in the graph.
func (BarGroupEdges) RecordsOrErr ¶
func (e BarGroupEdges) RecordsOrErr() ([]*BarRecord, error)
RecordsOrErr returns the Records value or an error if the edge was not loaded in eager-loading.
func (BarGroupEdges) TimeRangeOrErr ¶
func (e BarGroupEdges) TimeRangeOrErr() (*BarTimeRange, error)
TimeRangeOrErr returns the TimeRange value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type BarGroupGroupBy ¶
type BarGroupGroupBy struct {
// contains filtered or unexported fields
}
BarGroupGroupBy is the group-by builder for BarGroup entities.
func (*BarGroupGroupBy) Aggregate ¶
func (bggb *BarGroupGroupBy) Aggregate(fns ...AggregateFunc) *BarGroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BarGroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarGroupGroupBy) Scan ¶
func (bggb *BarGroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarGroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarGroupMutation ¶
type BarGroupMutation struct {
// contains filtered or unexported fields
}
BarGroupMutation represents an operation that mutates the BarGroup nodes in the graph.
func (*BarGroupMutation) AddCount ¶
func (m *BarGroupMutation) AddCount(i int)
AddCount adds i to the "count" field.
func (*BarGroupMutation) AddField ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) AddRecordIDs ¶
func (m *BarGroupMutation) AddRecordIDs(ids ...int)
AddRecordIDs adds the "records" edge to the BarRecord entity by ids.
func (*BarGroupMutation) AddedCount ¶
func (m *BarGroupMutation) AddedCount() (r int, exists bool)
AddedCount returns the value that was added to the "count" field in this mutation.
func (*BarGroupMutation) AddedEdges ¶
func (m *BarGroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BarGroupMutation) AddedField ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) AddedFields ¶
func (m *BarGroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BarGroupMutation) AddedIDs ¶
func (m *BarGroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BarGroupMutation) ClearEdge ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) ClearField ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) ClearRecords ¶
func (m *BarGroupMutation) ClearRecords()
ClearRecords clears the "records" edge to the BarRecord entity.
func (*BarGroupMutation) ClearTimeRange ¶
func (m *BarGroupMutation) ClearTimeRange()
ClearTimeRange clears the "time_range" edge to the BarTimeRange entity.
func (*BarGroupMutation) ClearedEdges ¶
func (m *BarGroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BarGroupMutation) ClearedFields ¶
func (m *BarGroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BarGroupMutation) Client ¶
func (m BarGroupMutation) 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 (*BarGroupMutation) Count ¶
func (m *BarGroupMutation) Count() (r int, exists bool)
Count returns the value of the "count" field in the mutation.
func (*BarGroupMutation) EdgeCleared ¶
func (m *BarGroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BarGroupMutation) Field ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) FieldCleared ¶
func (m *BarGroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BarGroupMutation) Fields ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) First ¶
func (m *BarGroupMutation) First() (r time.Time, exists bool)
First returns the value of the "first" field in the mutation.
func (*BarGroupMutation) ID ¶
func (m *BarGroupMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BarGroupMutation) IDs ¶
func (m *BarGroupMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BarGroupMutation) Last ¶
func (m *BarGroupMutation) Last() (r time.Time, exists bool)
Last returns the value of the "last" field in the mutation.
func (*BarGroupMutation) OldCount ¶
func (m *BarGroupMutation) OldCount(ctx context.Context) (v int, err error)
OldCount returns the old "count" field's value of the BarGroup entity. If the BarGroup 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 (*BarGroupMutation) 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 (*BarGroupMutation) OldFirst ¶
OldFirst returns the old "first" field's value of the BarGroup entity. If the BarGroup 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 (*BarGroupMutation) OldLast ¶
OldLast returns the old "last" field's value of the BarGroup entity. If the BarGroup 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 (*BarGroupMutation) OldTimeRangeID ¶
func (m *BarGroupMutation) OldTimeRangeID(ctx context.Context) (v int, err error)
OldTimeRangeID returns the old "time_range_id" field's value of the BarGroup entity. If the BarGroup 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 (*BarGroupMutation) RecordsCleared ¶
func (m *BarGroupMutation) RecordsCleared() bool
RecordsCleared reports if the "records" edge to the BarRecord entity was cleared.
func (*BarGroupMutation) RecordsIDs ¶
func (m *BarGroupMutation) RecordsIDs() (ids []int)
RecordsIDs returns the "records" edge IDs in the mutation.
func (*BarGroupMutation) RemoveRecordIDs ¶
func (m *BarGroupMutation) RemoveRecordIDs(ids ...int)
RemoveRecordIDs removes the "records" edge to the BarRecord entity by IDs.
func (*BarGroupMutation) RemovedEdges ¶
func (m *BarGroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BarGroupMutation) RemovedIDs ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) RemovedRecordsIDs ¶
func (m *BarGroupMutation) RemovedRecordsIDs() (ids []int)
RemovedRecords returns the removed IDs of the "records" edge to the BarRecord entity.
func (*BarGroupMutation) ResetCount ¶
func (m *BarGroupMutation) ResetCount()
ResetCount resets all changes to the "count" field.
func (*BarGroupMutation) ResetEdge ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) ResetField ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) ResetFirst ¶
func (m *BarGroupMutation) ResetFirst()
ResetFirst resets all changes to the "first" field.
func (*BarGroupMutation) ResetLast ¶
func (m *BarGroupMutation) ResetLast()
ResetLast resets all changes to the "last" field.
func (*BarGroupMutation) ResetRecords ¶
func (m *BarGroupMutation) ResetRecords()
ResetRecords resets all changes to the "records" edge.
func (*BarGroupMutation) ResetTimeRange ¶
func (m *BarGroupMutation) ResetTimeRange()
ResetTimeRange resets all changes to the "time_range" edge.
func (*BarGroupMutation) ResetTimeRangeID ¶
func (m *BarGroupMutation) ResetTimeRangeID()
ResetTimeRangeID resets all changes to the "time_range_id" field.
func (*BarGroupMutation) SetCount ¶
func (m *BarGroupMutation) SetCount(i int)
SetCount sets the "count" field.
func (*BarGroupMutation) SetField ¶
func (m *BarGroupMutation) 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 (*BarGroupMutation) SetFirst ¶
func (m *BarGroupMutation) SetFirst(t time.Time)
SetFirst sets the "first" field.
func (*BarGroupMutation) SetLast ¶
func (m *BarGroupMutation) SetLast(t time.Time)
SetLast sets the "last" field.
func (*BarGroupMutation) SetOp ¶
func (m *BarGroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BarGroupMutation) SetTimeRangeID ¶
func (m *BarGroupMutation) SetTimeRangeID(i int)
SetTimeRangeID sets the "time_range_id" field.
func (*BarGroupMutation) TimeRangeCleared ¶
func (m *BarGroupMutation) TimeRangeCleared() bool
TimeRangeCleared reports if the "time_range" edge to the BarTimeRange entity was cleared.
func (*BarGroupMutation) TimeRangeID ¶
func (m *BarGroupMutation) TimeRangeID() (r int, exists bool)
TimeRangeID returns the value of the "time_range_id" field in the mutation.
func (*BarGroupMutation) TimeRangeIDs ¶
func (m *BarGroupMutation) TimeRangeIDs() (ids []int)
TimeRangeIDs returns the "time_range" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TimeRangeID instead. It exists only for internal usage by the builders.
func (BarGroupMutation) Tx ¶
func (m BarGroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BarGroupMutation) Type ¶
func (m *BarGroupMutation) Type() string
Type returns the node type of this mutation (BarGroup).
func (*BarGroupMutation) Where ¶
func (m *BarGroupMutation) Where(ps ...predicate.BarGroup)
Where appends a list predicates to the BarGroupMutation builder.
func (*BarGroupMutation) WhereP ¶
func (m *BarGroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BarGroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BarGroupQuery ¶
type BarGroupQuery struct {
// contains filtered or unexported fields
}
BarGroupQuery is the builder for querying BarGroup entities.
func (*BarGroupQuery) Aggregate ¶
func (bgq *BarGroupQuery) Aggregate(fns ...AggregateFunc) *BarGroupSelect
Aggregate returns a BarGroupSelect configured with the given aggregations.
func (*BarGroupQuery) All ¶
func (bgq *BarGroupQuery) All(ctx context.Context) ([]*BarGroup, error)
All executes the query and returns a list of BarGroups.
func (*BarGroupQuery) AllX ¶
func (bgq *BarGroupQuery) AllX(ctx context.Context) []*BarGroup
AllX is like All, but panics if an error occurs.
func (*BarGroupQuery) Clone ¶
func (bgq *BarGroupQuery) Clone() *BarGroupQuery
Clone returns a duplicate of the BarGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BarGroupQuery) Count ¶
func (bgq *BarGroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BarGroupQuery) CountX ¶
func (bgq *BarGroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BarGroupQuery) Exist ¶
func (bgq *BarGroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BarGroupQuery) ExistX ¶
func (bgq *BarGroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BarGroupQuery) First ¶
func (bgq *BarGroupQuery) First(ctx context.Context) (*BarGroup, error)
First returns the first BarGroup entity from the query. Returns a *NotFoundError when no BarGroup was found.
func (*BarGroupQuery) FirstID ¶
func (bgq *BarGroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first BarGroup ID from the query. Returns a *NotFoundError when no BarGroup ID was found.
func (*BarGroupQuery) FirstIDX ¶
func (bgq *BarGroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BarGroupQuery) FirstX ¶
func (bgq *BarGroupQuery) FirstX(ctx context.Context) *BarGroup
FirstX is like First, but panics if an error occurs.
func (*BarGroupQuery) GroupBy ¶
func (bgq *BarGroupQuery) GroupBy(field string, fields ...string) *BarGroupGroupBy
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 { First time.Time `json:"first,omitempty"` Count int `json:"count,omitempty"` } client.BarGroup.Query(). GroupBy(bargroup.FieldFirst). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BarGroupQuery) IDs ¶
func (bgq *BarGroupQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of BarGroup IDs.
func (*BarGroupQuery) IDsX ¶
func (bgq *BarGroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BarGroupQuery) Limit ¶
func (bgq *BarGroupQuery) Limit(limit int) *BarGroupQuery
Limit the number of records to be returned by this query.
func (*BarGroupQuery) Offset ¶
func (bgq *BarGroupQuery) Offset(offset int) *BarGroupQuery
Offset to start from.
func (*BarGroupQuery) Only ¶
func (bgq *BarGroupQuery) Only(ctx context.Context) (*BarGroup, error)
Only returns a single BarGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BarGroup entity is found. Returns a *NotFoundError when no BarGroup entities are found.
func (*BarGroupQuery) OnlyID ¶
func (bgq *BarGroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only BarGroup ID in the query. Returns a *NotSingularError when more than one BarGroup ID is found. Returns a *NotFoundError when no entities are found.
func (*BarGroupQuery) OnlyIDX ¶
func (bgq *BarGroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BarGroupQuery) OnlyX ¶
func (bgq *BarGroupQuery) OnlyX(ctx context.Context) *BarGroup
OnlyX is like Only, but panics if an error occurs.
func (*BarGroupQuery) Order ¶
func (bgq *BarGroupQuery) Order(o ...OrderFunc) *BarGroupQuery
Order specifies how the records should be ordered.
func (*BarGroupQuery) QueryRecords ¶
func (bgq *BarGroupQuery) QueryRecords() *BarRecordQuery
QueryRecords chains the current query on the "records" edge.
func (*BarGroupQuery) QueryTimeRange ¶
func (bgq *BarGroupQuery) QueryTimeRange() *BarTimeRangeQuery
QueryTimeRange chains the current query on the "time_range" edge.
func (*BarGroupQuery) Select ¶
func (bgq *BarGroupQuery) Select(fields ...string) *BarGroupSelect
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 { First time.Time `json:"first,omitempty"` } client.BarGroup.Query(). Select(bargroup.FieldFirst). Scan(ctx, &v)
func (*BarGroupQuery) Unique ¶
func (bgq *BarGroupQuery) Unique(unique bool) *BarGroupQuery
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 (*BarGroupQuery) Where ¶
func (bgq *BarGroupQuery) Where(ps ...predicate.BarGroup) *BarGroupQuery
Where adds a new predicate for the BarGroupQuery builder.
func (*BarGroupQuery) WithRecords ¶
func (bgq *BarGroupQuery) WithRecords(opts ...func(*BarRecordQuery)) *BarGroupQuery
WithRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge. The optional arguments are used to configure the query builder of the edge.
func (*BarGroupQuery) WithTimeRange ¶
func (bgq *BarGroupQuery) WithTimeRange(opts ...func(*BarTimeRangeQuery)) *BarGroupQuery
WithTimeRange tells the query-builder to eager-load the nodes that are connected to the "time_range" edge. The optional arguments are used to configure the query builder of the edge.
type BarGroupSelect ¶
type BarGroupSelect struct { *BarGroupQuery // contains filtered or unexported fields }
BarGroupSelect is the builder for selecting fields of BarGroup entities.
func (*BarGroupSelect) Aggregate ¶
func (bgs *BarGroupSelect) Aggregate(fns ...AggregateFunc) *BarGroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BarGroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarGroupSelect) Scan ¶
func (bgs *BarGroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarGroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarGroupUpdate ¶
type BarGroupUpdate struct {
// contains filtered or unexported fields
}
BarGroupUpdate is the builder for updating BarGroup entities.
func (*BarGroupUpdate) AddCount ¶
func (bgu *BarGroupUpdate) AddCount(i int) *BarGroupUpdate
AddCount adds i to the "count" field.
func (*BarGroupUpdate) AddRecordIDs ¶
func (bgu *BarGroupUpdate) AddRecordIDs(ids ...int) *BarGroupUpdate
AddRecordIDs adds the "records" edge to the BarRecord entity by IDs.
func (*BarGroupUpdate) AddRecords ¶
func (bgu *BarGroupUpdate) AddRecords(b ...*BarRecord) *BarGroupUpdate
AddRecords adds the "records" edges to the BarRecord entity.
func (*BarGroupUpdate) ClearRecords ¶
func (bgu *BarGroupUpdate) ClearRecords() *BarGroupUpdate
ClearRecords clears all "records" edges to the BarRecord entity.
func (*BarGroupUpdate) ClearTimeRange ¶
func (bgu *BarGroupUpdate) ClearTimeRange() *BarGroupUpdate
ClearTimeRange clears the "time_range" edge to the BarTimeRange entity.
func (*BarGroupUpdate) Exec ¶
func (bgu *BarGroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarGroupUpdate) ExecX ¶
func (bgu *BarGroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarGroupUpdate) Mutation ¶
func (bgu *BarGroupUpdate) Mutation() *BarGroupMutation
Mutation returns the BarGroupMutation object of the builder.
func (*BarGroupUpdate) RemoveRecordIDs ¶
func (bgu *BarGroupUpdate) RemoveRecordIDs(ids ...int) *BarGroupUpdate
RemoveRecordIDs removes the "records" edge to BarRecord entities by IDs.
func (*BarGroupUpdate) RemoveRecords ¶
func (bgu *BarGroupUpdate) RemoveRecords(b ...*BarRecord) *BarGroupUpdate
RemoveRecords removes "records" edges to BarRecord entities.
func (*BarGroupUpdate) Save ¶
func (bgu *BarGroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BarGroupUpdate) SaveX ¶
func (bgu *BarGroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BarGroupUpdate) SetCount ¶
func (bgu *BarGroupUpdate) SetCount(i int) *BarGroupUpdate
SetCount sets the "count" field.
func (*BarGroupUpdate) SetFirst ¶
func (bgu *BarGroupUpdate) SetFirst(t time.Time) *BarGroupUpdate
SetFirst sets the "first" field.
func (*BarGroupUpdate) SetLast ¶
func (bgu *BarGroupUpdate) SetLast(t time.Time) *BarGroupUpdate
SetLast sets the "last" field.
func (*BarGroupUpdate) SetTimeRange ¶
func (bgu *BarGroupUpdate) SetTimeRange(b *BarTimeRange) *BarGroupUpdate
SetTimeRange sets the "time_range" edge to the BarTimeRange entity.
func (*BarGroupUpdate) SetTimeRangeID ¶
func (bgu *BarGroupUpdate) SetTimeRangeID(i int) *BarGroupUpdate
SetTimeRangeID sets the "time_range_id" field.
func (*BarGroupUpdate) Where ¶
func (bgu *BarGroupUpdate) Where(ps ...predicate.BarGroup) *BarGroupUpdate
Where appends a list predicates to the BarGroupUpdate builder.
type BarGroupUpdateOne ¶
type BarGroupUpdateOne struct {
// contains filtered or unexported fields
}
BarGroupUpdateOne is the builder for updating a single BarGroup entity.
func (*BarGroupUpdateOne) AddCount ¶
func (bguo *BarGroupUpdateOne) AddCount(i int) *BarGroupUpdateOne
AddCount adds i to the "count" field.
func (*BarGroupUpdateOne) AddRecordIDs ¶
func (bguo *BarGroupUpdateOne) AddRecordIDs(ids ...int) *BarGroupUpdateOne
AddRecordIDs adds the "records" edge to the BarRecord entity by IDs.
func (*BarGroupUpdateOne) AddRecords ¶
func (bguo *BarGroupUpdateOne) AddRecords(b ...*BarRecord) *BarGroupUpdateOne
AddRecords adds the "records" edges to the BarRecord entity.
func (*BarGroupUpdateOne) ClearRecords ¶
func (bguo *BarGroupUpdateOne) ClearRecords() *BarGroupUpdateOne
ClearRecords clears all "records" edges to the BarRecord entity.
func (*BarGroupUpdateOne) ClearTimeRange ¶
func (bguo *BarGroupUpdateOne) ClearTimeRange() *BarGroupUpdateOne
ClearTimeRange clears the "time_range" edge to the BarTimeRange entity.
func (*BarGroupUpdateOne) Exec ¶
func (bguo *BarGroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BarGroupUpdateOne) ExecX ¶
func (bguo *BarGroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarGroupUpdateOne) Mutation ¶
func (bguo *BarGroupUpdateOne) Mutation() *BarGroupMutation
Mutation returns the BarGroupMutation object of the builder.
func (*BarGroupUpdateOne) RemoveRecordIDs ¶
func (bguo *BarGroupUpdateOne) RemoveRecordIDs(ids ...int) *BarGroupUpdateOne
RemoveRecordIDs removes the "records" edge to BarRecord entities by IDs.
func (*BarGroupUpdateOne) RemoveRecords ¶
func (bguo *BarGroupUpdateOne) RemoveRecords(b ...*BarRecord) *BarGroupUpdateOne
RemoveRecords removes "records" edges to BarRecord entities.
func (*BarGroupUpdateOne) Save ¶
func (bguo *BarGroupUpdateOne) Save(ctx context.Context) (*BarGroup, error)
Save executes the query and returns the updated BarGroup entity.
func (*BarGroupUpdateOne) SaveX ¶
func (bguo *BarGroupUpdateOne) SaveX(ctx context.Context) *BarGroup
SaveX is like Save, but panics if an error occurs.
func (*BarGroupUpdateOne) Select ¶
func (bguo *BarGroupUpdateOne) Select(field string, fields ...string) *BarGroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BarGroupUpdateOne) SetCount ¶
func (bguo *BarGroupUpdateOne) SetCount(i int) *BarGroupUpdateOne
SetCount sets the "count" field.
func (*BarGroupUpdateOne) SetFirst ¶
func (bguo *BarGroupUpdateOne) SetFirst(t time.Time) *BarGroupUpdateOne
SetFirst sets the "first" field.
func (*BarGroupUpdateOne) SetLast ¶
func (bguo *BarGroupUpdateOne) SetLast(t time.Time) *BarGroupUpdateOne
SetLast sets the "last" field.
func (*BarGroupUpdateOne) SetTimeRange ¶
func (bguo *BarGroupUpdateOne) SetTimeRange(b *BarTimeRange) *BarGroupUpdateOne
SetTimeRange sets the "time_range" edge to the BarTimeRange entity.
func (*BarGroupUpdateOne) SetTimeRangeID ¶
func (bguo *BarGroupUpdateOne) SetTimeRangeID(i int) *BarGroupUpdateOne
SetTimeRangeID sets the "time_range_id" field.
type BarRecord ¶
type BarRecord struct { // ID of the ent. ID int `json:"id,omitempty"` // Close holds the value of the "close" field. Close float64 `json:"close,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"` // Open holds the value of the "open" field. Open float64 `json:"open,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // Volume holds the value of the "volume" field. Volume float64 `json:"volume,omitempty"` // the number of trades during this bar Transactions int32 `json:"transactions,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BarRecordQuery when eager-loading is set. Edges BarRecordEdges `json:"edges"` // contains filtered or unexported fields }
BarRecord is the model entity for the BarRecord schema.
func (*BarRecord) QueryGroup ¶
func (br *BarRecord) QueryGroup() *BarGroupQuery
QueryGroup queries the "group" edge of the BarRecord entity.
func (*BarRecord) Unwrap ¶
Unwrap unwraps the BarRecord 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 (*BarRecord) Update ¶
func (br *BarRecord) Update() *BarRecordUpdateOne
Update returns a builder for updating this BarRecord. Note that you need to call BarRecord.Unwrap() before calling this method if this BarRecord was returned from a transaction, and the transaction was committed or rolled back.
type BarRecordClient ¶
type BarRecordClient struct {
// contains filtered or unexported fields
}
BarRecordClient is a client for the BarRecord schema.
func NewBarRecordClient ¶
func NewBarRecordClient(c config) *BarRecordClient
NewBarRecordClient returns a client for the BarRecord from the given config.
func (*BarRecordClient) Create ¶
func (c *BarRecordClient) Create() *BarRecordCreate
Create returns a builder for creating a BarRecord entity.
func (*BarRecordClient) CreateBulk ¶
func (c *BarRecordClient) CreateBulk(builders ...*BarRecordCreate) *BarRecordCreateBulk
CreateBulk returns a builder for creating a bulk of BarRecord entities.
func (*BarRecordClient) Delete ¶
func (c *BarRecordClient) Delete() *BarRecordDelete
Delete returns a delete builder for BarRecord.
func (*BarRecordClient) DeleteOne ¶
func (c *BarRecordClient) DeleteOne(br *BarRecord) *BarRecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BarRecordClient) DeleteOneID ¶
func (c *BarRecordClient) DeleteOneID(id int) *BarRecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BarRecordClient) GetX ¶
func (c *BarRecordClient) GetX(ctx context.Context, id int) *BarRecord
GetX is like Get, but panics if an error occurs.
func (*BarRecordClient) Hooks ¶
func (c *BarRecordClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BarRecordClient) Intercept ¶
func (c *BarRecordClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `barrecord.Intercept(f(g(h())))`.
func (*BarRecordClient) Interceptors ¶
func (c *BarRecordClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BarRecordClient) Query ¶
func (c *BarRecordClient) Query() *BarRecordQuery
Query returns a query builder for BarRecord.
func (*BarRecordClient) QueryGroup ¶
func (c *BarRecordClient) QueryGroup(br *BarRecord) *BarGroupQuery
QueryGroup queries the group edge of a BarRecord.
func (*BarRecordClient) Update ¶
func (c *BarRecordClient) Update() *BarRecordUpdate
Update returns an update builder for BarRecord.
func (*BarRecordClient) UpdateOne ¶
func (c *BarRecordClient) UpdateOne(br *BarRecord) *BarRecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BarRecordClient) UpdateOneID ¶
func (c *BarRecordClient) UpdateOneID(id int) *BarRecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BarRecordClient) Use ¶
func (c *BarRecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `barrecord.Hooks(f(g(h())))`.
type BarRecordCreate ¶
type BarRecordCreate struct {
// contains filtered or unexported fields
}
BarRecordCreate is the builder for creating a BarRecord entity.
func (*BarRecordCreate) Exec ¶
func (brc *BarRecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarRecordCreate) ExecX ¶
func (brc *BarRecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarRecordCreate) Mutation ¶
func (brc *BarRecordCreate) Mutation() *BarRecordMutation
Mutation returns the BarRecordMutation object of the builder.
func (*BarRecordCreate) Save ¶
func (brc *BarRecordCreate) Save(ctx context.Context) (*BarRecord, error)
Save creates the BarRecord in the database.
func (*BarRecordCreate) SaveX ¶
func (brc *BarRecordCreate) SaveX(ctx context.Context) *BarRecord
SaveX calls Save and panics if Save returns an error.
func (*BarRecordCreate) SetClose ¶
func (brc *BarRecordCreate) SetClose(f float64) *BarRecordCreate
SetClose sets the "close" field.
func (*BarRecordCreate) SetGroup ¶
func (brc *BarRecordCreate) SetGroup(b *BarGroup) *BarRecordCreate
SetGroup sets the "group" edge to the BarGroup entity.
func (*BarRecordCreate) SetGroupID ¶
func (brc *BarRecordCreate) SetGroupID(id int) *BarRecordCreate
SetGroupID sets the "group" edge to the BarGroup entity by ID.
func (*BarRecordCreate) SetHigh ¶
func (brc *BarRecordCreate) SetHigh(f float64) *BarRecordCreate
SetHigh sets the "high" field.
func (*BarRecordCreate) SetLow ¶
func (brc *BarRecordCreate) SetLow(f float64) *BarRecordCreate
SetLow sets the "low" field.
func (*BarRecordCreate) SetNillableGroupID ¶
func (brc *BarRecordCreate) SetNillableGroupID(id *int) *BarRecordCreate
SetNillableGroupID sets the "group" edge to the BarGroup entity by ID if the given value is not nil.
func (*BarRecordCreate) SetOpen ¶
func (brc *BarRecordCreate) SetOpen(f float64) *BarRecordCreate
SetOpen sets the "open" field.
func (*BarRecordCreate) SetTimestamp ¶
func (brc *BarRecordCreate) SetTimestamp(t time.Time) *BarRecordCreate
SetTimestamp sets the "timestamp" field.
func (*BarRecordCreate) SetTransactions ¶
func (brc *BarRecordCreate) SetTransactions(i int32) *BarRecordCreate
SetTransactions sets the "transactions" field.
func (*BarRecordCreate) SetVolume ¶
func (brc *BarRecordCreate) SetVolume(f float64) *BarRecordCreate
SetVolume sets the "volume" field.
type BarRecordCreateBulk ¶
type BarRecordCreateBulk struct {
// contains filtered or unexported fields
}
BarRecordCreateBulk is the builder for creating many BarRecord entities in bulk.
func (*BarRecordCreateBulk) Exec ¶
func (brcb *BarRecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BarRecordCreateBulk) ExecX ¶
func (brcb *BarRecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BarRecordDelete ¶
type BarRecordDelete struct {
// contains filtered or unexported fields
}
BarRecordDelete is the builder for deleting a BarRecord entity.
func (*BarRecordDelete) Exec ¶
func (brd *BarRecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BarRecordDelete) ExecX ¶
func (brd *BarRecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BarRecordDelete) Where ¶
func (brd *BarRecordDelete) Where(ps ...predicate.BarRecord) *BarRecordDelete
Where appends a list predicates to the BarRecordDelete builder.
type BarRecordDeleteOne ¶
type BarRecordDeleteOne struct {
// contains filtered or unexported fields
}
BarRecordDeleteOne is the builder for deleting a single BarRecord entity.
func (*BarRecordDeleteOne) Exec ¶
func (brdo *BarRecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BarRecordDeleteOne) ExecX ¶
func (brdo *BarRecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BarRecordEdges ¶
type BarRecordEdges struct { // Group holds the value of the group edge. Group *BarGroup `json:"group,omitempty"` // contains filtered or unexported fields }
BarRecordEdges holds the relations/edges for other nodes in the graph.
func (BarRecordEdges) GroupOrErr ¶
func (e BarRecordEdges) GroupOrErr() (*BarGroup, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type BarRecordGroupBy ¶
type BarRecordGroupBy struct {
// contains filtered or unexported fields
}
BarRecordGroupBy is the group-by builder for BarRecord entities.
func (*BarRecordGroupBy) Aggregate ¶
func (brgb *BarRecordGroupBy) Aggregate(fns ...AggregateFunc) *BarRecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BarRecordGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarRecordGroupBy) Scan ¶
func (brgb *BarRecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarRecordGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarRecordMutation ¶
type BarRecordMutation struct {
// contains filtered or unexported fields
}
BarRecordMutation represents an operation that mutates the BarRecord nodes in the graph.
func (*BarRecordMutation) AddClose ¶
func (m *BarRecordMutation) AddClose(f float64)
AddClose adds f to the "close" field.
func (*BarRecordMutation) AddField ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) AddHigh ¶
func (m *BarRecordMutation) AddHigh(f float64)
AddHigh adds f to the "high" field.
func (*BarRecordMutation) AddLow ¶
func (m *BarRecordMutation) AddLow(f float64)
AddLow adds f to the "low" field.
func (*BarRecordMutation) AddOpen ¶
func (m *BarRecordMutation) AddOpen(f float64)
AddOpen adds f to the "open" field.
func (*BarRecordMutation) AddTransactions ¶
func (m *BarRecordMutation) AddTransactions(i int32)
AddTransactions adds i to the "transactions" field.
func (*BarRecordMutation) AddVolume ¶
func (m *BarRecordMutation) AddVolume(f float64)
AddVolume adds f to the "volume" field.
func (*BarRecordMutation) AddedClose ¶
func (m *BarRecordMutation) AddedClose() (r float64, exists bool)
AddedClose returns the value that was added to the "close" field in this mutation.
func (*BarRecordMutation) AddedEdges ¶
func (m *BarRecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BarRecordMutation) AddedField ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) AddedFields ¶
func (m *BarRecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BarRecordMutation) AddedHigh ¶
func (m *BarRecordMutation) AddedHigh() (r float64, exists bool)
AddedHigh returns the value that was added to the "high" field in this mutation.
func (*BarRecordMutation) AddedIDs ¶
func (m *BarRecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BarRecordMutation) AddedLow ¶
func (m *BarRecordMutation) AddedLow() (r float64, exists bool)
AddedLow returns the value that was added to the "low" field in this mutation.
func (*BarRecordMutation) AddedOpen ¶
func (m *BarRecordMutation) AddedOpen() (r float64, exists bool)
AddedOpen returns the value that was added to the "open" field in this mutation.
func (*BarRecordMutation) AddedTransactions ¶
func (m *BarRecordMutation) AddedTransactions() (r int32, exists bool)
AddedTransactions returns the value that was added to the "transactions" field in this mutation.
func (*BarRecordMutation) AddedVolume ¶
func (m *BarRecordMutation) AddedVolume() (r float64, exists bool)
AddedVolume returns the value that was added to the "volume" field in this mutation.
func (*BarRecordMutation) ClearEdge ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) ClearField ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) ClearGroup ¶
func (m *BarRecordMutation) ClearGroup()
ClearGroup clears the "group" edge to the BarGroup entity.
func (*BarRecordMutation) ClearedEdges ¶
func (m *BarRecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BarRecordMutation) ClearedFields ¶
func (m *BarRecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BarRecordMutation) Client ¶
func (m BarRecordMutation) 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 (*BarRecordMutation) Close ¶
func (m *BarRecordMutation) Close() (r float64, exists bool)
Close returns the value of the "close" field in the mutation.
func (*BarRecordMutation) EdgeCleared ¶
func (m *BarRecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BarRecordMutation) Field ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) FieldCleared ¶
func (m *BarRecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BarRecordMutation) Fields ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) GroupCleared ¶
func (m *BarRecordMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the BarGroup entity was cleared.
func (*BarRecordMutation) GroupID ¶
func (m *BarRecordMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*BarRecordMutation) GroupIDs ¶
func (m *BarRecordMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*BarRecordMutation) High ¶
func (m *BarRecordMutation) High() (r float64, exists bool)
High returns the value of the "high" field in the mutation.
func (*BarRecordMutation) ID ¶
func (m *BarRecordMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BarRecordMutation) IDs ¶
func (m *BarRecordMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BarRecordMutation) Low ¶
func (m *BarRecordMutation) Low() (r float64, exists bool)
Low returns the value of the "low" field in the mutation.
func (*BarRecordMutation) OldClose ¶
func (m *BarRecordMutation) OldClose(ctx context.Context) (v float64, err error)
OldClose returns the old "close" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) 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 (*BarRecordMutation) OldHigh ¶
func (m *BarRecordMutation) OldHigh(ctx context.Context) (v float64, err error)
OldHigh returns the old "high" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) OldLow ¶
func (m *BarRecordMutation) OldLow(ctx context.Context) (v float64, err error)
OldLow returns the old "low" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) OldOpen ¶
func (m *BarRecordMutation) OldOpen(ctx context.Context) (v float64, err error)
OldOpen returns the old "open" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) OldTransactions ¶
func (m *BarRecordMutation) OldTransactions(ctx context.Context) (v int32, err error)
OldTransactions returns the old "transactions" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) OldVolume ¶
func (m *BarRecordMutation) OldVolume(ctx context.Context) (v float64, err error)
OldVolume returns the old "volume" field's value of the BarRecord entity. If the BarRecord 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 (*BarRecordMutation) Open ¶
func (m *BarRecordMutation) Open() (r float64, exists bool)
Open returns the value of the "open" field in the mutation.
func (*BarRecordMutation) RemovedEdges ¶
func (m *BarRecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BarRecordMutation) RemovedIDs ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) ResetClose ¶
func (m *BarRecordMutation) ResetClose()
ResetClose resets all changes to the "close" field.
func (*BarRecordMutation) ResetEdge ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) ResetField ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) ResetGroup ¶
func (m *BarRecordMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*BarRecordMutation) ResetHigh ¶
func (m *BarRecordMutation) ResetHigh()
ResetHigh resets all changes to the "high" field.
func (*BarRecordMutation) ResetLow ¶
func (m *BarRecordMutation) ResetLow()
ResetLow resets all changes to the "low" field.
func (*BarRecordMutation) ResetOpen ¶
func (m *BarRecordMutation) ResetOpen()
ResetOpen resets all changes to the "open" field.
func (*BarRecordMutation) ResetTimestamp ¶
func (m *BarRecordMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*BarRecordMutation) ResetTransactions ¶
func (m *BarRecordMutation) ResetTransactions()
ResetTransactions resets all changes to the "transactions" field.
func (*BarRecordMutation) ResetVolume ¶
func (m *BarRecordMutation) ResetVolume()
ResetVolume resets all changes to the "volume" field.
func (*BarRecordMutation) SetClose ¶
func (m *BarRecordMutation) SetClose(f float64)
SetClose sets the "close" field.
func (*BarRecordMutation) SetField ¶
func (m *BarRecordMutation) 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 (*BarRecordMutation) SetGroupID ¶
func (m *BarRecordMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the BarGroup entity by id.
func (*BarRecordMutation) SetHigh ¶
func (m *BarRecordMutation) SetHigh(f float64)
SetHigh sets the "high" field.
func (*BarRecordMutation) SetLow ¶
func (m *BarRecordMutation) SetLow(f float64)
SetLow sets the "low" field.
func (*BarRecordMutation) SetOp ¶
func (m *BarRecordMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BarRecordMutation) SetOpen ¶
func (m *BarRecordMutation) SetOpen(f float64)
SetOpen sets the "open" field.
func (*BarRecordMutation) SetTimestamp ¶
func (m *BarRecordMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*BarRecordMutation) SetTransactions ¶
func (m *BarRecordMutation) SetTransactions(i int32)
SetTransactions sets the "transactions" field.
func (*BarRecordMutation) SetVolume ¶
func (m *BarRecordMutation) SetVolume(f float64)
SetVolume sets the "volume" field.
func (*BarRecordMutation) Timestamp ¶
func (m *BarRecordMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (*BarRecordMutation) Transactions ¶
func (m *BarRecordMutation) Transactions() (r int32, exists bool)
Transactions returns the value of the "transactions" field in the mutation.
func (BarRecordMutation) Tx ¶
func (m BarRecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BarRecordMutation) Type ¶
func (m *BarRecordMutation) Type() string
Type returns the node type of this mutation (BarRecord).
func (*BarRecordMutation) Volume ¶
func (m *BarRecordMutation) Volume() (r float64, exists bool)
Volume returns the value of the "volume" field in the mutation.
func (*BarRecordMutation) Where ¶
func (m *BarRecordMutation) Where(ps ...predicate.BarRecord)
Where appends a list predicates to the BarRecordMutation builder.
func (*BarRecordMutation) WhereP ¶
func (m *BarRecordMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BarRecordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BarRecordQuery ¶
type BarRecordQuery struct {
// contains filtered or unexported fields
}
BarRecordQuery is the builder for querying BarRecord entities.
func (*BarRecordQuery) Aggregate ¶
func (brq *BarRecordQuery) Aggregate(fns ...AggregateFunc) *BarRecordSelect
Aggregate returns a BarRecordSelect configured with the given aggregations.
func (*BarRecordQuery) All ¶
func (brq *BarRecordQuery) All(ctx context.Context) ([]*BarRecord, error)
All executes the query and returns a list of BarRecords.
func (*BarRecordQuery) AllX ¶
func (brq *BarRecordQuery) AllX(ctx context.Context) []*BarRecord
AllX is like All, but panics if an error occurs.
func (*BarRecordQuery) Clone ¶
func (brq *BarRecordQuery) Clone() *BarRecordQuery
Clone returns a duplicate of the BarRecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BarRecordQuery) Count ¶
func (brq *BarRecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BarRecordQuery) CountX ¶
func (brq *BarRecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BarRecordQuery) Exist ¶
func (brq *BarRecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BarRecordQuery) ExistX ¶
func (brq *BarRecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BarRecordQuery) First ¶
func (brq *BarRecordQuery) First(ctx context.Context) (*BarRecord, error)
First returns the first BarRecord entity from the query. Returns a *NotFoundError when no BarRecord was found.
func (*BarRecordQuery) FirstID ¶
func (brq *BarRecordQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first BarRecord ID from the query. Returns a *NotFoundError when no BarRecord ID was found.
func (*BarRecordQuery) FirstIDX ¶
func (brq *BarRecordQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BarRecordQuery) FirstX ¶
func (brq *BarRecordQuery) FirstX(ctx context.Context) *BarRecord
FirstX is like First, but panics if an error occurs.
func (*BarRecordQuery) GroupBy ¶
func (brq *BarRecordQuery) GroupBy(field string, fields ...string) *BarRecordGroupBy
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 { Close float64 `json:"close,omitempty"` Count int `json:"count,omitempty"` } client.BarRecord.Query(). GroupBy(barrecord.FieldClose). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BarRecordQuery) IDs ¶
func (brq *BarRecordQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of BarRecord IDs.
func (*BarRecordQuery) IDsX ¶
func (brq *BarRecordQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BarRecordQuery) Limit ¶
func (brq *BarRecordQuery) Limit(limit int) *BarRecordQuery
Limit the number of records to be returned by this query.
func (*BarRecordQuery) Offset ¶
func (brq *BarRecordQuery) Offset(offset int) *BarRecordQuery
Offset to start from.
func (*BarRecordQuery) Only ¶
func (brq *BarRecordQuery) Only(ctx context.Context) (*BarRecord, error)
Only returns a single BarRecord entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BarRecord entity is found. Returns a *NotFoundError when no BarRecord entities are found.
func (*BarRecordQuery) OnlyID ¶
func (brq *BarRecordQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only BarRecord ID in the query. Returns a *NotSingularError when more than one BarRecord ID is found. Returns a *NotFoundError when no entities are found.
func (*BarRecordQuery) OnlyIDX ¶
func (brq *BarRecordQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BarRecordQuery) OnlyX ¶
func (brq *BarRecordQuery) OnlyX(ctx context.Context) *BarRecord
OnlyX is like Only, but panics if an error occurs.
func (*BarRecordQuery) Order ¶
func (brq *BarRecordQuery) Order(o ...OrderFunc) *BarRecordQuery
Order specifies how the records should be ordered.
func (*BarRecordQuery) QueryGroup ¶
func (brq *BarRecordQuery) QueryGroup() *BarGroupQuery
QueryGroup chains the current query on the "group" edge.
func (*BarRecordQuery) Select ¶
func (brq *BarRecordQuery) Select(fields ...string) *BarRecordSelect
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 { Close float64 `json:"close,omitempty"` } client.BarRecord.Query(). Select(barrecord.FieldClose). Scan(ctx, &v)
func (*BarRecordQuery) Unique ¶
func (brq *BarRecordQuery) Unique(unique bool) *BarRecordQuery
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 (*BarRecordQuery) Where ¶
func (brq *BarRecordQuery) Where(ps ...predicate.BarRecord) *BarRecordQuery
Where adds a new predicate for the BarRecordQuery builder.
func (*BarRecordQuery) WithGroup ¶
func (brq *BarRecordQuery) WithGroup(opts ...func(*BarGroupQuery)) *BarRecordQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
type BarRecordSelect ¶
type BarRecordSelect struct { *BarRecordQuery // contains filtered or unexported fields }
BarRecordSelect is the builder for selecting fields of BarRecord entities.
func (*BarRecordSelect) Aggregate ¶
func (brs *BarRecordSelect) Aggregate(fns ...AggregateFunc) *BarRecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BarRecordSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarRecordSelect) Scan ¶
func (brs *BarRecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarRecordSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarRecordUpdate ¶
type BarRecordUpdate struct {
// contains filtered or unexported fields
}
BarRecordUpdate is the builder for updating BarRecord entities.
func (*BarRecordUpdate) AddClose ¶
func (bru *BarRecordUpdate) AddClose(f float64) *BarRecordUpdate
AddClose adds f to the "close" field.
func (*BarRecordUpdate) AddHigh ¶
func (bru *BarRecordUpdate) AddHigh(f float64) *BarRecordUpdate
AddHigh adds f to the "high" field.
func (*BarRecordUpdate) AddLow ¶
func (bru *BarRecordUpdate) AddLow(f float64) *BarRecordUpdate
AddLow adds f to the "low" field.
func (*BarRecordUpdate) AddOpen ¶
func (bru *BarRecordUpdate) AddOpen(f float64) *BarRecordUpdate
AddOpen adds f to the "open" field.
func (*BarRecordUpdate) AddTransactions ¶
func (bru *BarRecordUpdate) AddTransactions(i int32) *BarRecordUpdate
AddTransactions adds i to the "transactions" field.
func (*BarRecordUpdate) AddVolume ¶
func (bru *BarRecordUpdate) AddVolume(f float64) *BarRecordUpdate
AddVolume adds f to the "volume" field.
func (*BarRecordUpdate) ClearGroup ¶
func (bru *BarRecordUpdate) ClearGroup() *BarRecordUpdate
ClearGroup clears the "group" edge to the BarGroup entity.
func (*BarRecordUpdate) Exec ¶
func (bru *BarRecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarRecordUpdate) ExecX ¶
func (bru *BarRecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarRecordUpdate) Mutation ¶
func (bru *BarRecordUpdate) Mutation() *BarRecordMutation
Mutation returns the BarRecordMutation object of the builder.
func (*BarRecordUpdate) Save ¶
func (bru *BarRecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BarRecordUpdate) SaveX ¶
func (bru *BarRecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BarRecordUpdate) SetClose ¶
func (bru *BarRecordUpdate) SetClose(f float64) *BarRecordUpdate
SetClose sets the "close" field.
func (*BarRecordUpdate) SetGroup ¶
func (bru *BarRecordUpdate) SetGroup(b *BarGroup) *BarRecordUpdate
SetGroup sets the "group" edge to the BarGroup entity.
func (*BarRecordUpdate) SetGroupID ¶
func (bru *BarRecordUpdate) SetGroupID(id int) *BarRecordUpdate
SetGroupID sets the "group" edge to the BarGroup entity by ID.
func (*BarRecordUpdate) SetHigh ¶
func (bru *BarRecordUpdate) SetHigh(f float64) *BarRecordUpdate
SetHigh sets the "high" field.
func (*BarRecordUpdate) SetLow ¶
func (bru *BarRecordUpdate) SetLow(f float64) *BarRecordUpdate
SetLow sets the "low" field.
func (*BarRecordUpdate) SetNillableGroupID ¶
func (bru *BarRecordUpdate) SetNillableGroupID(id *int) *BarRecordUpdate
SetNillableGroupID sets the "group" edge to the BarGroup entity by ID if the given value is not nil.
func (*BarRecordUpdate) SetOpen ¶
func (bru *BarRecordUpdate) SetOpen(f float64) *BarRecordUpdate
SetOpen sets the "open" field.
func (*BarRecordUpdate) SetTimestamp ¶
func (bru *BarRecordUpdate) SetTimestamp(t time.Time) *BarRecordUpdate
SetTimestamp sets the "timestamp" field.
func (*BarRecordUpdate) SetTransactions ¶
func (bru *BarRecordUpdate) SetTransactions(i int32) *BarRecordUpdate
SetTransactions sets the "transactions" field.
func (*BarRecordUpdate) SetVolume ¶
func (bru *BarRecordUpdate) SetVolume(f float64) *BarRecordUpdate
SetVolume sets the "volume" field.
func (*BarRecordUpdate) Where ¶
func (bru *BarRecordUpdate) Where(ps ...predicate.BarRecord) *BarRecordUpdate
Where appends a list predicates to the BarRecordUpdate builder.
type BarRecordUpdateOne ¶
type BarRecordUpdateOne struct {
// contains filtered or unexported fields
}
BarRecordUpdateOne is the builder for updating a single BarRecord entity.
func (*BarRecordUpdateOne) AddClose ¶
func (bruo *BarRecordUpdateOne) AddClose(f float64) *BarRecordUpdateOne
AddClose adds f to the "close" field.
func (*BarRecordUpdateOne) AddHigh ¶
func (bruo *BarRecordUpdateOne) AddHigh(f float64) *BarRecordUpdateOne
AddHigh adds f to the "high" field.
func (*BarRecordUpdateOne) AddLow ¶
func (bruo *BarRecordUpdateOne) AddLow(f float64) *BarRecordUpdateOne
AddLow adds f to the "low" field.
func (*BarRecordUpdateOne) AddOpen ¶
func (bruo *BarRecordUpdateOne) AddOpen(f float64) *BarRecordUpdateOne
AddOpen adds f to the "open" field.
func (*BarRecordUpdateOne) AddTransactions ¶
func (bruo *BarRecordUpdateOne) AddTransactions(i int32) *BarRecordUpdateOne
AddTransactions adds i to the "transactions" field.
func (*BarRecordUpdateOne) AddVolume ¶
func (bruo *BarRecordUpdateOne) AddVolume(f float64) *BarRecordUpdateOne
AddVolume adds f to the "volume" field.
func (*BarRecordUpdateOne) ClearGroup ¶
func (bruo *BarRecordUpdateOne) ClearGroup() *BarRecordUpdateOne
ClearGroup clears the "group" edge to the BarGroup entity.
func (*BarRecordUpdateOne) Exec ¶
func (bruo *BarRecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BarRecordUpdateOne) ExecX ¶
func (bruo *BarRecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarRecordUpdateOne) Mutation ¶
func (bruo *BarRecordUpdateOne) Mutation() *BarRecordMutation
Mutation returns the BarRecordMutation object of the builder.
func (*BarRecordUpdateOne) Save ¶
func (bruo *BarRecordUpdateOne) Save(ctx context.Context) (*BarRecord, error)
Save executes the query and returns the updated BarRecord entity.
func (*BarRecordUpdateOne) SaveX ¶
func (bruo *BarRecordUpdateOne) SaveX(ctx context.Context) *BarRecord
SaveX is like Save, but panics if an error occurs.
func (*BarRecordUpdateOne) Select ¶
func (bruo *BarRecordUpdateOne) Select(field string, fields ...string) *BarRecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BarRecordUpdateOne) SetClose ¶
func (bruo *BarRecordUpdateOne) SetClose(f float64) *BarRecordUpdateOne
SetClose sets the "close" field.
func (*BarRecordUpdateOne) SetGroup ¶
func (bruo *BarRecordUpdateOne) SetGroup(b *BarGroup) *BarRecordUpdateOne
SetGroup sets the "group" edge to the BarGroup entity.
func (*BarRecordUpdateOne) SetGroupID ¶
func (bruo *BarRecordUpdateOne) SetGroupID(id int) *BarRecordUpdateOne
SetGroupID sets the "group" edge to the BarGroup entity by ID.
func (*BarRecordUpdateOne) SetHigh ¶
func (bruo *BarRecordUpdateOne) SetHigh(f float64) *BarRecordUpdateOne
SetHigh sets the "high" field.
func (*BarRecordUpdateOne) SetLow ¶
func (bruo *BarRecordUpdateOne) SetLow(f float64) *BarRecordUpdateOne
SetLow sets the "low" field.
func (*BarRecordUpdateOne) SetNillableGroupID ¶
func (bruo *BarRecordUpdateOne) SetNillableGroupID(id *int) *BarRecordUpdateOne
SetNillableGroupID sets the "group" edge to the BarGroup entity by ID if the given value is not nil.
func (*BarRecordUpdateOne) SetOpen ¶
func (bruo *BarRecordUpdateOne) SetOpen(f float64) *BarRecordUpdateOne
SetOpen sets the "open" field.
func (*BarRecordUpdateOne) SetTimestamp ¶
func (bruo *BarRecordUpdateOne) SetTimestamp(t time.Time) *BarRecordUpdateOne
SetTimestamp sets the "timestamp" field.
func (*BarRecordUpdateOne) SetTransactions ¶
func (bruo *BarRecordUpdateOne) SetTransactions(i int32) *BarRecordUpdateOne
SetTransactions sets the "transactions" field.
func (*BarRecordUpdateOne) SetVolume ¶
func (bruo *BarRecordUpdateOne) SetVolume(f float64) *BarRecordUpdateOne
SetVolume sets the "volume" field.
type BarTimeRange ¶
type BarTimeRange struct { // ID of the ent. ID int `json:"id,omitempty"` // Start holds the value of the "start" field. Start time.Time `json:"start,omitempty"` // End holds the value of the "end" field. End time.Time `json:"end,omitempty"` // The number of BarGroups Count int `json:"count,omitempty"` // IntervalID holds the value of the "interval_id" field. IntervalID int `json:"interval_id,omitempty"` // Status holds the value of the "status" field. Status bartimerange.Status `json:"status,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BarTimeRangeQuery when eager-loading is set. Edges BarTimeRangeEdges `json:"edges"` // contains filtered or unexported fields }
BarTimeRange is the model entity for the BarTimeRange schema.
func (*BarTimeRange) QueryGroups ¶
func (btr *BarTimeRange) QueryGroups() *BarGroupQuery
QueryGroups queries the "groups" edge of the BarTimeRange entity.
func (*BarTimeRange) QueryInterval ¶
func (btr *BarTimeRange) QueryInterval() *IntervalQuery
QueryInterval queries the "interval" edge of the BarTimeRange entity.
func (*BarTimeRange) String ¶
func (btr *BarTimeRange) String() string
String implements the fmt.Stringer.
func (*BarTimeRange) Unwrap ¶
func (btr *BarTimeRange) Unwrap() *BarTimeRange
Unwrap unwraps the BarTimeRange 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 (*BarTimeRange) Update ¶
func (btr *BarTimeRange) Update() *BarTimeRangeUpdateOne
Update returns a builder for updating this BarTimeRange. Note that you need to call BarTimeRange.Unwrap() before calling this method if this BarTimeRange was returned from a transaction, and the transaction was committed or rolled back.
type BarTimeRangeClient ¶
type BarTimeRangeClient struct {
// contains filtered or unexported fields
}
BarTimeRangeClient is a client for the BarTimeRange schema.
func NewBarTimeRangeClient ¶
func NewBarTimeRangeClient(c config) *BarTimeRangeClient
NewBarTimeRangeClient returns a client for the BarTimeRange from the given config.
func (*BarTimeRangeClient) Create ¶
func (c *BarTimeRangeClient) Create() *BarTimeRangeCreate
Create returns a builder for creating a BarTimeRange entity.
func (*BarTimeRangeClient) CreateBulk ¶
func (c *BarTimeRangeClient) CreateBulk(builders ...*BarTimeRangeCreate) *BarTimeRangeCreateBulk
CreateBulk returns a builder for creating a bulk of BarTimeRange entities.
func (*BarTimeRangeClient) Delete ¶
func (c *BarTimeRangeClient) Delete() *BarTimeRangeDelete
Delete returns a delete builder for BarTimeRange.
func (*BarTimeRangeClient) DeleteOne ¶
func (c *BarTimeRangeClient) DeleteOne(btr *BarTimeRange) *BarTimeRangeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BarTimeRangeClient) DeleteOneID ¶
func (c *BarTimeRangeClient) DeleteOneID(id int) *BarTimeRangeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BarTimeRangeClient) Get ¶
func (c *BarTimeRangeClient) Get(ctx context.Context, id int) (*BarTimeRange, error)
Get returns a BarTimeRange entity by its id.
func (*BarTimeRangeClient) GetX ¶
func (c *BarTimeRangeClient) GetX(ctx context.Context, id int) *BarTimeRange
GetX is like Get, but panics if an error occurs.
func (*BarTimeRangeClient) Hooks ¶
func (c *BarTimeRangeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BarTimeRangeClient) Intercept ¶
func (c *BarTimeRangeClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `bartimerange.Intercept(f(g(h())))`.
func (*BarTimeRangeClient) Interceptors ¶
func (c *BarTimeRangeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BarTimeRangeClient) Query ¶
func (c *BarTimeRangeClient) Query() *BarTimeRangeQuery
Query returns a query builder for BarTimeRange.
func (*BarTimeRangeClient) QueryGroups ¶
func (c *BarTimeRangeClient) QueryGroups(btr *BarTimeRange) *BarGroupQuery
QueryGroups queries the groups edge of a BarTimeRange.
func (*BarTimeRangeClient) QueryInterval ¶
func (c *BarTimeRangeClient) QueryInterval(btr *BarTimeRange) *IntervalQuery
QueryInterval queries the interval edge of a BarTimeRange.
func (*BarTimeRangeClient) Update ¶
func (c *BarTimeRangeClient) Update() *BarTimeRangeUpdate
Update returns an update builder for BarTimeRange.
func (*BarTimeRangeClient) UpdateOne ¶
func (c *BarTimeRangeClient) UpdateOne(btr *BarTimeRange) *BarTimeRangeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BarTimeRangeClient) UpdateOneID ¶
func (c *BarTimeRangeClient) UpdateOneID(id int) *BarTimeRangeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BarTimeRangeClient) Use ¶
func (c *BarTimeRangeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `bartimerange.Hooks(f(g(h())))`.
type BarTimeRangeCreate ¶
type BarTimeRangeCreate struct {
// contains filtered or unexported fields
}
BarTimeRangeCreate is the builder for creating a BarTimeRange entity.
func (*BarTimeRangeCreate) AddGroupIDs ¶
func (btrc *BarTimeRangeCreate) AddGroupIDs(ids ...int) *BarTimeRangeCreate
AddGroupIDs adds the "groups" edge to the BarGroup entity by IDs.
func (*BarTimeRangeCreate) AddGroups ¶
func (btrc *BarTimeRangeCreate) AddGroups(b ...*BarGroup) *BarTimeRangeCreate
AddGroups adds the "groups" edges to the BarGroup entity.
func (*BarTimeRangeCreate) Exec ¶
func (btrc *BarTimeRangeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarTimeRangeCreate) ExecX ¶
func (btrc *BarTimeRangeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarTimeRangeCreate) Mutation ¶
func (btrc *BarTimeRangeCreate) Mutation() *BarTimeRangeMutation
Mutation returns the BarTimeRangeMutation object of the builder.
func (*BarTimeRangeCreate) Save ¶
func (btrc *BarTimeRangeCreate) Save(ctx context.Context) (*BarTimeRange, error)
Save creates the BarTimeRange in the database.
func (*BarTimeRangeCreate) SaveX ¶
func (btrc *BarTimeRangeCreate) SaveX(ctx context.Context) *BarTimeRange
SaveX calls Save and panics if Save returns an error.
func (*BarTimeRangeCreate) SetCount ¶
func (btrc *BarTimeRangeCreate) SetCount(i int) *BarTimeRangeCreate
SetCount sets the "count" field.
func (*BarTimeRangeCreate) SetEnd ¶
func (btrc *BarTimeRangeCreate) SetEnd(t time.Time) *BarTimeRangeCreate
SetEnd sets the "end" field.
func (*BarTimeRangeCreate) SetInterval ¶
func (btrc *BarTimeRangeCreate) SetInterval(i *Interval) *BarTimeRangeCreate
SetInterval sets the "interval" edge to the Interval entity.
func (*BarTimeRangeCreate) SetIntervalID ¶
func (btrc *BarTimeRangeCreate) SetIntervalID(i int) *BarTimeRangeCreate
SetIntervalID sets the "interval_id" field.
func (*BarTimeRangeCreate) SetNillableCount ¶
func (btrc *BarTimeRangeCreate) SetNillableCount(i *int) *BarTimeRangeCreate
SetNillableCount sets the "count" field if the given value is not nil.
func (*BarTimeRangeCreate) SetNillableStatus ¶
func (btrc *BarTimeRangeCreate) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BarTimeRangeCreate) SetNillableUpdateTime ¶
func (btrc *BarTimeRangeCreate) SetNillableUpdateTime(t *time.Time) *BarTimeRangeCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*BarTimeRangeCreate) SetStart ¶
func (btrc *BarTimeRangeCreate) SetStart(t time.Time) *BarTimeRangeCreate
SetStart sets the "start" field.
func (*BarTimeRangeCreate) SetStatus ¶
func (btrc *BarTimeRangeCreate) SetStatus(b bartimerange.Status) *BarTimeRangeCreate
SetStatus sets the "status" field.
func (*BarTimeRangeCreate) SetUpdateTime ¶
func (btrc *BarTimeRangeCreate) SetUpdateTime(t time.Time) *BarTimeRangeCreate
SetUpdateTime sets the "update_time" field.
type BarTimeRangeCreateBulk ¶
type BarTimeRangeCreateBulk struct {
// contains filtered or unexported fields
}
BarTimeRangeCreateBulk is the builder for creating many BarTimeRange entities in bulk.
func (*BarTimeRangeCreateBulk) Exec ¶
func (btrcb *BarTimeRangeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BarTimeRangeCreateBulk) ExecX ¶
func (btrcb *BarTimeRangeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarTimeRangeCreateBulk) Save ¶
func (btrcb *BarTimeRangeCreateBulk) Save(ctx context.Context) ([]*BarTimeRange, error)
Save creates the BarTimeRange entities in the database.
func (*BarTimeRangeCreateBulk) SaveX ¶
func (btrcb *BarTimeRangeCreateBulk) SaveX(ctx context.Context) []*BarTimeRange
SaveX is like Save, but panics if an error occurs.
type BarTimeRangeDelete ¶
type BarTimeRangeDelete struct {
// contains filtered or unexported fields
}
BarTimeRangeDelete is the builder for deleting a BarTimeRange entity.
func (*BarTimeRangeDelete) Exec ¶
func (btrd *BarTimeRangeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BarTimeRangeDelete) ExecX ¶
func (btrd *BarTimeRangeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BarTimeRangeDelete) Where ¶
func (btrd *BarTimeRangeDelete) Where(ps ...predicate.BarTimeRange) *BarTimeRangeDelete
Where appends a list predicates to the BarTimeRangeDelete builder.
type BarTimeRangeDeleteOne ¶
type BarTimeRangeDeleteOne struct {
// contains filtered or unexported fields
}
BarTimeRangeDeleteOne is the builder for deleting a single BarTimeRange entity.
func (*BarTimeRangeDeleteOne) Exec ¶
func (btrdo *BarTimeRangeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BarTimeRangeDeleteOne) ExecX ¶
func (btrdo *BarTimeRangeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BarTimeRangeEdges ¶
type BarTimeRangeEdges struct { // Interval holds the value of the interval edge. Interval *Interval `json:"interval,omitempty"` // Groups holds the value of the groups edge. Groups []*BarGroup `json:"groups,omitempty"` // contains filtered or unexported fields }
BarTimeRangeEdges holds the relations/edges for other nodes in the graph.
func (BarTimeRangeEdges) GroupsOrErr ¶
func (e BarTimeRangeEdges) GroupsOrErr() ([]*BarGroup, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (BarTimeRangeEdges) IntervalOrErr ¶
func (e BarTimeRangeEdges) IntervalOrErr() (*Interval, error)
IntervalOrErr returns the Interval value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type BarTimeRangeGroupBy ¶
type BarTimeRangeGroupBy struct {
// contains filtered or unexported fields
}
BarTimeRangeGroupBy is the group-by builder for BarTimeRange entities.
func (*BarTimeRangeGroupBy) Aggregate ¶
func (btrgb *BarTimeRangeGroupBy) Aggregate(fns ...AggregateFunc) *BarTimeRangeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BarTimeRangeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeGroupBy) Scan ¶
func (btrgb *BarTimeRangeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarTimeRangeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarTimeRangeMutation ¶
type BarTimeRangeMutation struct {
// contains filtered or unexported fields
}
BarTimeRangeMutation represents an operation that mutates the BarTimeRange nodes in the graph.
func (*BarTimeRangeMutation) AddCount ¶
func (m *BarTimeRangeMutation) AddCount(i int)
AddCount adds i to the "count" field.
func (*BarTimeRangeMutation) AddField ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) AddGroupIDs ¶
func (m *BarTimeRangeMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the BarGroup entity by ids.
func (*BarTimeRangeMutation) AddedCount ¶
func (m *BarTimeRangeMutation) AddedCount() (r int, exists bool)
AddedCount returns the value that was added to the "count" field in this mutation.
func (*BarTimeRangeMutation) AddedEdges ¶
func (m *BarTimeRangeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BarTimeRangeMutation) AddedField ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) AddedFields ¶
func (m *BarTimeRangeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BarTimeRangeMutation) AddedIDs ¶
func (m *BarTimeRangeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BarTimeRangeMutation) ClearEdge ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) ClearField ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) ClearGroups ¶
func (m *BarTimeRangeMutation) ClearGroups()
ClearGroups clears the "groups" edge to the BarGroup entity.
func (*BarTimeRangeMutation) ClearInterval ¶
func (m *BarTimeRangeMutation) ClearInterval()
ClearInterval clears the "interval" edge to the Interval entity.
func (*BarTimeRangeMutation) ClearedEdges ¶
func (m *BarTimeRangeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BarTimeRangeMutation) ClearedFields ¶
func (m *BarTimeRangeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BarTimeRangeMutation) Client ¶
func (m BarTimeRangeMutation) 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 (*BarTimeRangeMutation) Count ¶
func (m *BarTimeRangeMutation) Count() (r int, exists bool)
Count returns the value of the "count" field in the mutation.
func (*BarTimeRangeMutation) EdgeCleared ¶
func (m *BarTimeRangeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BarTimeRangeMutation) End ¶
func (m *BarTimeRangeMutation) End() (r time.Time, exists bool)
End returns the value of the "end" field in the mutation.
func (*BarTimeRangeMutation) Field ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) FieldCleared ¶
func (m *BarTimeRangeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BarTimeRangeMutation) Fields ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) GroupsCleared ¶
func (m *BarTimeRangeMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the BarGroup entity was cleared.
func (*BarTimeRangeMutation) GroupsIDs ¶
func (m *BarTimeRangeMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*BarTimeRangeMutation) ID ¶
func (m *BarTimeRangeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BarTimeRangeMutation) IDs ¶
func (m *BarTimeRangeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BarTimeRangeMutation) IntervalCleared ¶
func (m *BarTimeRangeMutation) IntervalCleared() bool
IntervalCleared reports if the "interval" edge to the Interval entity was cleared.
func (*BarTimeRangeMutation) IntervalID ¶
func (m *BarTimeRangeMutation) IntervalID() (r int, exists bool)
IntervalID returns the value of the "interval_id" field in the mutation.
func (*BarTimeRangeMutation) IntervalIDs ¶
func (m *BarTimeRangeMutation) IntervalIDs() (ids []int)
IntervalIDs returns the "interval" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IntervalID instead. It exists only for internal usage by the builders.
func (*BarTimeRangeMutation) OldCount ¶
func (m *BarTimeRangeMutation) OldCount(ctx context.Context) (v int, err error)
OldCount returns the old "count" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) OldEnd ¶
OldEnd returns the old "end" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) 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 (*BarTimeRangeMutation) OldIntervalID ¶
func (m *BarTimeRangeMutation) OldIntervalID(ctx context.Context) (v int, err error)
OldIntervalID returns the old "interval_id" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) OldStart ¶
OldStart returns the old "start" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) OldStatus ¶
func (m *BarTimeRangeMutation) OldStatus(ctx context.Context) (v bartimerange.Status, err error)
OldStatus returns the old "status" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the BarTimeRange entity. If the BarTimeRange 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 (*BarTimeRangeMutation) Op ¶
func (m *BarTimeRangeMutation) Op() Op
Op returns the operation name.
func (*BarTimeRangeMutation) RemoveGroupIDs ¶
func (m *BarTimeRangeMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the BarGroup entity by IDs.
func (*BarTimeRangeMutation) RemovedEdges ¶
func (m *BarTimeRangeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BarTimeRangeMutation) RemovedGroupsIDs ¶
func (m *BarTimeRangeMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the BarGroup entity.
func (*BarTimeRangeMutation) RemovedIDs ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) ResetCount ¶
func (m *BarTimeRangeMutation) ResetCount()
ResetCount resets all changes to the "count" field.
func (*BarTimeRangeMutation) ResetEdge ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) ResetEnd ¶
func (m *BarTimeRangeMutation) ResetEnd()
ResetEnd resets all changes to the "end" field.
func (*BarTimeRangeMutation) ResetField ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) ResetGroups ¶
func (m *BarTimeRangeMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*BarTimeRangeMutation) ResetInterval ¶
func (m *BarTimeRangeMutation) ResetInterval()
ResetInterval resets all changes to the "interval" edge.
func (*BarTimeRangeMutation) ResetIntervalID ¶
func (m *BarTimeRangeMutation) ResetIntervalID()
ResetIntervalID resets all changes to the "interval_id" field.
func (*BarTimeRangeMutation) ResetStart ¶
func (m *BarTimeRangeMutation) ResetStart()
ResetStart resets all changes to the "start" field.
func (*BarTimeRangeMutation) ResetStatus ¶
func (m *BarTimeRangeMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*BarTimeRangeMutation) ResetUpdateTime ¶
func (m *BarTimeRangeMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*BarTimeRangeMutation) SetCount ¶
func (m *BarTimeRangeMutation) SetCount(i int)
SetCount sets the "count" field.
func (*BarTimeRangeMutation) SetEnd ¶
func (m *BarTimeRangeMutation) SetEnd(t time.Time)
SetEnd sets the "end" field.
func (*BarTimeRangeMutation) SetField ¶
func (m *BarTimeRangeMutation) 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 (*BarTimeRangeMutation) SetIntervalID ¶
func (m *BarTimeRangeMutation) SetIntervalID(i int)
SetIntervalID sets the "interval_id" field.
func (*BarTimeRangeMutation) SetOp ¶
func (m *BarTimeRangeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BarTimeRangeMutation) SetStart ¶
func (m *BarTimeRangeMutation) SetStart(t time.Time)
SetStart sets the "start" field.
func (*BarTimeRangeMutation) SetStatus ¶
func (m *BarTimeRangeMutation) SetStatus(b bartimerange.Status)
SetStatus sets the "status" field.
func (*BarTimeRangeMutation) SetUpdateTime ¶
func (m *BarTimeRangeMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*BarTimeRangeMutation) Start ¶
func (m *BarTimeRangeMutation) Start() (r time.Time, exists bool)
Start returns the value of the "start" field in the mutation.
func (*BarTimeRangeMutation) Status ¶
func (m *BarTimeRangeMutation) Status() (r bartimerange.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (BarTimeRangeMutation) Tx ¶
func (m BarTimeRangeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BarTimeRangeMutation) Type ¶
func (m *BarTimeRangeMutation) Type() string
Type returns the node type of this mutation (BarTimeRange).
func (*BarTimeRangeMutation) UpdateTime ¶
func (m *BarTimeRangeMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*BarTimeRangeMutation) Where ¶
func (m *BarTimeRangeMutation) Where(ps ...predicate.BarTimeRange)
Where appends a list predicates to the BarTimeRangeMutation builder.
func (*BarTimeRangeMutation) WhereP ¶
func (m *BarTimeRangeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BarTimeRangeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BarTimeRangeQuery ¶
type BarTimeRangeQuery struct {
// contains filtered or unexported fields
}
BarTimeRangeQuery is the builder for querying BarTimeRange entities.
func (*BarTimeRangeQuery) Aggregate ¶
func (btrq *BarTimeRangeQuery) Aggregate(fns ...AggregateFunc) *BarTimeRangeSelect
Aggregate returns a BarTimeRangeSelect configured with the given aggregations.
func (*BarTimeRangeQuery) All ¶
func (btrq *BarTimeRangeQuery) All(ctx context.Context) ([]*BarTimeRange, error)
All executes the query and returns a list of BarTimeRanges.
func (*BarTimeRangeQuery) AllX ¶
func (btrq *BarTimeRangeQuery) AllX(ctx context.Context) []*BarTimeRange
AllX is like All, but panics if an error occurs.
func (*BarTimeRangeQuery) Clone ¶
func (btrq *BarTimeRangeQuery) Clone() *BarTimeRangeQuery
Clone returns a duplicate of the BarTimeRangeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BarTimeRangeQuery) Count ¶
func (btrq *BarTimeRangeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BarTimeRangeQuery) CountX ¶
func (btrq *BarTimeRangeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BarTimeRangeQuery) Exist ¶
func (btrq *BarTimeRangeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BarTimeRangeQuery) ExistX ¶
func (btrq *BarTimeRangeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BarTimeRangeQuery) First ¶
func (btrq *BarTimeRangeQuery) First(ctx context.Context) (*BarTimeRange, error)
First returns the first BarTimeRange entity from the query. Returns a *NotFoundError when no BarTimeRange was found.
func (*BarTimeRangeQuery) FirstID ¶
func (btrq *BarTimeRangeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first BarTimeRange ID from the query. Returns a *NotFoundError when no BarTimeRange ID was found.
func (*BarTimeRangeQuery) FirstIDX ¶
func (btrq *BarTimeRangeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BarTimeRangeQuery) FirstX ¶
func (btrq *BarTimeRangeQuery) FirstX(ctx context.Context) *BarTimeRange
FirstX is like First, but panics if an error occurs.
func (*BarTimeRangeQuery) GroupBy ¶
func (btrq *BarTimeRangeQuery) GroupBy(field string, fields ...string) *BarTimeRangeGroupBy
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 { Start time.Time `json:"start,omitempty"` Count int `json:"count,omitempty"` } client.BarTimeRange.Query(). GroupBy(bartimerange.FieldStart). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BarTimeRangeQuery) IDs ¶
func (btrq *BarTimeRangeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of BarTimeRange IDs.
func (*BarTimeRangeQuery) IDsX ¶
func (btrq *BarTimeRangeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BarTimeRangeQuery) Limit ¶
func (btrq *BarTimeRangeQuery) Limit(limit int) *BarTimeRangeQuery
Limit the number of records to be returned by this query.
func (*BarTimeRangeQuery) Offset ¶
func (btrq *BarTimeRangeQuery) Offset(offset int) *BarTimeRangeQuery
Offset to start from.
func (*BarTimeRangeQuery) Only ¶
func (btrq *BarTimeRangeQuery) Only(ctx context.Context) (*BarTimeRange, error)
Only returns a single BarTimeRange entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BarTimeRange entity is found. Returns a *NotFoundError when no BarTimeRange entities are found.
func (*BarTimeRangeQuery) OnlyID ¶
func (btrq *BarTimeRangeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only BarTimeRange ID in the query. Returns a *NotSingularError when more than one BarTimeRange ID is found. Returns a *NotFoundError when no entities are found.
func (*BarTimeRangeQuery) OnlyIDX ¶
func (btrq *BarTimeRangeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BarTimeRangeQuery) OnlyX ¶
func (btrq *BarTimeRangeQuery) OnlyX(ctx context.Context) *BarTimeRange
OnlyX is like Only, but panics if an error occurs.
func (*BarTimeRangeQuery) Order ¶
func (btrq *BarTimeRangeQuery) Order(o ...OrderFunc) *BarTimeRangeQuery
Order specifies how the records should be ordered.
func (*BarTimeRangeQuery) QueryGroups ¶
func (btrq *BarTimeRangeQuery) QueryGroups() *BarGroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*BarTimeRangeQuery) QueryInterval ¶
func (btrq *BarTimeRangeQuery) QueryInterval() *IntervalQuery
QueryInterval chains the current query on the "interval" edge.
func (*BarTimeRangeQuery) Select ¶
func (btrq *BarTimeRangeQuery) Select(fields ...string) *BarTimeRangeSelect
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 { Start time.Time `json:"start,omitempty"` } client.BarTimeRange.Query(). Select(bartimerange.FieldStart). Scan(ctx, &v)
func (*BarTimeRangeQuery) Unique ¶
func (btrq *BarTimeRangeQuery) Unique(unique bool) *BarTimeRangeQuery
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 (*BarTimeRangeQuery) Where ¶
func (btrq *BarTimeRangeQuery) Where(ps ...predicate.BarTimeRange) *BarTimeRangeQuery
Where adds a new predicate for the BarTimeRangeQuery builder.
func (*BarTimeRangeQuery) WithGroups ¶
func (btrq *BarTimeRangeQuery) WithGroups(opts ...func(*BarGroupQuery)) *BarTimeRangeQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*BarTimeRangeQuery) WithInterval ¶
func (btrq *BarTimeRangeQuery) WithInterval(opts ...func(*IntervalQuery)) *BarTimeRangeQuery
WithInterval tells the query-builder to eager-load the nodes that are connected to the "interval" edge. The optional arguments are used to configure the query builder of the edge.
type BarTimeRangeSelect ¶
type BarTimeRangeSelect struct { *BarTimeRangeQuery // contains filtered or unexported fields }
BarTimeRangeSelect is the builder for selecting fields of BarTimeRange entities.
func (*BarTimeRangeSelect) Aggregate ¶
func (btrs *BarTimeRangeSelect) Aggregate(fns ...AggregateFunc) *BarTimeRangeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BarTimeRangeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BarTimeRangeSelect) Scan ¶
func (btrs *BarTimeRangeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BarTimeRangeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BarTimeRangeUpdate ¶
type BarTimeRangeUpdate struct {
// contains filtered or unexported fields
}
BarTimeRangeUpdate is the builder for updating BarTimeRange entities.
func (*BarTimeRangeUpdate) AddCount ¶
func (btru *BarTimeRangeUpdate) AddCount(i int) *BarTimeRangeUpdate
AddCount adds i to the "count" field.
func (*BarTimeRangeUpdate) AddGroupIDs ¶
func (btru *BarTimeRangeUpdate) AddGroupIDs(ids ...int) *BarTimeRangeUpdate
AddGroupIDs adds the "groups" edge to the BarGroup entity by IDs.
func (*BarTimeRangeUpdate) AddGroups ¶
func (btru *BarTimeRangeUpdate) AddGroups(b ...*BarGroup) *BarTimeRangeUpdate
AddGroups adds the "groups" edges to the BarGroup entity.
func (*BarTimeRangeUpdate) ClearGroups ¶
func (btru *BarTimeRangeUpdate) ClearGroups() *BarTimeRangeUpdate
ClearGroups clears all "groups" edges to the BarGroup entity.
func (*BarTimeRangeUpdate) ClearInterval ¶
func (btru *BarTimeRangeUpdate) ClearInterval() *BarTimeRangeUpdate
ClearInterval clears the "interval" edge to the Interval entity.
func (*BarTimeRangeUpdate) Exec ¶
func (btru *BarTimeRangeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BarTimeRangeUpdate) ExecX ¶
func (btru *BarTimeRangeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarTimeRangeUpdate) Mutation ¶
func (btru *BarTimeRangeUpdate) Mutation() *BarTimeRangeMutation
Mutation returns the BarTimeRangeMutation object of the builder.
func (*BarTimeRangeUpdate) RemoveGroupIDs ¶
func (btru *BarTimeRangeUpdate) RemoveGroupIDs(ids ...int) *BarTimeRangeUpdate
RemoveGroupIDs removes the "groups" edge to BarGroup entities by IDs.
func (*BarTimeRangeUpdate) RemoveGroups ¶
func (btru *BarTimeRangeUpdate) RemoveGroups(b ...*BarGroup) *BarTimeRangeUpdate
RemoveGroups removes "groups" edges to BarGroup entities.
func (*BarTimeRangeUpdate) Save ¶
func (btru *BarTimeRangeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BarTimeRangeUpdate) SaveX ¶
func (btru *BarTimeRangeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BarTimeRangeUpdate) SetCount ¶
func (btru *BarTimeRangeUpdate) SetCount(i int) *BarTimeRangeUpdate
SetCount sets the "count" field.
func (*BarTimeRangeUpdate) SetEnd ¶
func (btru *BarTimeRangeUpdate) SetEnd(t time.Time) *BarTimeRangeUpdate
SetEnd sets the "end" field.
func (*BarTimeRangeUpdate) SetInterval ¶
func (btru *BarTimeRangeUpdate) SetInterval(i *Interval) *BarTimeRangeUpdate
SetInterval sets the "interval" edge to the Interval entity.
func (*BarTimeRangeUpdate) SetIntervalID ¶
func (btru *BarTimeRangeUpdate) SetIntervalID(i int) *BarTimeRangeUpdate
SetIntervalID sets the "interval_id" field.
func (*BarTimeRangeUpdate) SetNillableCount ¶
func (btru *BarTimeRangeUpdate) SetNillableCount(i *int) *BarTimeRangeUpdate
SetNillableCount sets the "count" field if the given value is not nil.
func (*BarTimeRangeUpdate) SetNillableStatus ¶
func (btru *BarTimeRangeUpdate) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BarTimeRangeUpdate) SetStart ¶
func (btru *BarTimeRangeUpdate) SetStart(t time.Time) *BarTimeRangeUpdate
SetStart sets the "start" field.
func (*BarTimeRangeUpdate) SetStatus ¶
func (btru *BarTimeRangeUpdate) SetStatus(b bartimerange.Status) *BarTimeRangeUpdate
SetStatus sets the "status" field.
func (*BarTimeRangeUpdate) SetUpdateTime ¶
func (btru *BarTimeRangeUpdate) SetUpdateTime(t time.Time) *BarTimeRangeUpdate
SetUpdateTime sets the "update_time" field.
func (*BarTimeRangeUpdate) Where ¶
func (btru *BarTimeRangeUpdate) Where(ps ...predicate.BarTimeRange) *BarTimeRangeUpdate
Where appends a list predicates to the BarTimeRangeUpdate builder.
type BarTimeRangeUpdateOne ¶
type BarTimeRangeUpdateOne struct {
// contains filtered or unexported fields
}
BarTimeRangeUpdateOne is the builder for updating a single BarTimeRange entity.
func (*BarTimeRangeUpdateOne) AddCount ¶
func (btruo *BarTimeRangeUpdateOne) AddCount(i int) *BarTimeRangeUpdateOne
AddCount adds i to the "count" field.
func (*BarTimeRangeUpdateOne) AddGroupIDs ¶
func (btruo *BarTimeRangeUpdateOne) AddGroupIDs(ids ...int) *BarTimeRangeUpdateOne
AddGroupIDs adds the "groups" edge to the BarGroup entity by IDs.
func (*BarTimeRangeUpdateOne) AddGroups ¶
func (btruo *BarTimeRangeUpdateOne) AddGroups(b ...*BarGroup) *BarTimeRangeUpdateOne
AddGroups adds the "groups" edges to the BarGroup entity.
func (*BarTimeRangeUpdateOne) ClearGroups ¶
func (btruo *BarTimeRangeUpdateOne) ClearGroups() *BarTimeRangeUpdateOne
ClearGroups clears all "groups" edges to the BarGroup entity.
func (*BarTimeRangeUpdateOne) ClearInterval ¶
func (btruo *BarTimeRangeUpdateOne) ClearInterval() *BarTimeRangeUpdateOne
ClearInterval clears the "interval" edge to the Interval entity.
func (*BarTimeRangeUpdateOne) Exec ¶
func (btruo *BarTimeRangeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BarTimeRangeUpdateOne) ExecX ¶
func (btruo *BarTimeRangeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BarTimeRangeUpdateOne) Mutation ¶
func (btruo *BarTimeRangeUpdateOne) Mutation() *BarTimeRangeMutation
Mutation returns the BarTimeRangeMutation object of the builder.
func (*BarTimeRangeUpdateOne) RemoveGroupIDs ¶
func (btruo *BarTimeRangeUpdateOne) RemoveGroupIDs(ids ...int) *BarTimeRangeUpdateOne
RemoveGroupIDs removes the "groups" edge to BarGroup entities by IDs.
func (*BarTimeRangeUpdateOne) RemoveGroups ¶
func (btruo *BarTimeRangeUpdateOne) RemoveGroups(b ...*BarGroup) *BarTimeRangeUpdateOne
RemoveGroups removes "groups" edges to BarGroup entities.
func (*BarTimeRangeUpdateOne) Save ¶
func (btruo *BarTimeRangeUpdateOne) Save(ctx context.Context) (*BarTimeRange, error)
Save executes the query and returns the updated BarTimeRange entity.
func (*BarTimeRangeUpdateOne) SaveX ¶
func (btruo *BarTimeRangeUpdateOne) SaveX(ctx context.Context) *BarTimeRange
SaveX is like Save, but panics if an error occurs.
func (*BarTimeRangeUpdateOne) Select ¶
func (btruo *BarTimeRangeUpdateOne) Select(field string, fields ...string) *BarTimeRangeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BarTimeRangeUpdateOne) SetCount ¶
func (btruo *BarTimeRangeUpdateOne) SetCount(i int) *BarTimeRangeUpdateOne
SetCount sets the "count" field.
func (*BarTimeRangeUpdateOne) SetEnd ¶
func (btruo *BarTimeRangeUpdateOne) SetEnd(t time.Time) *BarTimeRangeUpdateOne
SetEnd sets the "end" field.
func (*BarTimeRangeUpdateOne) SetInterval ¶
func (btruo *BarTimeRangeUpdateOne) SetInterval(i *Interval) *BarTimeRangeUpdateOne
SetInterval sets the "interval" edge to the Interval entity.
func (*BarTimeRangeUpdateOne) SetIntervalID ¶
func (btruo *BarTimeRangeUpdateOne) SetIntervalID(i int) *BarTimeRangeUpdateOne
SetIntervalID sets the "interval_id" field.
func (*BarTimeRangeUpdateOne) SetNillableCount ¶
func (btruo *BarTimeRangeUpdateOne) SetNillableCount(i *int) *BarTimeRangeUpdateOne
SetNillableCount sets the "count" field if the given value is not nil.
func (*BarTimeRangeUpdateOne) SetNillableStatus ¶
func (btruo *BarTimeRangeUpdateOne) SetNillableStatus(b *bartimerange.Status) *BarTimeRangeUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BarTimeRangeUpdateOne) SetStart ¶
func (btruo *BarTimeRangeUpdateOne) SetStart(t time.Time) *BarTimeRangeUpdateOne
SetStart sets the "start" field.
func (*BarTimeRangeUpdateOne) SetStatus ¶
func (btruo *BarTimeRangeUpdateOne) SetStatus(b bartimerange.Status) *BarTimeRangeUpdateOne
SetStatus sets the "status" field.
func (*BarTimeRangeUpdateOne) SetUpdateTime ¶
func (btruo *BarTimeRangeUpdateOne) SetUpdateTime(t time.Time) *BarTimeRangeUpdateOne
SetUpdateTime sets the "update_time" field.
type BarTimeRanges ¶
type BarTimeRanges []*BarTimeRange
BarTimeRanges is a parsable slice of BarTimeRange.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // BarGroup is the client for interacting with the BarGroup builders. BarGroup *BarGroupClient // BarRecord is the client for interacting with the BarRecord builders. BarRecord *BarRecordClient // BarTimeRange is the client for interacting with the BarTimeRange builders. BarTimeRange *BarTimeRangeClient // DataSource is the client for interacting with the DataSource builders. DataSource *DataSourceClient // Dividend is the client for interacting with the Dividend builders. Dividend *DividendClient // Entity is the client for interacting with the Entity builders. Entity *EntityClient // Exchange is the client for interacting with the Exchange builders. Exchange *ExchangeClient // Financial is the client for interacting with the Financial builders. Financial *FinancialClient // Interval is the client for interacting with the Interval builders. Interval *IntervalClient // MarketHours is the client for interacting with the MarketHours builders. MarketHours *MarketHoursClient // MarketInfo is the client for interacting with the MarketInfo builders. MarketInfo *MarketInfoClient // Split is the client for interacting with the Split builders. Split *SplitClient // TradeCondition is the client for interacting with the TradeCondition builders. TradeCondition *TradeConditionClient // TradeCorrection is the client for interacting with the TradeCorrection builders. TradeCorrection *TradeCorrectionClient // TradeRecord is the client for interacting with the TradeRecord builders. TradeRecord *TradeRecordClient // TradeTimeRange is the client for interacting with the TradeTimeRange builders. TradeTimeRange *TradeTimeRangeClient // 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(). BarGroup. 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 DataSource ¶
type DataSource struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DataSourceQuery when eager-loading is set. Edges DataSourceEdges `json:"edges"` // contains filtered or unexported fields }
DataSource is the model entity for the DataSource schema.
func (*DataSource) QueryIntervals ¶
func (ds *DataSource) QueryIntervals() *IntervalQuery
QueryIntervals queries the "intervals" edge of the DataSource entity.
func (*DataSource) String ¶
func (ds *DataSource) String() string
String implements the fmt.Stringer.
func (*DataSource) Unwrap ¶
func (ds *DataSource) Unwrap() *DataSource
Unwrap unwraps the DataSource 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 (*DataSource) Update ¶
func (ds *DataSource) Update() *DataSourceUpdateOne
Update returns a builder for updating this DataSource. Note that you need to call DataSource.Unwrap() before calling this method if this DataSource was returned from a transaction, and the transaction was committed or rolled back.
type DataSourceClient ¶
type DataSourceClient struct {
// contains filtered or unexported fields
}
DataSourceClient is a client for the DataSource schema.
func NewDataSourceClient ¶
func NewDataSourceClient(c config) *DataSourceClient
NewDataSourceClient returns a client for the DataSource from the given config.
func (*DataSourceClient) Create ¶
func (c *DataSourceClient) Create() *DataSourceCreate
Create returns a builder for creating a DataSource entity.
func (*DataSourceClient) CreateBulk ¶
func (c *DataSourceClient) CreateBulk(builders ...*DataSourceCreate) *DataSourceCreateBulk
CreateBulk returns a builder for creating a bulk of DataSource entities.
func (*DataSourceClient) Delete ¶
func (c *DataSourceClient) Delete() *DataSourceDelete
Delete returns a delete builder for DataSource.
func (*DataSourceClient) DeleteOne ¶
func (c *DataSourceClient) DeleteOne(ds *DataSource) *DataSourceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DataSourceClient) DeleteOneID ¶
func (c *DataSourceClient) DeleteOneID(id int) *DataSourceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DataSourceClient) Get ¶
func (c *DataSourceClient) Get(ctx context.Context, id int) (*DataSource, error)
Get returns a DataSource entity by its id.
func (*DataSourceClient) GetX ¶
func (c *DataSourceClient) GetX(ctx context.Context, id int) *DataSource
GetX is like Get, but panics if an error occurs.
func (*DataSourceClient) Hooks ¶
func (c *DataSourceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DataSourceClient) Intercept ¶
func (c *DataSourceClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `datasource.Intercept(f(g(h())))`.
func (*DataSourceClient) Interceptors ¶
func (c *DataSourceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DataSourceClient) Query ¶
func (c *DataSourceClient) Query() *DataSourceQuery
Query returns a query builder for DataSource.
func (*DataSourceClient) QueryIntervals ¶
func (c *DataSourceClient) QueryIntervals(ds *DataSource) *IntervalQuery
QueryIntervals queries the intervals edge of a DataSource.
func (*DataSourceClient) Update ¶
func (c *DataSourceClient) Update() *DataSourceUpdate
Update returns an update builder for DataSource.
func (*DataSourceClient) UpdateOne ¶
func (c *DataSourceClient) UpdateOne(ds *DataSource) *DataSourceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DataSourceClient) UpdateOneID ¶
func (c *DataSourceClient) UpdateOneID(id int) *DataSourceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DataSourceClient) Use ¶
func (c *DataSourceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `datasource.Hooks(f(g(h())))`.
type DataSourceCreate ¶
type DataSourceCreate struct {
// contains filtered or unexported fields
}
DataSourceCreate is the builder for creating a DataSource entity.
func (*DataSourceCreate) AddIntervalIDs ¶
func (dsc *DataSourceCreate) AddIntervalIDs(ids ...int) *DataSourceCreate
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*DataSourceCreate) AddIntervals ¶
func (dsc *DataSourceCreate) AddIntervals(i ...*Interval) *DataSourceCreate
AddIntervals adds the "intervals" edges to the Interval entity.
func (*DataSourceCreate) Exec ¶
func (dsc *DataSourceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DataSourceCreate) ExecX ¶
func (dsc *DataSourceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSourceCreate) Mutation ¶
func (dsc *DataSourceCreate) Mutation() *DataSourceMutation
Mutation returns the DataSourceMutation object of the builder.
func (*DataSourceCreate) Save ¶
func (dsc *DataSourceCreate) Save(ctx context.Context) (*DataSource, error)
Save creates the DataSource in the database.
func (*DataSourceCreate) SaveX ¶
func (dsc *DataSourceCreate) SaveX(ctx context.Context) *DataSource
SaveX calls Save and panics if Save returns an error.
func (*DataSourceCreate) SetAddress ¶
func (dsc *DataSourceCreate) SetAddress(s string) *DataSourceCreate
SetAddress sets the "address" field.
func (*DataSourceCreate) SetName ¶
func (dsc *DataSourceCreate) SetName(s string) *DataSourceCreate
SetName sets the "name" field.
func (*DataSourceCreate) SetNillableAddress ¶
func (dsc *DataSourceCreate) SetNillableAddress(s *string) *DataSourceCreate
SetNillableAddress sets the "address" field if the given value is not nil.
type DataSourceCreateBulk ¶
type DataSourceCreateBulk struct {
// contains filtered or unexported fields
}
DataSourceCreateBulk is the builder for creating many DataSource entities in bulk.
func (*DataSourceCreateBulk) Exec ¶
func (dscb *DataSourceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DataSourceCreateBulk) ExecX ¶
func (dscb *DataSourceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSourceCreateBulk) Save ¶
func (dscb *DataSourceCreateBulk) Save(ctx context.Context) ([]*DataSource, error)
Save creates the DataSource entities in the database.
func (*DataSourceCreateBulk) SaveX ¶
func (dscb *DataSourceCreateBulk) SaveX(ctx context.Context) []*DataSource
SaveX is like Save, but panics if an error occurs.
type DataSourceDelete ¶
type DataSourceDelete struct {
// contains filtered or unexported fields
}
DataSourceDelete is the builder for deleting a DataSource entity.
func (*DataSourceDelete) Exec ¶
func (dsd *DataSourceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DataSourceDelete) ExecX ¶
func (dsd *DataSourceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DataSourceDelete) Where ¶
func (dsd *DataSourceDelete) Where(ps ...predicate.DataSource) *DataSourceDelete
Where appends a list predicates to the DataSourceDelete builder.
type DataSourceDeleteOne ¶
type DataSourceDeleteOne struct {
// contains filtered or unexported fields
}
DataSourceDeleteOne is the builder for deleting a single DataSource entity.
func (*DataSourceDeleteOne) Exec ¶
func (dsdo *DataSourceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DataSourceDeleteOne) ExecX ¶
func (dsdo *DataSourceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DataSourceEdges ¶
type DataSourceEdges struct { // Intervals holds the value of the intervals edge. Intervals []*Interval `json:"intervals,omitempty"` // contains filtered or unexported fields }
DataSourceEdges holds the relations/edges for other nodes in the graph.
func (DataSourceEdges) IntervalsOrErr ¶
func (e DataSourceEdges) IntervalsOrErr() ([]*Interval, error)
IntervalsOrErr returns the Intervals value or an error if the edge was not loaded in eager-loading.
type DataSourceGroupBy ¶
type DataSourceGroupBy struct {
// contains filtered or unexported fields
}
DataSourceGroupBy is the group-by builder for DataSource entities.
func (*DataSourceGroupBy) Aggregate ¶
func (dsgb *DataSourceGroupBy) Aggregate(fns ...AggregateFunc) *DataSourceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DataSourceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DataSourceGroupBy) Scan ¶
func (dsgb *DataSourceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DataSourceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DataSourceMutation ¶
type DataSourceMutation struct {
// contains filtered or unexported fields
}
DataSourceMutation represents an operation that mutates the DataSource nodes in the graph.
func (*DataSourceMutation) AddField ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) AddIntervalIDs ¶
func (m *DataSourceMutation) AddIntervalIDs(ids ...int)
AddIntervalIDs adds the "intervals" edge to the Interval entity by ids.
func (*DataSourceMutation) AddedEdges ¶
func (m *DataSourceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DataSourceMutation) AddedField ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) AddedFields ¶
func (m *DataSourceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DataSourceMutation) AddedIDs ¶
func (m *DataSourceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DataSourceMutation) Address ¶
func (m *DataSourceMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*DataSourceMutation) ClearEdge ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) ClearField ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) ClearIntervals ¶
func (m *DataSourceMutation) ClearIntervals()
ClearIntervals clears the "intervals" edge to the Interval entity.
func (*DataSourceMutation) ClearedEdges ¶
func (m *DataSourceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DataSourceMutation) ClearedFields ¶
func (m *DataSourceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DataSourceMutation) Client ¶
func (m DataSourceMutation) 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 (*DataSourceMutation) EdgeCleared ¶
func (m *DataSourceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DataSourceMutation) Field ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) FieldCleared ¶
func (m *DataSourceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DataSourceMutation) Fields ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) ID ¶
func (m *DataSourceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DataSourceMutation) IDs ¶
func (m *DataSourceMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DataSourceMutation) IntervalsCleared ¶
func (m *DataSourceMutation) IntervalsCleared() bool
IntervalsCleared reports if the "intervals" edge to the Interval entity was cleared.
func (*DataSourceMutation) IntervalsIDs ¶
func (m *DataSourceMutation) IntervalsIDs() (ids []int)
IntervalsIDs returns the "intervals" edge IDs in the mutation.
func (*DataSourceMutation) Name ¶
func (m *DataSourceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DataSourceMutation) OldAddress ¶
func (m *DataSourceMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" field's value of the DataSource entity. If the DataSource 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 (*DataSourceMutation) 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 (*DataSourceMutation) OldName ¶
func (m *DataSourceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the DataSource entity. If the DataSource 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 (*DataSourceMutation) RemoveIntervalIDs ¶
func (m *DataSourceMutation) RemoveIntervalIDs(ids ...int)
RemoveIntervalIDs removes the "intervals" edge to the Interval entity by IDs.
func (*DataSourceMutation) RemovedEdges ¶
func (m *DataSourceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DataSourceMutation) RemovedIDs ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) RemovedIntervalsIDs ¶
func (m *DataSourceMutation) RemovedIntervalsIDs() (ids []int)
RemovedIntervals returns the removed IDs of the "intervals" edge to the Interval entity.
func (*DataSourceMutation) ResetAddress ¶
func (m *DataSourceMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*DataSourceMutation) ResetEdge ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) ResetField ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) ResetIntervals ¶
func (m *DataSourceMutation) ResetIntervals()
ResetIntervals resets all changes to the "intervals" edge.
func (*DataSourceMutation) ResetName ¶
func (m *DataSourceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DataSourceMutation) SetAddress ¶
func (m *DataSourceMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*DataSourceMutation) SetField ¶
func (m *DataSourceMutation) 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 (*DataSourceMutation) SetName ¶
func (m *DataSourceMutation) SetName(s string)
SetName sets the "name" field.
func (*DataSourceMutation) SetOp ¶
func (m *DataSourceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (DataSourceMutation) Tx ¶
func (m DataSourceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DataSourceMutation) Type ¶
func (m *DataSourceMutation) Type() string
Type returns the node type of this mutation (DataSource).
func (*DataSourceMutation) Where ¶
func (m *DataSourceMutation) Where(ps ...predicate.DataSource)
Where appends a list predicates to the DataSourceMutation builder.
func (*DataSourceMutation) WhereP ¶
func (m *DataSourceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DataSourceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DataSourceQuery ¶
type DataSourceQuery struct {
// contains filtered or unexported fields
}
DataSourceQuery is the builder for querying DataSource entities.
func (*DataSourceQuery) Aggregate ¶
func (dsq *DataSourceQuery) Aggregate(fns ...AggregateFunc) *DataSourceSelect
Aggregate returns a DataSourceSelect configured with the given aggregations.
func (*DataSourceQuery) All ¶
func (dsq *DataSourceQuery) All(ctx context.Context) ([]*DataSource, error)
All executes the query and returns a list of DataSources.
func (*DataSourceQuery) AllX ¶
func (dsq *DataSourceQuery) AllX(ctx context.Context) []*DataSource
AllX is like All, but panics if an error occurs.
func (*DataSourceQuery) Clone ¶
func (dsq *DataSourceQuery) Clone() *DataSourceQuery
Clone returns a duplicate of the DataSourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DataSourceQuery) Count ¶
func (dsq *DataSourceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DataSourceQuery) CountX ¶
func (dsq *DataSourceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DataSourceQuery) Exist ¶
func (dsq *DataSourceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DataSourceQuery) ExistX ¶
func (dsq *DataSourceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DataSourceQuery) First ¶
func (dsq *DataSourceQuery) First(ctx context.Context) (*DataSource, error)
First returns the first DataSource entity from the query. Returns a *NotFoundError when no DataSource was found.
func (*DataSourceQuery) FirstID ¶
func (dsq *DataSourceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DataSource ID from the query. Returns a *NotFoundError when no DataSource ID was found.
func (*DataSourceQuery) FirstIDX ¶
func (dsq *DataSourceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DataSourceQuery) FirstX ¶
func (dsq *DataSourceQuery) FirstX(ctx context.Context) *DataSource
FirstX is like First, but panics if an error occurs.
func (*DataSourceQuery) GroupBy ¶
func (dsq *DataSourceQuery) GroupBy(field string, fields ...string) *DataSourceGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.DataSource.Query(). GroupBy(datasource.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DataSourceQuery) IDs ¶
func (dsq *DataSourceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DataSource IDs.
func (*DataSourceQuery) IDsX ¶
func (dsq *DataSourceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DataSourceQuery) Limit ¶
func (dsq *DataSourceQuery) Limit(limit int) *DataSourceQuery
Limit the number of records to be returned by this query.
func (*DataSourceQuery) Offset ¶
func (dsq *DataSourceQuery) Offset(offset int) *DataSourceQuery
Offset to start from.
func (*DataSourceQuery) Only ¶
func (dsq *DataSourceQuery) Only(ctx context.Context) (*DataSource, error)
Only returns a single DataSource entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DataSource entity is found. Returns a *NotFoundError when no DataSource entities are found.
func (*DataSourceQuery) OnlyID ¶
func (dsq *DataSourceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DataSource ID in the query. Returns a *NotSingularError when more than one DataSource ID is found. Returns a *NotFoundError when no entities are found.
func (*DataSourceQuery) OnlyIDX ¶
func (dsq *DataSourceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DataSourceQuery) OnlyX ¶
func (dsq *DataSourceQuery) OnlyX(ctx context.Context) *DataSource
OnlyX is like Only, but panics if an error occurs.
func (*DataSourceQuery) Order ¶
func (dsq *DataSourceQuery) Order(o ...OrderFunc) *DataSourceQuery
Order specifies how the records should be ordered.
func (*DataSourceQuery) QueryIntervals ¶
func (dsq *DataSourceQuery) QueryIntervals() *IntervalQuery
QueryIntervals chains the current query on the "intervals" edge.
func (*DataSourceQuery) Select ¶
func (dsq *DataSourceQuery) Select(fields ...string) *DataSourceSelect
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 { Name string `json:"name,omitempty"` } client.DataSource.Query(). Select(datasource.FieldName). Scan(ctx, &v)
func (*DataSourceQuery) Unique ¶
func (dsq *DataSourceQuery) Unique(unique bool) *DataSourceQuery
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 (*DataSourceQuery) Where ¶
func (dsq *DataSourceQuery) Where(ps ...predicate.DataSource) *DataSourceQuery
Where adds a new predicate for the DataSourceQuery builder.
func (*DataSourceQuery) WithIntervals ¶
func (dsq *DataSourceQuery) WithIntervals(opts ...func(*IntervalQuery)) *DataSourceQuery
WithIntervals tells the query-builder to eager-load the nodes that are connected to the "intervals" edge. The optional arguments are used to configure the query builder of the edge.
type DataSourceSelect ¶
type DataSourceSelect struct { *DataSourceQuery // contains filtered or unexported fields }
DataSourceSelect is the builder for selecting fields of DataSource entities.
func (*DataSourceSelect) Aggregate ¶
func (dss *DataSourceSelect) Aggregate(fns ...AggregateFunc) *DataSourceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DataSourceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DataSourceSelect) Scan ¶
func (dss *DataSourceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DataSourceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DataSourceUpdate ¶
type DataSourceUpdate struct {
// contains filtered or unexported fields
}
DataSourceUpdate is the builder for updating DataSource entities.
func (*DataSourceUpdate) AddIntervalIDs ¶
func (dsu *DataSourceUpdate) AddIntervalIDs(ids ...int) *DataSourceUpdate
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*DataSourceUpdate) AddIntervals ¶
func (dsu *DataSourceUpdate) AddIntervals(i ...*Interval) *DataSourceUpdate
AddIntervals adds the "intervals" edges to the Interval entity.
func (*DataSourceUpdate) ClearIntervals ¶
func (dsu *DataSourceUpdate) ClearIntervals() *DataSourceUpdate
ClearIntervals clears all "intervals" edges to the Interval entity.
func (*DataSourceUpdate) Exec ¶
func (dsu *DataSourceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DataSourceUpdate) ExecX ¶
func (dsu *DataSourceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSourceUpdate) Mutation ¶
func (dsu *DataSourceUpdate) Mutation() *DataSourceMutation
Mutation returns the DataSourceMutation object of the builder.
func (*DataSourceUpdate) RemoveIntervalIDs ¶
func (dsu *DataSourceUpdate) RemoveIntervalIDs(ids ...int) *DataSourceUpdate
RemoveIntervalIDs removes the "intervals" edge to Interval entities by IDs.
func (*DataSourceUpdate) RemoveIntervals ¶
func (dsu *DataSourceUpdate) RemoveIntervals(i ...*Interval) *DataSourceUpdate
RemoveIntervals removes "intervals" edges to Interval entities.
func (*DataSourceUpdate) Save ¶
func (dsu *DataSourceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DataSourceUpdate) SaveX ¶
func (dsu *DataSourceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DataSourceUpdate) SetAddress ¶
func (dsu *DataSourceUpdate) SetAddress(s string) *DataSourceUpdate
SetAddress sets the "address" field.
func (*DataSourceUpdate) SetName ¶
func (dsu *DataSourceUpdate) SetName(s string) *DataSourceUpdate
SetName sets the "name" field.
func (*DataSourceUpdate) SetNillableAddress ¶
func (dsu *DataSourceUpdate) SetNillableAddress(s *string) *DataSourceUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*DataSourceUpdate) Where ¶
func (dsu *DataSourceUpdate) Where(ps ...predicate.DataSource) *DataSourceUpdate
Where appends a list predicates to the DataSourceUpdate builder.
type DataSourceUpdateOne ¶
type DataSourceUpdateOne struct {
// contains filtered or unexported fields
}
DataSourceUpdateOne is the builder for updating a single DataSource entity.
func (*DataSourceUpdateOne) AddIntervalIDs ¶
func (dsuo *DataSourceUpdateOne) AddIntervalIDs(ids ...int) *DataSourceUpdateOne
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*DataSourceUpdateOne) AddIntervals ¶
func (dsuo *DataSourceUpdateOne) AddIntervals(i ...*Interval) *DataSourceUpdateOne
AddIntervals adds the "intervals" edges to the Interval entity.
func (*DataSourceUpdateOne) ClearIntervals ¶
func (dsuo *DataSourceUpdateOne) ClearIntervals() *DataSourceUpdateOne
ClearIntervals clears all "intervals" edges to the Interval entity.
func (*DataSourceUpdateOne) Exec ¶
func (dsuo *DataSourceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DataSourceUpdateOne) ExecX ¶
func (dsuo *DataSourceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataSourceUpdateOne) Mutation ¶
func (dsuo *DataSourceUpdateOne) Mutation() *DataSourceMutation
Mutation returns the DataSourceMutation object of the builder.
func (*DataSourceUpdateOne) RemoveIntervalIDs ¶
func (dsuo *DataSourceUpdateOne) RemoveIntervalIDs(ids ...int) *DataSourceUpdateOne
RemoveIntervalIDs removes the "intervals" edge to Interval entities by IDs.
func (*DataSourceUpdateOne) RemoveIntervals ¶
func (dsuo *DataSourceUpdateOne) RemoveIntervals(i ...*Interval) *DataSourceUpdateOne
RemoveIntervals removes "intervals" edges to Interval entities.
func (*DataSourceUpdateOne) Save ¶
func (dsuo *DataSourceUpdateOne) Save(ctx context.Context) (*DataSource, error)
Save executes the query and returns the updated DataSource entity.
func (*DataSourceUpdateOne) SaveX ¶
func (dsuo *DataSourceUpdateOne) SaveX(ctx context.Context) *DataSource
SaveX is like Save, but panics if an error occurs.
func (*DataSourceUpdateOne) Select ¶
func (dsuo *DataSourceUpdateOne) Select(field string, fields ...string) *DataSourceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DataSourceUpdateOne) SetAddress ¶
func (dsuo *DataSourceUpdateOne) SetAddress(s string) *DataSourceUpdateOne
SetAddress sets the "address" field.
func (*DataSourceUpdateOne) SetName ¶
func (dsuo *DataSourceUpdateOne) SetName(s string) *DataSourceUpdateOne
SetName sets the "name" field.
func (*DataSourceUpdateOne) SetNillableAddress ¶
func (dsuo *DataSourceUpdateOne) SetNillableAddress(s *string) *DataSourceUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
type Dividend ¶
type Dividend struct { // ID of the ent. ID int `json:"id,omitempty"` // CashAmount holds the value of the "cash_amount" field. CashAmount float64 `json:"cash_amount,omitempty"` // DeclarationDate holds the value of the "declaration_date" field. DeclarationDate time.Time `json:"declaration_date,omitempty"` // DividendType holds the value of the "dividend_type" field. DividendType dividend.DividendType `json:"dividend_type,omitempty"` // ExDividendDate holds the value of the "ex_dividend_date" field. ExDividendDate time.Time `json:"ex_dividend_date,omitempty"` // Frequency holds the value of the "frequency" field. Frequency int `json:"frequency,omitempty"` // RecordDate holds the value of the "record_date" field. RecordDate time.Time `json:"record_date,omitempty"` // PayDate holds the value of the "pay_date" field. PayDate time.Time `json:"pay_date,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DividendQuery when eager-loading is set. Edges DividendEdges `json:"edges"` // contains filtered or unexported fields }
Dividend is the model entity for the Dividend schema.
func (*Dividend) QueryStock ¶
func (d *Dividend) QueryStock() *EntityQuery
QueryStock queries the "stock" edge of the Dividend entity.
func (*Dividend) Unwrap ¶
Unwrap unwraps the Dividend 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 (*Dividend) Update ¶
func (d *Dividend) Update() *DividendUpdateOne
Update returns a builder for updating this Dividend. Note that you need to call Dividend.Unwrap() before calling this method if this Dividend was returned from a transaction, and the transaction was committed or rolled back.
type DividendClient ¶
type DividendClient struct {
// contains filtered or unexported fields
}
DividendClient is a client for the Dividend schema.
func NewDividendClient ¶
func NewDividendClient(c config) *DividendClient
NewDividendClient returns a client for the Dividend from the given config.
func (*DividendClient) Create ¶
func (c *DividendClient) Create() *DividendCreate
Create returns a builder for creating a Dividend entity.
func (*DividendClient) CreateBulk ¶
func (c *DividendClient) CreateBulk(builders ...*DividendCreate) *DividendCreateBulk
CreateBulk returns a builder for creating a bulk of Dividend entities.
func (*DividendClient) Delete ¶
func (c *DividendClient) Delete() *DividendDelete
Delete returns a delete builder for Dividend.
func (*DividendClient) DeleteOne ¶
func (c *DividendClient) DeleteOne(d *Dividend) *DividendDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DividendClient) DeleteOneID ¶
func (c *DividendClient) DeleteOneID(id int) *DividendDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DividendClient) GetX ¶
func (c *DividendClient) GetX(ctx context.Context, id int) *Dividend
GetX is like Get, but panics if an error occurs.
func (*DividendClient) Hooks ¶
func (c *DividendClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DividendClient) Intercept ¶
func (c *DividendClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dividend.Intercept(f(g(h())))`.
func (*DividendClient) Interceptors ¶
func (c *DividendClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DividendClient) Query ¶
func (c *DividendClient) Query() *DividendQuery
Query returns a query builder for Dividend.
func (*DividendClient) QueryStock ¶
func (c *DividendClient) QueryStock(d *Dividend) *EntityQuery
QueryStock queries the stock edge of a Dividend.
func (*DividendClient) Update ¶
func (c *DividendClient) Update() *DividendUpdate
Update returns an update builder for Dividend.
func (*DividendClient) UpdateOne ¶
func (c *DividendClient) UpdateOne(d *Dividend) *DividendUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DividendClient) UpdateOneID ¶
func (c *DividendClient) UpdateOneID(id int) *DividendUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DividendClient) Use ¶
func (c *DividendClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dividend.Hooks(f(g(h())))`.
type DividendCreate ¶
type DividendCreate struct {
// contains filtered or unexported fields
}
DividendCreate is the builder for creating a Dividend entity.
func (*DividendCreate) AddStock ¶
func (dc *DividendCreate) AddStock(e ...*Entity) *DividendCreate
AddStock adds the "stock" edges to the Entity entity.
func (*DividendCreate) AddStockIDs ¶
func (dc *DividendCreate) AddStockIDs(ids ...int) *DividendCreate
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*DividendCreate) Exec ¶
func (dc *DividendCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DividendCreate) ExecX ¶
func (dc *DividendCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DividendCreate) Mutation ¶
func (dc *DividendCreate) Mutation() *DividendMutation
Mutation returns the DividendMutation object of the builder.
func (*DividendCreate) Save ¶
func (dc *DividendCreate) Save(ctx context.Context) (*Dividend, error)
Save creates the Dividend in the database.
func (*DividendCreate) SaveX ¶
func (dc *DividendCreate) SaveX(ctx context.Context) *Dividend
SaveX calls Save and panics if Save returns an error.
func (*DividendCreate) SetCashAmount ¶
func (dc *DividendCreate) SetCashAmount(f float64) *DividendCreate
SetCashAmount sets the "cash_amount" field.
func (*DividendCreate) SetDeclarationDate ¶
func (dc *DividendCreate) SetDeclarationDate(t time.Time) *DividendCreate
SetDeclarationDate sets the "declaration_date" field.
func (*DividendCreate) SetDividendType ¶
func (dc *DividendCreate) SetDividendType(dt dividend.DividendType) *DividendCreate
SetDividendType sets the "dividend_type" field.
func (*DividendCreate) SetExDividendDate ¶
func (dc *DividendCreate) SetExDividendDate(t time.Time) *DividendCreate
SetExDividendDate sets the "ex_dividend_date" field.
func (*DividendCreate) SetFrequency ¶
func (dc *DividendCreate) SetFrequency(i int) *DividendCreate
SetFrequency sets the "frequency" field.
func (*DividendCreate) SetPayDate ¶
func (dc *DividendCreate) SetPayDate(t time.Time) *DividendCreate
SetPayDate sets the "pay_date" field.
func (*DividendCreate) SetRecordDate ¶
func (dc *DividendCreate) SetRecordDate(t time.Time) *DividendCreate
SetRecordDate sets the "record_date" field.
type DividendCreateBulk ¶
type DividendCreateBulk struct {
// contains filtered or unexported fields
}
DividendCreateBulk is the builder for creating many Dividend entities in bulk.
func (*DividendCreateBulk) Exec ¶
func (dcb *DividendCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DividendCreateBulk) ExecX ¶
func (dcb *DividendCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DividendDelete ¶
type DividendDelete struct {
// contains filtered or unexported fields
}
DividendDelete is the builder for deleting a Dividend entity.
func (*DividendDelete) Exec ¶
func (dd *DividendDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DividendDelete) ExecX ¶
func (dd *DividendDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DividendDelete) Where ¶
func (dd *DividendDelete) Where(ps ...predicate.Dividend) *DividendDelete
Where appends a list predicates to the DividendDelete builder.
type DividendDeleteOne ¶
type DividendDeleteOne struct {
// contains filtered or unexported fields
}
DividendDeleteOne is the builder for deleting a single Dividend entity.
func (*DividendDeleteOne) Exec ¶
func (ddo *DividendDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DividendDeleteOne) ExecX ¶
func (ddo *DividendDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DividendEdges ¶
type DividendEdges struct { // Stock holds the value of the stock edge. Stock []*Entity `json:"stock,omitempty"` // contains filtered or unexported fields }
DividendEdges holds the relations/edges for other nodes in the graph.
func (DividendEdges) StockOrErr ¶
func (e DividendEdges) StockOrErr() ([]*Entity, error)
StockOrErr returns the Stock value or an error if the edge was not loaded in eager-loading.
type DividendGroupBy ¶
type DividendGroupBy struct {
// contains filtered or unexported fields
}
DividendGroupBy is the group-by builder for Dividend entities.
func (*DividendGroupBy) Aggregate ¶
func (dgb *DividendGroupBy) Aggregate(fns ...AggregateFunc) *DividendGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DividendGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DividendGroupBy) Scan ¶
func (dgb *DividendGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DividendGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DividendMutation ¶
type DividendMutation struct {
// contains filtered or unexported fields
}
DividendMutation represents an operation that mutates the Dividend nodes in the graph.
func (*DividendMutation) AddCashAmount ¶
func (m *DividendMutation) AddCashAmount(f float64)
AddCashAmount adds f to the "cash_amount" field.
func (*DividendMutation) AddField ¶
func (m *DividendMutation) 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 (*DividendMutation) AddFrequency ¶
func (m *DividendMutation) AddFrequency(i int)
AddFrequency adds i to the "frequency" field.
func (*DividendMutation) AddStockIDs ¶
func (m *DividendMutation) AddStockIDs(ids ...int)
AddStockIDs adds the "stock" edge to the Entity entity by ids.
func (*DividendMutation) AddedCashAmount ¶
func (m *DividendMutation) AddedCashAmount() (r float64, exists bool)
AddedCashAmount returns the value that was added to the "cash_amount" field in this mutation.
func (*DividendMutation) AddedEdges ¶
func (m *DividendMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DividendMutation) AddedField ¶
func (m *DividendMutation) 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 (*DividendMutation) AddedFields ¶
func (m *DividendMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DividendMutation) AddedFrequency ¶
func (m *DividendMutation) AddedFrequency() (r int, exists bool)
AddedFrequency returns the value that was added to the "frequency" field in this mutation.
func (*DividendMutation) AddedIDs ¶
func (m *DividendMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DividendMutation) CashAmount ¶
func (m *DividendMutation) CashAmount() (r float64, exists bool)
CashAmount returns the value of the "cash_amount" field in the mutation.
func (*DividendMutation) ClearEdge ¶
func (m *DividendMutation) 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 (*DividendMutation) ClearField ¶
func (m *DividendMutation) 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 (*DividendMutation) ClearStock ¶
func (m *DividendMutation) ClearStock()
ClearStock clears the "stock" edge to the Entity entity.
func (*DividendMutation) ClearedEdges ¶
func (m *DividendMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DividendMutation) ClearedFields ¶
func (m *DividendMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DividendMutation) Client ¶
func (m DividendMutation) 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 (*DividendMutation) DeclarationDate ¶
func (m *DividendMutation) DeclarationDate() (r time.Time, exists bool)
DeclarationDate returns the value of the "declaration_date" field in the mutation.
func (*DividendMutation) DividendType ¶
func (m *DividendMutation) DividendType() (r dividend.DividendType, exists bool)
DividendType returns the value of the "dividend_type" field in the mutation.
func (*DividendMutation) EdgeCleared ¶
func (m *DividendMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DividendMutation) ExDividendDate ¶
func (m *DividendMutation) ExDividendDate() (r time.Time, exists bool)
ExDividendDate returns the value of the "ex_dividend_date" field in the mutation.
func (*DividendMutation) Field ¶
func (m *DividendMutation) 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 (*DividendMutation) FieldCleared ¶
func (m *DividendMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DividendMutation) Fields ¶
func (m *DividendMutation) 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 (*DividendMutation) Frequency ¶
func (m *DividendMutation) Frequency() (r int, exists bool)
Frequency returns the value of the "frequency" field in the mutation.
func (*DividendMutation) ID ¶
func (m *DividendMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DividendMutation) IDs ¶
func (m *DividendMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DividendMutation) OldCashAmount ¶
func (m *DividendMutation) OldCashAmount(ctx context.Context) (v float64, err error)
OldCashAmount returns the old "cash_amount" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) OldDeclarationDate ¶
OldDeclarationDate returns the old "declaration_date" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) OldDividendType ¶
func (m *DividendMutation) OldDividendType(ctx context.Context) (v dividend.DividendType, err error)
OldDividendType returns the old "dividend_type" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) OldExDividendDate ¶
OldExDividendDate returns the old "ex_dividend_date" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) 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 (*DividendMutation) OldFrequency ¶
func (m *DividendMutation) OldFrequency(ctx context.Context) (v int, err error)
OldFrequency returns the old "frequency" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) OldPayDate ¶
OldPayDate returns the old "pay_date" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) OldRecordDate ¶
OldRecordDate returns the old "record_date" field's value of the Dividend entity. If the Dividend 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 (*DividendMutation) PayDate ¶
func (m *DividendMutation) PayDate() (r time.Time, exists bool)
PayDate returns the value of the "pay_date" field in the mutation.
func (*DividendMutation) RecordDate ¶
func (m *DividendMutation) RecordDate() (r time.Time, exists bool)
RecordDate returns the value of the "record_date" field in the mutation.
func (*DividendMutation) RemoveStockIDs ¶
func (m *DividendMutation) RemoveStockIDs(ids ...int)
RemoveStockIDs removes the "stock" edge to the Entity entity by IDs.
func (*DividendMutation) RemovedEdges ¶
func (m *DividendMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DividendMutation) RemovedIDs ¶
func (m *DividendMutation) 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 (*DividendMutation) RemovedStockIDs ¶
func (m *DividendMutation) RemovedStockIDs() (ids []int)
RemovedStock returns the removed IDs of the "stock" edge to the Entity entity.
func (*DividendMutation) ResetCashAmount ¶
func (m *DividendMutation) ResetCashAmount()
ResetCashAmount resets all changes to the "cash_amount" field.
func (*DividendMutation) ResetDeclarationDate ¶
func (m *DividendMutation) ResetDeclarationDate()
ResetDeclarationDate resets all changes to the "declaration_date" field.
func (*DividendMutation) ResetDividendType ¶
func (m *DividendMutation) ResetDividendType()
ResetDividendType resets all changes to the "dividend_type" field.
func (*DividendMutation) ResetEdge ¶
func (m *DividendMutation) 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 (*DividendMutation) ResetExDividendDate ¶
func (m *DividendMutation) ResetExDividendDate()
ResetExDividendDate resets all changes to the "ex_dividend_date" field.
func (*DividendMutation) ResetField ¶
func (m *DividendMutation) 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 (*DividendMutation) ResetFrequency ¶
func (m *DividendMutation) ResetFrequency()
ResetFrequency resets all changes to the "frequency" field.
func (*DividendMutation) ResetPayDate ¶
func (m *DividendMutation) ResetPayDate()
ResetPayDate resets all changes to the "pay_date" field.
func (*DividendMutation) ResetRecordDate ¶
func (m *DividendMutation) ResetRecordDate()
ResetRecordDate resets all changes to the "record_date" field.
func (*DividendMutation) ResetStock ¶
func (m *DividendMutation) ResetStock()
ResetStock resets all changes to the "stock" edge.
func (*DividendMutation) SetCashAmount ¶
func (m *DividendMutation) SetCashAmount(f float64)
SetCashAmount sets the "cash_amount" field.
func (*DividendMutation) SetDeclarationDate ¶
func (m *DividendMutation) SetDeclarationDate(t time.Time)
SetDeclarationDate sets the "declaration_date" field.
func (*DividendMutation) SetDividendType ¶
func (m *DividendMutation) SetDividendType(dt dividend.DividendType)
SetDividendType sets the "dividend_type" field.
func (*DividendMutation) SetExDividendDate ¶
func (m *DividendMutation) SetExDividendDate(t time.Time)
SetExDividendDate sets the "ex_dividend_date" field.
func (*DividendMutation) SetField ¶
func (m *DividendMutation) 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 (*DividendMutation) SetFrequency ¶
func (m *DividendMutation) SetFrequency(i int)
SetFrequency sets the "frequency" field.
func (*DividendMutation) SetOp ¶
func (m *DividendMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DividendMutation) SetPayDate ¶
func (m *DividendMutation) SetPayDate(t time.Time)
SetPayDate sets the "pay_date" field.
func (*DividendMutation) SetRecordDate ¶
func (m *DividendMutation) SetRecordDate(t time.Time)
SetRecordDate sets the "record_date" field.
func (*DividendMutation) StockCleared ¶
func (m *DividendMutation) StockCleared() bool
StockCleared reports if the "stock" edge to the Entity entity was cleared.
func (*DividendMutation) StockIDs ¶
func (m *DividendMutation) StockIDs() (ids []int)
StockIDs returns the "stock" edge IDs in the mutation.
func (DividendMutation) Tx ¶
func (m DividendMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DividendMutation) Type ¶
func (m *DividendMutation) Type() string
Type returns the node type of this mutation (Dividend).
func (*DividendMutation) Where ¶
func (m *DividendMutation) Where(ps ...predicate.Dividend)
Where appends a list predicates to the DividendMutation builder.
func (*DividendMutation) WhereP ¶
func (m *DividendMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DividendMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DividendQuery ¶
type DividendQuery struct {
// contains filtered or unexported fields
}
DividendQuery is the builder for querying Dividend entities.
func (*DividendQuery) Aggregate ¶
func (dq *DividendQuery) Aggregate(fns ...AggregateFunc) *DividendSelect
Aggregate returns a DividendSelect configured with the given aggregations.
func (*DividendQuery) All ¶
func (dq *DividendQuery) All(ctx context.Context) ([]*Dividend, error)
All executes the query and returns a list of Dividends.
func (*DividendQuery) AllX ¶
func (dq *DividendQuery) AllX(ctx context.Context) []*Dividend
AllX is like All, but panics if an error occurs.
func (*DividendQuery) Clone ¶
func (dq *DividendQuery) Clone() *DividendQuery
Clone returns a duplicate of the DividendQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DividendQuery) Count ¶
func (dq *DividendQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DividendQuery) CountX ¶
func (dq *DividendQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DividendQuery) Exist ¶
func (dq *DividendQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DividendQuery) ExistX ¶
func (dq *DividendQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DividendQuery) First ¶
func (dq *DividendQuery) First(ctx context.Context) (*Dividend, error)
First returns the first Dividend entity from the query. Returns a *NotFoundError when no Dividend was found.
func (*DividendQuery) FirstID ¶
func (dq *DividendQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Dividend ID from the query. Returns a *NotFoundError when no Dividend ID was found.
func (*DividendQuery) FirstIDX ¶
func (dq *DividendQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DividendQuery) FirstX ¶
func (dq *DividendQuery) FirstX(ctx context.Context) *Dividend
FirstX is like First, but panics if an error occurs.
func (*DividendQuery) GroupBy ¶
func (dq *DividendQuery) GroupBy(field string, fields ...string) *DividendGroupBy
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 { CashAmount float64 `json:"cash_amount,omitempty"` Count int `json:"count,omitempty"` } client.Dividend.Query(). GroupBy(dividend.FieldCashAmount). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DividendQuery) IDs ¶
func (dq *DividendQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Dividend IDs.
func (*DividendQuery) IDsX ¶
func (dq *DividendQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DividendQuery) Limit ¶
func (dq *DividendQuery) Limit(limit int) *DividendQuery
Limit the number of records to be returned by this query.
func (*DividendQuery) Offset ¶
func (dq *DividendQuery) Offset(offset int) *DividendQuery
Offset to start from.
func (*DividendQuery) Only ¶
func (dq *DividendQuery) Only(ctx context.Context) (*Dividend, error)
Only returns a single Dividend entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dividend entity is found. Returns a *NotFoundError when no Dividend entities are found.
func (*DividendQuery) OnlyID ¶
func (dq *DividendQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Dividend ID in the query. Returns a *NotSingularError when more than one Dividend ID is found. Returns a *NotFoundError when no entities are found.
func (*DividendQuery) OnlyIDX ¶
func (dq *DividendQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DividendQuery) OnlyX ¶
func (dq *DividendQuery) OnlyX(ctx context.Context) *Dividend
OnlyX is like Only, but panics if an error occurs.
func (*DividendQuery) Order ¶
func (dq *DividendQuery) Order(o ...OrderFunc) *DividendQuery
Order specifies how the records should be ordered.
func (*DividendQuery) QueryStock ¶
func (dq *DividendQuery) QueryStock() *EntityQuery
QueryStock chains the current query on the "stock" edge.
func (*DividendQuery) Select ¶
func (dq *DividendQuery) Select(fields ...string) *DividendSelect
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 { CashAmount float64 `json:"cash_amount,omitempty"` } client.Dividend.Query(). Select(dividend.FieldCashAmount). Scan(ctx, &v)
func (*DividendQuery) Unique ¶
func (dq *DividendQuery) Unique(unique bool) *DividendQuery
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 (*DividendQuery) Where ¶
func (dq *DividendQuery) Where(ps ...predicate.Dividend) *DividendQuery
Where adds a new predicate for the DividendQuery builder.
func (*DividendQuery) WithStock ¶
func (dq *DividendQuery) WithStock(opts ...func(*EntityQuery)) *DividendQuery
WithStock tells the query-builder to eager-load the nodes that are connected to the "stock" edge. The optional arguments are used to configure the query builder of the edge.
type DividendSelect ¶
type DividendSelect struct { *DividendQuery // contains filtered or unexported fields }
DividendSelect is the builder for selecting fields of Dividend entities.
func (*DividendSelect) Aggregate ¶
func (ds *DividendSelect) Aggregate(fns ...AggregateFunc) *DividendSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DividendSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DividendSelect) Scan ¶
func (ds *DividendSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DividendSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DividendUpdate ¶
type DividendUpdate struct {
// contains filtered or unexported fields
}
DividendUpdate is the builder for updating Dividend entities.
func (*DividendUpdate) AddCashAmount ¶
func (du *DividendUpdate) AddCashAmount(f float64) *DividendUpdate
AddCashAmount adds f to the "cash_amount" field.
func (*DividendUpdate) AddFrequency ¶
func (du *DividendUpdate) AddFrequency(i int) *DividendUpdate
AddFrequency adds i to the "frequency" field.
func (*DividendUpdate) AddStock ¶
func (du *DividendUpdate) AddStock(e ...*Entity) *DividendUpdate
AddStock adds the "stock" edges to the Entity entity.
func (*DividendUpdate) AddStockIDs ¶
func (du *DividendUpdate) AddStockIDs(ids ...int) *DividendUpdate
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*DividendUpdate) ClearStock ¶
func (du *DividendUpdate) ClearStock() *DividendUpdate
ClearStock clears all "stock" edges to the Entity entity.
func (*DividendUpdate) Exec ¶
func (du *DividendUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DividendUpdate) ExecX ¶
func (du *DividendUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DividendUpdate) Mutation ¶
func (du *DividendUpdate) Mutation() *DividendMutation
Mutation returns the DividendMutation object of the builder.
func (*DividendUpdate) RemoveStock ¶
func (du *DividendUpdate) RemoveStock(e ...*Entity) *DividendUpdate
RemoveStock removes "stock" edges to Entity entities.
func (*DividendUpdate) RemoveStockIDs ¶
func (du *DividendUpdate) RemoveStockIDs(ids ...int) *DividendUpdate
RemoveStockIDs removes the "stock" edge to Entity entities by IDs.
func (*DividendUpdate) Save ¶
func (du *DividendUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DividendUpdate) SaveX ¶
func (du *DividendUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DividendUpdate) SetCashAmount ¶
func (du *DividendUpdate) SetCashAmount(f float64) *DividendUpdate
SetCashAmount sets the "cash_amount" field.
func (*DividendUpdate) SetDeclarationDate ¶
func (du *DividendUpdate) SetDeclarationDate(t time.Time) *DividendUpdate
SetDeclarationDate sets the "declaration_date" field.
func (*DividendUpdate) SetDividendType ¶
func (du *DividendUpdate) SetDividendType(dt dividend.DividendType) *DividendUpdate
SetDividendType sets the "dividend_type" field.
func (*DividendUpdate) SetExDividendDate ¶
func (du *DividendUpdate) SetExDividendDate(t time.Time) *DividendUpdate
SetExDividendDate sets the "ex_dividend_date" field.
func (*DividendUpdate) SetFrequency ¶
func (du *DividendUpdate) SetFrequency(i int) *DividendUpdate
SetFrequency sets the "frequency" field.
func (*DividendUpdate) SetPayDate ¶
func (du *DividendUpdate) SetPayDate(t time.Time) *DividendUpdate
SetPayDate sets the "pay_date" field.
func (*DividendUpdate) SetRecordDate ¶
func (du *DividendUpdate) SetRecordDate(t time.Time) *DividendUpdate
SetRecordDate sets the "record_date" field.
func (*DividendUpdate) Where ¶
func (du *DividendUpdate) Where(ps ...predicate.Dividend) *DividendUpdate
Where appends a list predicates to the DividendUpdate builder.
type DividendUpdateOne ¶
type DividendUpdateOne struct {
// contains filtered or unexported fields
}
DividendUpdateOne is the builder for updating a single Dividend entity.
func (*DividendUpdateOne) AddCashAmount ¶
func (duo *DividendUpdateOne) AddCashAmount(f float64) *DividendUpdateOne
AddCashAmount adds f to the "cash_amount" field.
func (*DividendUpdateOne) AddFrequency ¶
func (duo *DividendUpdateOne) AddFrequency(i int) *DividendUpdateOne
AddFrequency adds i to the "frequency" field.
func (*DividendUpdateOne) AddStock ¶
func (duo *DividendUpdateOne) AddStock(e ...*Entity) *DividendUpdateOne
AddStock adds the "stock" edges to the Entity entity.
func (*DividendUpdateOne) AddStockIDs ¶
func (duo *DividendUpdateOne) AddStockIDs(ids ...int) *DividendUpdateOne
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*DividendUpdateOne) ClearStock ¶
func (duo *DividendUpdateOne) ClearStock() *DividendUpdateOne
ClearStock clears all "stock" edges to the Entity entity.
func (*DividendUpdateOne) Exec ¶
func (duo *DividendUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DividendUpdateOne) ExecX ¶
func (duo *DividendUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DividendUpdateOne) Mutation ¶
func (duo *DividendUpdateOne) Mutation() *DividendMutation
Mutation returns the DividendMutation object of the builder.
func (*DividendUpdateOne) RemoveStock ¶
func (duo *DividendUpdateOne) RemoveStock(e ...*Entity) *DividendUpdateOne
RemoveStock removes "stock" edges to Entity entities.
func (*DividendUpdateOne) RemoveStockIDs ¶
func (duo *DividendUpdateOne) RemoveStockIDs(ids ...int) *DividendUpdateOne
RemoveStockIDs removes the "stock" edge to Entity entities by IDs.
func (*DividendUpdateOne) Save ¶
func (duo *DividendUpdateOne) Save(ctx context.Context) (*Dividend, error)
Save executes the query and returns the updated Dividend entity.
func (*DividendUpdateOne) SaveX ¶
func (duo *DividendUpdateOne) SaveX(ctx context.Context) *Dividend
SaveX is like Save, but panics if an error occurs.
func (*DividendUpdateOne) Select ¶
func (duo *DividendUpdateOne) Select(field string, fields ...string) *DividendUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DividendUpdateOne) SetCashAmount ¶
func (duo *DividendUpdateOne) SetCashAmount(f float64) *DividendUpdateOne
SetCashAmount sets the "cash_amount" field.
func (*DividendUpdateOne) SetDeclarationDate ¶
func (duo *DividendUpdateOne) SetDeclarationDate(t time.Time) *DividendUpdateOne
SetDeclarationDate sets the "declaration_date" field.
func (*DividendUpdateOne) SetDividendType ¶
func (duo *DividendUpdateOne) SetDividendType(dt dividend.DividendType) *DividendUpdateOne
SetDividendType sets the "dividend_type" field.
func (*DividendUpdateOne) SetExDividendDate ¶
func (duo *DividendUpdateOne) SetExDividendDate(t time.Time) *DividendUpdateOne
SetExDividendDate sets the "ex_dividend_date" field.
func (*DividendUpdateOne) SetFrequency ¶
func (duo *DividendUpdateOne) SetFrequency(i int) *DividendUpdateOne
SetFrequency sets the "frequency" field.
func (*DividendUpdateOne) SetPayDate ¶
func (duo *DividendUpdateOne) SetPayDate(t time.Time) *DividendUpdateOne
SetPayDate sets the "pay_date" field.
func (*DividendUpdateOne) SetRecordDate ¶
func (duo *DividendUpdateOne) SetRecordDate(t time.Time) *DividendUpdateOne
SetRecordDate sets the "record_date" field.
type Entity ¶
type Entity struct { // ID of the ent. ID int `json:"id,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // Ticker holds the value of the "ticker" field. Ticker string `json:"ticker,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // ListDate holds the value of the "list_date" field. ListDate time.Time `json:"list_date,omitempty"` // Delisted holds the value of the "delisted" field. Delisted *time.Time `json:"delisted,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EntityQuery when eager-loading is set. Edges EntityEdges `json:"edges"` // contains filtered or unexported fields }
Entity is the model entity for the Entity schema.
func (*Entity) QueryDividends ¶
func (e *Entity) QueryDividends() *DividendQuery
QueryDividends queries the "dividends" edge of the Entity entity.
func (*Entity) QueryExchanges ¶
func (e *Entity) QueryExchanges() *ExchangeQuery
QueryExchanges queries the "exchanges" edge of the Entity entity.
func (*Entity) QueryFinancials ¶
func (e *Entity) QueryFinancials() *FinancialQuery
QueryFinancials queries the "financials" edge of the Entity entity.
func (*Entity) QueryIntervals ¶
func (e *Entity) QueryIntervals() *IntervalQuery
QueryIntervals queries the "intervals" edge of the Entity entity.
func (*Entity) QuerySplits ¶
func (e *Entity) QuerySplits() *SplitQuery
QuerySplits queries the "splits" edge of the Entity entity.
func (*Entity) Unwrap ¶
Unwrap unwraps the Entity 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 (*Entity) Update ¶
func (e *Entity) Update() *EntityUpdateOne
Update returns a builder for updating this Entity. Note that you need to call Entity.Unwrap() before calling this method if this Entity was returned from a transaction, and the transaction was committed or rolled back.
type EntityClient ¶
type EntityClient struct {
// contains filtered or unexported fields
}
EntityClient is a client for the Entity schema.
func NewEntityClient ¶
func NewEntityClient(c config) *EntityClient
NewEntityClient returns a client for the Entity from the given config.
func (*EntityClient) Create ¶
func (c *EntityClient) Create() *EntityCreate
Create returns a builder for creating a Entity entity.
func (*EntityClient) CreateBulk ¶
func (c *EntityClient) CreateBulk(builders ...*EntityCreate) *EntityCreateBulk
CreateBulk returns a builder for creating a bulk of Entity entities.
func (*EntityClient) Delete ¶
func (c *EntityClient) Delete() *EntityDelete
Delete returns a delete builder for Entity.
func (*EntityClient) DeleteOne ¶
func (c *EntityClient) DeleteOne(e *Entity) *EntityDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EntityClient) DeleteOneID ¶
func (c *EntityClient) DeleteOneID(id int) *EntityDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EntityClient) GetX ¶
func (c *EntityClient) GetX(ctx context.Context, id int) *Entity
GetX is like Get, but panics if an error occurs.
func (*EntityClient) Intercept ¶
func (c *EntityClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entity.Intercept(f(g(h())))`.
func (*EntityClient) Interceptors ¶
func (c *EntityClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EntityClient) Query ¶
func (c *EntityClient) Query() *EntityQuery
Query returns a query builder for Entity.
func (*EntityClient) QueryDividends ¶
func (c *EntityClient) QueryDividends(e *Entity) *DividendQuery
QueryDividends queries the dividends edge of a Entity.
func (*EntityClient) QueryExchanges ¶
func (c *EntityClient) QueryExchanges(e *Entity) *ExchangeQuery
QueryExchanges queries the exchanges edge of a Entity.
func (*EntityClient) QueryFinancials ¶
func (c *EntityClient) QueryFinancials(e *Entity) *FinancialQuery
QueryFinancials queries the financials edge of a Entity.
func (*EntityClient) QueryIntervals ¶
func (c *EntityClient) QueryIntervals(e *Entity) *IntervalQuery
QueryIntervals queries the intervals edge of a Entity.
func (*EntityClient) QuerySplits ¶
func (c *EntityClient) QuerySplits(e *Entity) *SplitQuery
QuerySplits queries the splits edge of a Entity.
func (*EntityClient) Update ¶
func (c *EntityClient) Update() *EntityUpdate
Update returns an update builder for Entity.
func (*EntityClient) UpdateOne ¶
func (c *EntityClient) UpdateOne(e *Entity) *EntityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EntityClient) UpdateOneID ¶
func (c *EntityClient) UpdateOneID(id int) *EntityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EntityClient) Use ¶
func (c *EntityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entity.Hooks(f(g(h())))`.
type EntityCreate ¶
type EntityCreate struct {
// contains filtered or unexported fields
}
EntityCreate is the builder for creating a Entity entity.
func (*EntityCreate) AddDividendIDs ¶
func (ec *EntityCreate) AddDividendIDs(ids ...int) *EntityCreate
AddDividendIDs adds the "dividends" edge to the Dividend entity by IDs.
func (*EntityCreate) AddDividends ¶
func (ec *EntityCreate) AddDividends(d ...*Dividend) *EntityCreate
AddDividends adds the "dividends" edges to the Dividend entity.
func (*EntityCreate) AddExchangeIDs ¶
func (ec *EntityCreate) AddExchangeIDs(ids ...int) *EntityCreate
AddExchangeIDs adds the "exchanges" edge to the Exchange entity by IDs.
func (*EntityCreate) AddExchanges ¶
func (ec *EntityCreate) AddExchanges(e ...*Exchange) *EntityCreate
AddExchanges adds the "exchanges" edges to the Exchange entity.
func (*EntityCreate) AddFinancialIDs ¶
func (ec *EntityCreate) AddFinancialIDs(ids ...int) *EntityCreate
AddFinancialIDs adds the "financials" edge to the Financial entity by IDs.
func (*EntityCreate) AddFinancials ¶
func (ec *EntityCreate) AddFinancials(f ...*Financial) *EntityCreate
AddFinancials adds the "financials" edges to the Financial entity.
func (*EntityCreate) AddIntervalIDs ¶
func (ec *EntityCreate) AddIntervalIDs(ids ...int) *EntityCreate
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*EntityCreate) AddIntervals ¶
func (ec *EntityCreate) AddIntervals(i ...*Interval) *EntityCreate
AddIntervals adds the "intervals" edges to the Interval entity.
func (*EntityCreate) AddSplitIDs ¶
func (ec *EntityCreate) AddSplitIDs(ids ...int) *EntityCreate
AddSplitIDs adds the "splits" edge to the Split entity by IDs.
func (*EntityCreate) AddSplits ¶
func (ec *EntityCreate) AddSplits(s ...*Split) *EntityCreate
AddSplits adds the "splits" edges to the Split entity.
func (*EntityCreate) Exec ¶
func (ec *EntityCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityCreate) ExecX ¶
func (ec *EntityCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityCreate) Mutation ¶
func (ec *EntityCreate) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityCreate) Save ¶
func (ec *EntityCreate) Save(ctx context.Context) (*Entity, error)
Save creates the Entity in the database.
func (*EntityCreate) SaveX ¶
func (ec *EntityCreate) SaveX(ctx context.Context) *Entity
SaveX calls Save and panics if Save returns an error.
func (*EntityCreate) SetActive ¶
func (ec *EntityCreate) SetActive(b bool) *EntityCreate
SetActive sets the "active" field.
func (*EntityCreate) SetDelisted ¶
func (ec *EntityCreate) SetDelisted(t time.Time) *EntityCreate
SetDelisted sets the "delisted" field.
func (*EntityCreate) SetDescription ¶
func (ec *EntityCreate) SetDescription(s string) *EntityCreate
SetDescription sets the "description" field.
func (*EntityCreate) SetListDate ¶
func (ec *EntityCreate) SetListDate(t time.Time) *EntityCreate
SetListDate sets the "list_date" field.
func (*EntityCreate) SetName ¶
func (ec *EntityCreate) SetName(s string) *EntityCreate
SetName sets the "name" field.
func (*EntityCreate) SetNillableDelisted ¶
func (ec *EntityCreate) SetNillableDelisted(t *time.Time) *EntityCreate
SetNillableDelisted sets the "delisted" field if the given value is not nil.
func (*EntityCreate) SetTicker ¶
func (ec *EntityCreate) SetTicker(s string) *EntityCreate
SetTicker sets the "ticker" field.
type EntityCreateBulk ¶
type EntityCreateBulk struct {
// contains filtered or unexported fields
}
EntityCreateBulk is the builder for creating many Entity entities in bulk.
func (*EntityCreateBulk) Exec ¶
func (ecb *EntityCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityCreateBulk) ExecX ¶
func (ecb *EntityCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EntityDelete ¶
type EntityDelete struct {
// contains filtered or unexported fields
}
EntityDelete is the builder for deleting a Entity entity.
func (*EntityDelete) Exec ¶
func (ed *EntityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EntityDelete) ExecX ¶
func (ed *EntityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EntityDelete) Where ¶
func (ed *EntityDelete) Where(ps ...predicate.Entity) *EntityDelete
Where appends a list predicates to the EntityDelete builder.
type EntityDeleteOne ¶
type EntityDeleteOne struct {
// contains filtered or unexported fields
}
EntityDeleteOne is the builder for deleting a single Entity entity.
func (*EntityDeleteOne) Exec ¶
func (edo *EntityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EntityDeleteOne) ExecX ¶
func (edo *EntityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EntityEdges ¶
type EntityEdges struct { // Exchanges holds the value of the exchanges edge. Exchanges []*Exchange `json:"exchanges,omitempty"` // Intervals holds the value of the intervals edge. Intervals []*Interval `json:"intervals,omitempty"` // Dividends holds the value of the dividends edge. Dividends []*Dividend `json:"dividends,omitempty"` // Splits holds the value of the splits edge. Splits []*Split `json:"splits,omitempty"` // Financials holds the value of the financials edge. Financials []*Financial `json:"financials,omitempty"` // contains filtered or unexported fields }
EntityEdges holds the relations/edges for other nodes in the graph.
func (EntityEdges) DividendsOrErr ¶
func (e EntityEdges) DividendsOrErr() ([]*Dividend, error)
DividendsOrErr returns the Dividends value or an error if the edge was not loaded in eager-loading.
func (EntityEdges) ExchangesOrErr ¶
func (e EntityEdges) ExchangesOrErr() ([]*Exchange, error)
ExchangesOrErr returns the Exchanges value or an error if the edge was not loaded in eager-loading.
func (EntityEdges) FinancialsOrErr ¶
func (e EntityEdges) FinancialsOrErr() ([]*Financial, error)
FinancialsOrErr returns the Financials value or an error if the edge was not loaded in eager-loading.
func (EntityEdges) IntervalsOrErr ¶
func (e EntityEdges) IntervalsOrErr() ([]*Interval, error)
IntervalsOrErr returns the Intervals value or an error if the edge was not loaded in eager-loading.
func (EntityEdges) SplitsOrErr ¶
func (e EntityEdges) SplitsOrErr() ([]*Split, error)
SplitsOrErr returns the Splits value or an error if the edge was not loaded in eager-loading.
type EntityGroupBy ¶
type EntityGroupBy struct {
// contains filtered or unexported fields
}
EntityGroupBy is the group-by builder for Entity entities.
func (*EntityGroupBy) Aggregate ¶
func (egb *EntityGroupBy) Aggregate(fns ...AggregateFunc) *EntityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EntityGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntityGroupBy) Scan ¶
func (egb *EntityGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntityGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntityMutation ¶
type EntityMutation struct {
// contains filtered or unexported fields
}
EntityMutation represents an operation that mutates the Entity nodes in the graph.
func (*EntityMutation) Active ¶
func (m *EntityMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*EntityMutation) AddDividendIDs ¶
func (m *EntityMutation) AddDividendIDs(ids ...int)
AddDividendIDs adds the "dividends" edge to the Dividend entity by ids.
func (*EntityMutation) AddExchangeIDs ¶
func (m *EntityMutation) AddExchangeIDs(ids ...int)
AddExchangeIDs adds the "exchanges" edge to the Exchange entity by ids.
func (*EntityMutation) AddField ¶
func (m *EntityMutation) 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 (*EntityMutation) AddFinancialIDs ¶
func (m *EntityMutation) AddFinancialIDs(ids ...int)
AddFinancialIDs adds the "financials" edge to the Financial entity by ids.
func (*EntityMutation) AddIntervalIDs ¶
func (m *EntityMutation) AddIntervalIDs(ids ...int)
AddIntervalIDs adds the "intervals" edge to the Interval entity by ids.
func (*EntityMutation) AddSplitIDs ¶
func (m *EntityMutation) AddSplitIDs(ids ...int)
AddSplitIDs adds the "splits" edge to the Split entity by ids.
func (*EntityMutation) AddedEdges ¶
func (m *EntityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EntityMutation) AddedField ¶
func (m *EntityMutation) 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 (*EntityMutation) AddedFields ¶
func (m *EntityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EntityMutation) AddedIDs ¶
func (m *EntityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EntityMutation) ClearDelisted ¶
func (m *EntityMutation) ClearDelisted()
ClearDelisted clears the value of the "delisted" field.
func (*EntityMutation) ClearDividends ¶
func (m *EntityMutation) ClearDividends()
ClearDividends clears the "dividends" edge to the Dividend entity.
func (*EntityMutation) ClearEdge ¶
func (m *EntityMutation) 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 (*EntityMutation) ClearExchanges ¶
func (m *EntityMutation) ClearExchanges()
ClearExchanges clears the "exchanges" edge to the Exchange entity.
func (*EntityMutation) ClearField ¶
func (m *EntityMutation) 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 (*EntityMutation) ClearFinancials ¶
func (m *EntityMutation) ClearFinancials()
ClearFinancials clears the "financials" edge to the Financial entity.
func (*EntityMutation) ClearIntervals ¶
func (m *EntityMutation) ClearIntervals()
ClearIntervals clears the "intervals" edge to the Interval entity.
func (*EntityMutation) ClearSplits ¶
func (m *EntityMutation) ClearSplits()
ClearSplits clears the "splits" edge to the Split entity.
func (*EntityMutation) ClearedEdges ¶
func (m *EntityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EntityMutation) ClearedFields ¶
func (m *EntityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EntityMutation) Client ¶
func (m EntityMutation) 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 (*EntityMutation) Delisted ¶
func (m *EntityMutation) Delisted() (r time.Time, exists bool)
Delisted returns the value of the "delisted" field in the mutation.
func (*EntityMutation) DelistedCleared ¶
func (m *EntityMutation) DelistedCleared() bool
DelistedCleared returns if the "delisted" field was cleared in this mutation.
func (*EntityMutation) Description ¶
func (m *EntityMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*EntityMutation) DividendsCleared ¶
func (m *EntityMutation) DividendsCleared() bool
DividendsCleared reports if the "dividends" edge to the Dividend entity was cleared.
func (*EntityMutation) DividendsIDs ¶
func (m *EntityMutation) DividendsIDs() (ids []int)
DividendsIDs returns the "dividends" edge IDs in the mutation.
func (*EntityMutation) EdgeCleared ¶
func (m *EntityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EntityMutation) ExchangesCleared ¶
func (m *EntityMutation) ExchangesCleared() bool
ExchangesCleared reports if the "exchanges" edge to the Exchange entity was cleared.
func (*EntityMutation) ExchangesIDs ¶
func (m *EntityMutation) ExchangesIDs() (ids []int)
ExchangesIDs returns the "exchanges" edge IDs in the mutation.
func (*EntityMutation) Field ¶
func (m *EntityMutation) 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 (*EntityMutation) FieldCleared ¶
func (m *EntityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EntityMutation) Fields ¶
func (m *EntityMutation) 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 (*EntityMutation) FinancialsCleared ¶
func (m *EntityMutation) FinancialsCleared() bool
FinancialsCleared reports if the "financials" edge to the Financial entity was cleared.
func (*EntityMutation) FinancialsIDs ¶
func (m *EntityMutation) FinancialsIDs() (ids []int)
FinancialsIDs returns the "financials" edge IDs in the mutation.
func (*EntityMutation) ID ¶
func (m *EntityMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EntityMutation) IDs ¶
func (m *EntityMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EntityMutation) IntervalsCleared ¶
func (m *EntityMutation) IntervalsCleared() bool
IntervalsCleared reports if the "intervals" edge to the Interval entity was cleared.
func (*EntityMutation) IntervalsIDs ¶
func (m *EntityMutation) IntervalsIDs() (ids []int)
IntervalsIDs returns the "intervals" edge IDs in the mutation.
func (*EntityMutation) ListDate ¶
func (m *EntityMutation) ListDate() (r time.Time, exists bool)
ListDate returns the value of the "list_date" field in the mutation.
func (*EntityMutation) Name ¶
func (m *EntityMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*EntityMutation) OldActive ¶
func (m *EntityMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldDelisted ¶
OldDelisted returns the old "delisted" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldDescription ¶
func (m *EntityMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Entity entity. If the Entity 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 (*EntityMutation) 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 (*EntityMutation) OldListDate ¶
OldListDate returns the old "list_date" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldName ¶
func (m *EntityMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Entity entity. If the Entity 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 (*EntityMutation) OldTicker ¶
func (m *EntityMutation) OldTicker(ctx context.Context) (v string, err error)
OldTicker returns the old "ticker" field's value of the Entity entity. If the Entity 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 (*EntityMutation) RemoveDividendIDs ¶
func (m *EntityMutation) RemoveDividendIDs(ids ...int)
RemoveDividendIDs removes the "dividends" edge to the Dividend entity by IDs.
func (*EntityMutation) RemoveExchangeIDs ¶
func (m *EntityMutation) RemoveExchangeIDs(ids ...int)
RemoveExchangeIDs removes the "exchanges" edge to the Exchange entity by IDs.
func (*EntityMutation) RemoveFinancialIDs ¶
func (m *EntityMutation) RemoveFinancialIDs(ids ...int)
RemoveFinancialIDs removes the "financials" edge to the Financial entity by IDs.
func (*EntityMutation) RemoveIntervalIDs ¶
func (m *EntityMutation) RemoveIntervalIDs(ids ...int)
RemoveIntervalIDs removes the "intervals" edge to the Interval entity by IDs.
func (*EntityMutation) RemoveSplitIDs ¶
func (m *EntityMutation) RemoveSplitIDs(ids ...int)
RemoveSplitIDs removes the "splits" edge to the Split entity by IDs.
func (*EntityMutation) RemovedDividendsIDs ¶
func (m *EntityMutation) RemovedDividendsIDs() (ids []int)
RemovedDividends returns the removed IDs of the "dividends" edge to the Dividend entity.
func (*EntityMutation) RemovedEdges ¶
func (m *EntityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EntityMutation) RemovedExchangesIDs ¶
func (m *EntityMutation) RemovedExchangesIDs() (ids []int)
RemovedExchanges returns the removed IDs of the "exchanges" edge to the Exchange entity.
func (*EntityMutation) RemovedFinancialsIDs ¶
func (m *EntityMutation) RemovedFinancialsIDs() (ids []int)
RemovedFinancials returns the removed IDs of the "financials" edge to the Financial entity.
func (*EntityMutation) RemovedIDs ¶
func (m *EntityMutation) 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 (*EntityMutation) RemovedIntervalsIDs ¶
func (m *EntityMutation) RemovedIntervalsIDs() (ids []int)
RemovedIntervals returns the removed IDs of the "intervals" edge to the Interval entity.
func (*EntityMutation) RemovedSplitsIDs ¶
func (m *EntityMutation) RemovedSplitsIDs() (ids []int)
RemovedSplits returns the removed IDs of the "splits" edge to the Split entity.
func (*EntityMutation) ResetActive ¶
func (m *EntityMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*EntityMutation) ResetDelisted ¶
func (m *EntityMutation) ResetDelisted()
ResetDelisted resets all changes to the "delisted" field.
func (*EntityMutation) ResetDescription ¶
func (m *EntityMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*EntityMutation) ResetDividends ¶
func (m *EntityMutation) ResetDividends()
ResetDividends resets all changes to the "dividends" edge.
func (*EntityMutation) ResetEdge ¶
func (m *EntityMutation) 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 (*EntityMutation) ResetExchanges ¶
func (m *EntityMutation) ResetExchanges()
ResetExchanges resets all changes to the "exchanges" edge.
func (*EntityMutation) ResetField ¶
func (m *EntityMutation) 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 (*EntityMutation) ResetFinancials ¶
func (m *EntityMutation) ResetFinancials()
ResetFinancials resets all changes to the "financials" edge.
func (*EntityMutation) ResetIntervals ¶
func (m *EntityMutation) ResetIntervals()
ResetIntervals resets all changes to the "intervals" edge.
func (*EntityMutation) ResetListDate ¶
func (m *EntityMutation) ResetListDate()
ResetListDate resets all changes to the "list_date" field.
func (*EntityMutation) ResetName ¶
func (m *EntityMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*EntityMutation) ResetSplits ¶
func (m *EntityMutation) ResetSplits()
ResetSplits resets all changes to the "splits" edge.
func (*EntityMutation) ResetTicker ¶
func (m *EntityMutation) ResetTicker()
ResetTicker resets all changes to the "ticker" field.
func (*EntityMutation) SetActive ¶
func (m *EntityMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*EntityMutation) SetDelisted ¶
func (m *EntityMutation) SetDelisted(t time.Time)
SetDelisted sets the "delisted" field.
func (*EntityMutation) SetDescription ¶
func (m *EntityMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*EntityMutation) SetField ¶
func (m *EntityMutation) 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 (*EntityMutation) SetListDate ¶
func (m *EntityMutation) SetListDate(t time.Time)
SetListDate sets the "list_date" field.
func (*EntityMutation) SetName ¶
func (m *EntityMutation) SetName(s string)
SetName sets the "name" field.
func (*EntityMutation) SetOp ¶
func (m *EntityMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EntityMutation) SetTicker ¶
func (m *EntityMutation) SetTicker(s string)
SetTicker sets the "ticker" field.
func (*EntityMutation) SplitsCleared ¶
func (m *EntityMutation) SplitsCleared() bool
SplitsCleared reports if the "splits" edge to the Split entity was cleared.
func (*EntityMutation) SplitsIDs ¶
func (m *EntityMutation) SplitsIDs() (ids []int)
SplitsIDs returns the "splits" edge IDs in the mutation.
func (*EntityMutation) Ticker ¶
func (m *EntityMutation) Ticker() (r string, exists bool)
Ticker returns the value of the "ticker" field in the mutation.
func (EntityMutation) Tx ¶
func (m EntityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EntityMutation) Type ¶
func (m *EntityMutation) Type() string
Type returns the node type of this mutation (Entity).
func (*EntityMutation) Where ¶
func (m *EntityMutation) Where(ps ...predicate.Entity)
Where appends a list predicates to the EntityMutation builder.
func (*EntityMutation) WhereP ¶
func (m *EntityMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EntityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EntityQuery ¶
type EntityQuery struct {
// contains filtered or unexported fields
}
EntityQuery is the builder for querying Entity entities.
func (*EntityQuery) Aggregate ¶
func (eq *EntityQuery) Aggregate(fns ...AggregateFunc) *EntitySelect
Aggregate returns a EntitySelect configured with the given aggregations.
func (*EntityQuery) All ¶
func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error)
All executes the query and returns a list of Entities.
func (*EntityQuery) AllX ¶
func (eq *EntityQuery) AllX(ctx context.Context) []*Entity
AllX is like All, but panics if an error occurs.
func (*EntityQuery) Clone ¶
func (eq *EntityQuery) Clone() *EntityQuery
Clone returns a duplicate of the EntityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EntityQuery) Count ¶
func (eq *EntityQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EntityQuery) CountX ¶
func (eq *EntityQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EntityQuery) Exist ¶
func (eq *EntityQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EntityQuery) ExistX ¶
func (eq *EntityQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EntityQuery) First ¶
func (eq *EntityQuery) First(ctx context.Context) (*Entity, error)
First returns the first Entity entity from the query. Returns a *NotFoundError when no Entity was found.
func (*EntityQuery) FirstID ¶
func (eq *EntityQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Entity ID from the query. Returns a *NotFoundError when no Entity ID was found.
func (*EntityQuery) FirstIDX ¶
func (eq *EntityQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EntityQuery) FirstX ¶
func (eq *EntityQuery) FirstX(ctx context.Context) *Entity
FirstX is like First, but panics if an error occurs.
func (*EntityQuery) GroupBy ¶
func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy
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 { Active bool `json:"active,omitempty"` Count int `json:"count,omitempty"` } client.Entity.Query(). GroupBy(entity.FieldActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EntityQuery) IDs ¶
func (eq *EntityQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Entity IDs.
func (*EntityQuery) IDsX ¶
func (eq *EntityQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EntityQuery) Limit ¶
func (eq *EntityQuery) Limit(limit int) *EntityQuery
Limit the number of records to be returned by this query.
func (*EntityQuery) Offset ¶
func (eq *EntityQuery) Offset(offset int) *EntityQuery
Offset to start from.
func (*EntityQuery) Only ¶
func (eq *EntityQuery) Only(ctx context.Context) (*Entity, error)
Only returns a single Entity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Entity entity is found. Returns a *NotFoundError when no Entity entities are found.
func (*EntityQuery) OnlyID ¶
func (eq *EntityQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Entity ID in the query. Returns a *NotSingularError when more than one Entity ID is found. Returns a *NotFoundError when no entities are found.
func (*EntityQuery) OnlyIDX ¶
func (eq *EntityQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EntityQuery) OnlyX ¶
func (eq *EntityQuery) OnlyX(ctx context.Context) *Entity
OnlyX is like Only, but panics if an error occurs.
func (*EntityQuery) Order ¶
func (eq *EntityQuery) Order(o ...OrderFunc) *EntityQuery
Order specifies how the records should be ordered.
func (*EntityQuery) QueryDividends ¶
func (eq *EntityQuery) QueryDividends() *DividendQuery
QueryDividends chains the current query on the "dividends" edge.
func (*EntityQuery) QueryExchanges ¶
func (eq *EntityQuery) QueryExchanges() *ExchangeQuery
QueryExchanges chains the current query on the "exchanges" edge.
func (*EntityQuery) QueryFinancials ¶
func (eq *EntityQuery) QueryFinancials() *FinancialQuery
QueryFinancials chains the current query on the "financials" edge.
func (*EntityQuery) QueryIntervals ¶
func (eq *EntityQuery) QueryIntervals() *IntervalQuery
QueryIntervals chains the current query on the "intervals" edge.
func (*EntityQuery) QuerySplits ¶
func (eq *EntityQuery) QuerySplits() *SplitQuery
QuerySplits chains the current query on the "splits" edge.
func (*EntityQuery) Select ¶
func (eq *EntityQuery) Select(fields ...string) *EntitySelect
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 { Active bool `json:"active,omitempty"` } client.Entity.Query(). Select(entity.FieldActive). Scan(ctx, &v)
func (*EntityQuery) Unique ¶
func (eq *EntityQuery) Unique(unique bool) *EntityQuery
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 (*EntityQuery) Where ¶
func (eq *EntityQuery) Where(ps ...predicate.Entity) *EntityQuery
Where adds a new predicate for the EntityQuery builder.
func (*EntityQuery) WithDividends ¶
func (eq *EntityQuery) WithDividends(opts ...func(*DividendQuery)) *EntityQuery
WithDividends tells the query-builder to eager-load the nodes that are connected to the "dividends" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithExchanges ¶
func (eq *EntityQuery) WithExchanges(opts ...func(*ExchangeQuery)) *EntityQuery
WithExchanges tells the query-builder to eager-load the nodes that are connected to the "exchanges" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithFinancials ¶
func (eq *EntityQuery) WithFinancials(opts ...func(*FinancialQuery)) *EntityQuery
WithFinancials tells the query-builder to eager-load the nodes that are connected to the "financials" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithIntervals ¶
func (eq *EntityQuery) WithIntervals(opts ...func(*IntervalQuery)) *EntityQuery
WithIntervals tells the query-builder to eager-load the nodes that are connected to the "intervals" edge. The optional arguments are used to configure the query builder of the edge.
func (*EntityQuery) WithSplits ¶
func (eq *EntityQuery) WithSplits(opts ...func(*SplitQuery)) *EntityQuery
WithSplits tells the query-builder to eager-load the nodes that are connected to the "splits" edge. The optional arguments are used to configure the query builder of the edge.
type EntitySelect ¶
type EntitySelect struct { *EntityQuery // contains filtered or unexported fields }
EntitySelect is the builder for selecting fields of Entity entities.
func (*EntitySelect) Aggregate ¶
func (es *EntitySelect) Aggregate(fns ...AggregateFunc) *EntitySelect
Aggregate adds the given aggregation functions to the selector query.
func (*EntitySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntitySelect) Scan ¶
func (es *EntitySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntitySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntityUpdate ¶
type EntityUpdate struct {
// contains filtered or unexported fields
}
EntityUpdate is the builder for updating Entity entities.
func (*EntityUpdate) AddDividendIDs ¶
func (eu *EntityUpdate) AddDividendIDs(ids ...int) *EntityUpdate
AddDividendIDs adds the "dividends" edge to the Dividend entity by IDs.
func (*EntityUpdate) AddDividends ¶
func (eu *EntityUpdate) AddDividends(d ...*Dividend) *EntityUpdate
AddDividends adds the "dividends" edges to the Dividend entity.
func (*EntityUpdate) AddExchangeIDs ¶
func (eu *EntityUpdate) AddExchangeIDs(ids ...int) *EntityUpdate
AddExchangeIDs adds the "exchanges" edge to the Exchange entity by IDs.
func (*EntityUpdate) AddExchanges ¶
func (eu *EntityUpdate) AddExchanges(e ...*Exchange) *EntityUpdate
AddExchanges adds the "exchanges" edges to the Exchange entity.
func (*EntityUpdate) AddFinancialIDs ¶
func (eu *EntityUpdate) AddFinancialIDs(ids ...int) *EntityUpdate
AddFinancialIDs adds the "financials" edge to the Financial entity by IDs.
func (*EntityUpdate) AddFinancials ¶
func (eu *EntityUpdate) AddFinancials(f ...*Financial) *EntityUpdate
AddFinancials adds the "financials" edges to the Financial entity.
func (*EntityUpdate) AddIntervalIDs ¶
func (eu *EntityUpdate) AddIntervalIDs(ids ...int) *EntityUpdate
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*EntityUpdate) AddIntervals ¶
func (eu *EntityUpdate) AddIntervals(i ...*Interval) *EntityUpdate
AddIntervals adds the "intervals" edges to the Interval entity.
func (*EntityUpdate) AddSplitIDs ¶
func (eu *EntityUpdate) AddSplitIDs(ids ...int) *EntityUpdate
AddSplitIDs adds the "splits" edge to the Split entity by IDs.
func (*EntityUpdate) AddSplits ¶
func (eu *EntityUpdate) AddSplits(s ...*Split) *EntityUpdate
AddSplits adds the "splits" edges to the Split entity.
func (*EntityUpdate) ClearDelisted ¶
func (eu *EntityUpdate) ClearDelisted() *EntityUpdate
ClearDelisted clears the value of the "delisted" field.
func (*EntityUpdate) ClearDividends ¶
func (eu *EntityUpdate) ClearDividends() *EntityUpdate
ClearDividends clears all "dividends" edges to the Dividend entity.
func (*EntityUpdate) ClearExchanges ¶
func (eu *EntityUpdate) ClearExchanges() *EntityUpdate
ClearExchanges clears all "exchanges" edges to the Exchange entity.
func (*EntityUpdate) ClearFinancials ¶
func (eu *EntityUpdate) ClearFinancials() *EntityUpdate
ClearFinancials clears all "financials" edges to the Financial entity.
func (*EntityUpdate) ClearIntervals ¶
func (eu *EntityUpdate) ClearIntervals() *EntityUpdate
ClearIntervals clears all "intervals" edges to the Interval entity.
func (*EntityUpdate) ClearSplits ¶
func (eu *EntityUpdate) ClearSplits() *EntityUpdate
ClearSplits clears all "splits" edges to the Split entity.
func (*EntityUpdate) Exec ¶
func (eu *EntityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntityUpdate) ExecX ¶
func (eu *EntityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpdate) Mutation ¶
func (eu *EntityUpdate) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityUpdate) RemoveDividendIDs ¶
func (eu *EntityUpdate) RemoveDividendIDs(ids ...int) *EntityUpdate
RemoveDividendIDs removes the "dividends" edge to Dividend entities by IDs.
func (*EntityUpdate) RemoveDividends ¶
func (eu *EntityUpdate) RemoveDividends(d ...*Dividend) *EntityUpdate
RemoveDividends removes "dividends" edges to Dividend entities.
func (*EntityUpdate) RemoveExchangeIDs ¶
func (eu *EntityUpdate) RemoveExchangeIDs(ids ...int) *EntityUpdate
RemoveExchangeIDs removes the "exchanges" edge to Exchange entities by IDs.
func (*EntityUpdate) RemoveExchanges ¶
func (eu *EntityUpdate) RemoveExchanges(e ...*Exchange) *EntityUpdate
RemoveExchanges removes "exchanges" edges to Exchange entities.
func (*EntityUpdate) RemoveFinancialIDs ¶
func (eu *EntityUpdate) RemoveFinancialIDs(ids ...int) *EntityUpdate
RemoveFinancialIDs removes the "financials" edge to Financial entities by IDs.
func (*EntityUpdate) RemoveFinancials ¶
func (eu *EntityUpdate) RemoveFinancials(f ...*Financial) *EntityUpdate
RemoveFinancials removes "financials" edges to Financial entities.
func (*EntityUpdate) RemoveIntervalIDs ¶
func (eu *EntityUpdate) RemoveIntervalIDs(ids ...int) *EntityUpdate
RemoveIntervalIDs removes the "intervals" edge to Interval entities by IDs.
func (*EntityUpdate) RemoveIntervals ¶
func (eu *EntityUpdate) RemoveIntervals(i ...*Interval) *EntityUpdate
RemoveIntervals removes "intervals" edges to Interval entities.
func (*EntityUpdate) RemoveSplitIDs ¶
func (eu *EntityUpdate) RemoveSplitIDs(ids ...int) *EntityUpdate
RemoveSplitIDs removes the "splits" edge to Split entities by IDs.
func (*EntityUpdate) RemoveSplits ¶
func (eu *EntityUpdate) RemoveSplits(s ...*Split) *EntityUpdate
RemoveSplits removes "splits" edges to Split entities.
func (*EntityUpdate) Save ¶
func (eu *EntityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EntityUpdate) SaveX ¶
func (eu *EntityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EntityUpdate) SetActive ¶
func (eu *EntityUpdate) SetActive(b bool) *EntityUpdate
SetActive sets the "active" field.
func (*EntityUpdate) SetDelisted ¶
func (eu *EntityUpdate) SetDelisted(t time.Time) *EntityUpdate
SetDelisted sets the "delisted" field.
func (*EntityUpdate) SetDescription ¶
func (eu *EntityUpdate) SetDescription(s string) *EntityUpdate
SetDescription sets the "description" field.
func (*EntityUpdate) SetListDate ¶
func (eu *EntityUpdate) SetListDate(t time.Time) *EntityUpdate
SetListDate sets the "list_date" field.
func (*EntityUpdate) SetName ¶
func (eu *EntityUpdate) SetName(s string) *EntityUpdate
SetName sets the "name" field.
func (*EntityUpdate) SetNillableDelisted ¶
func (eu *EntityUpdate) SetNillableDelisted(t *time.Time) *EntityUpdate
SetNillableDelisted sets the "delisted" field if the given value is not nil.
func (*EntityUpdate) SetTicker ¶
func (eu *EntityUpdate) SetTicker(s string) *EntityUpdate
SetTicker sets the "ticker" field.
func (*EntityUpdate) Where ¶
func (eu *EntityUpdate) Where(ps ...predicate.Entity) *EntityUpdate
Where appends a list predicates to the EntityUpdate builder.
type EntityUpdateOne ¶
type EntityUpdateOne struct {
// contains filtered or unexported fields
}
EntityUpdateOne is the builder for updating a single Entity entity.
func (*EntityUpdateOne) AddDividendIDs ¶
func (euo *EntityUpdateOne) AddDividendIDs(ids ...int) *EntityUpdateOne
AddDividendIDs adds the "dividends" edge to the Dividend entity by IDs.
func (*EntityUpdateOne) AddDividends ¶
func (euo *EntityUpdateOne) AddDividends(d ...*Dividend) *EntityUpdateOne
AddDividends adds the "dividends" edges to the Dividend entity.
func (*EntityUpdateOne) AddExchangeIDs ¶
func (euo *EntityUpdateOne) AddExchangeIDs(ids ...int) *EntityUpdateOne
AddExchangeIDs adds the "exchanges" edge to the Exchange entity by IDs.
func (*EntityUpdateOne) AddExchanges ¶
func (euo *EntityUpdateOne) AddExchanges(e ...*Exchange) *EntityUpdateOne
AddExchanges adds the "exchanges" edges to the Exchange entity.
func (*EntityUpdateOne) AddFinancialIDs ¶
func (euo *EntityUpdateOne) AddFinancialIDs(ids ...int) *EntityUpdateOne
AddFinancialIDs adds the "financials" edge to the Financial entity by IDs.
func (*EntityUpdateOne) AddFinancials ¶
func (euo *EntityUpdateOne) AddFinancials(f ...*Financial) *EntityUpdateOne
AddFinancials adds the "financials" edges to the Financial entity.
func (*EntityUpdateOne) AddIntervalIDs ¶
func (euo *EntityUpdateOne) AddIntervalIDs(ids ...int) *EntityUpdateOne
AddIntervalIDs adds the "intervals" edge to the Interval entity by IDs.
func (*EntityUpdateOne) AddIntervals ¶
func (euo *EntityUpdateOne) AddIntervals(i ...*Interval) *EntityUpdateOne
AddIntervals adds the "intervals" edges to the Interval entity.
func (*EntityUpdateOne) AddSplitIDs ¶
func (euo *EntityUpdateOne) AddSplitIDs(ids ...int) *EntityUpdateOne
AddSplitIDs adds the "splits" edge to the Split entity by IDs.
func (*EntityUpdateOne) AddSplits ¶
func (euo *EntityUpdateOne) AddSplits(s ...*Split) *EntityUpdateOne
AddSplits adds the "splits" edges to the Split entity.
func (*EntityUpdateOne) ClearDelisted ¶
func (euo *EntityUpdateOne) ClearDelisted() *EntityUpdateOne
ClearDelisted clears the value of the "delisted" field.
func (*EntityUpdateOne) ClearDividends ¶
func (euo *EntityUpdateOne) ClearDividends() *EntityUpdateOne
ClearDividends clears all "dividends" edges to the Dividend entity.
func (*EntityUpdateOne) ClearExchanges ¶
func (euo *EntityUpdateOne) ClearExchanges() *EntityUpdateOne
ClearExchanges clears all "exchanges" edges to the Exchange entity.
func (*EntityUpdateOne) ClearFinancials ¶
func (euo *EntityUpdateOne) ClearFinancials() *EntityUpdateOne
ClearFinancials clears all "financials" edges to the Financial entity.
func (*EntityUpdateOne) ClearIntervals ¶
func (euo *EntityUpdateOne) ClearIntervals() *EntityUpdateOne
ClearIntervals clears all "intervals" edges to the Interval entity.
func (*EntityUpdateOne) ClearSplits ¶
func (euo *EntityUpdateOne) ClearSplits() *EntityUpdateOne
ClearSplits clears all "splits" edges to the Split entity.
func (*EntityUpdateOne) Exec ¶
func (euo *EntityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EntityUpdateOne) ExecX ¶
func (euo *EntityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntityUpdateOne) Mutation ¶
func (euo *EntityUpdateOne) Mutation() *EntityMutation
Mutation returns the EntityMutation object of the builder.
func (*EntityUpdateOne) RemoveDividendIDs ¶
func (euo *EntityUpdateOne) RemoveDividendIDs(ids ...int) *EntityUpdateOne
RemoveDividendIDs removes the "dividends" edge to Dividend entities by IDs.
func (*EntityUpdateOne) RemoveDividends ¶
func (euo *EntityUpdateOne) RemoveDividends(d ...*Dividend) *EntityUpdateOne
RemoveDividends removes "dividends" edges to Dividend entities.
func (*EntityUpdateOne) RemoveExchangeIDs ¶
func (euo *EntityUpdateOne) RemoveExchangeIDs(ids ...int) *EntityUpdateOne
RemoveExchangeIDs removes the "exchanges" edge to Exchange entities by IDs.
func (*EntityUpdateOne) RemoveExchanges ¶
func (euo *EntityUpdateOne) RemoveExchanges(e ...*Exchange) *EntityUpdateOne
RemoveExchanges removes "exchanges" edges to Exchange entities.
func (*EntityUpdateOne) RemoveFinancialIDs ¶
func (euo *EntityUpdateOne) RemoveFinancialIDs(ids ...int) *EntityUpdateOne
RemoveFinancialIDs removes the "financials" edge to Financial entities by IDs.
func (*EntityUpdateOne) RemoveFinancials ¶
func (euo *EntityUpdateOne) RemoveFinancials(f ...*Financial) *EntityUpdateOne
RemoveFinancials removes "financials" edges to Financial entities.
func (*EntityUpdateOne) RemoveIntervalIDs ¶
func (euo *EntityUpdateOne) RemoveIntervalIDs(ids ...int) *EntityUpdateOne
RemoveIntervalIDs removes the "intervals" edge to Interval entities by IDs.
func (*EntityUpdateOne) RemoveIntervals ¶
func (euo *EntityUpdateOne) RemoveIntervals(i ...*Interval) *EntityUpdateOne
RemoveIntervals removes "intervals" edges to Interval entities.
func (*EntityUpdateOne) RemoveSplitIDs ¶
func (euo *EntityUpdateOne) RemoveSplitIDs(ids ...int) *EntityUpdateOne
RemoveSplitIDs removes the "splits" edge to Split entities by IDs.
func (*EntityUpdateOne) RemoveSplits ¶
func (euo *EntityUpdateOne) RemoveSplits(s ...*Split) *EntityUpdateOne
RemoveSplits removes "splits" edges to Split entities.
func (*EntityUpdateOne) Save ¶
func (euo *EntityUpdateOne) Save(ctx context.Context) (*Entity, error)
Save executes the query and returns the updated Entity entity.
func (*EntityUpdateOne) SaveX ¶
func (euo *EntityUpdateOne) SaveX(ctx context.Context) *Entity
SaveX is like Save, but panics if an error occurs.
func (*EntityUpdateOne) Select ¶
func (euo *EntityUpdateOne) Select(field string, fields ...string) *EntityUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EntityUpdateOne) SetActive ¶
func (euo *EntityUpdateOne) SetActive(b bool) *EntityUpdateOne
SetActive sets the "active" field.
func (*EntityUpdateOne) SetDelisted ¶
func (euo *EntityUpdateOne) SetDelisted(t time.Time) *EntityUpdateOne
SetDelisted sets the "delisted" field.
func (*EntityUpdateOne) SetDescription ¶
func (euo *EntityUpdateOne) SetDescription(s string) *EntityUpdateOne
SetDescription sets the "description" field.
func (*EntityUpdateOne) SetListDate ¶
func (euo *EntityUpdateOne) SetListDate(t time.Time) *EntityUpdateOne
SetListDate sets the "list_date" field.
func (*EntityUpdateOne) SetName ¶
func (euo *EntityUpdateOne) SetName(s string) *EntityUpdateOne
SetName sets the "name" field.
func (*EntityUpdateOne) SetNillableDelisted ¶
func (euo *EntityUpdateOne) SetNillableDelisted(t *time.Time) *EntityUpdateOne
SetNillableDelisted sets the "delisted" field if the given value is not nil.
func (*EntityUpdateOne) SetTicker ¶
func (euo *EntityUpdateOne) SetTicker(s string) *EntityUpdateOne
SetTicker sets the "ticker" field.
type Exchange ¶
type Exchange struct { // ID of the ent. ID int `json:"id,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ExchangeQuery when eager-loading is set. Edges ExchangeEdges `json:"edges"` // contains filtered or unexported fields }
Exchange is the model entity for the Exchange schema.
func (*Exchange) QueryStocks ¶
func (e *Exchange) QueryStocks() *EntityQuery
QueryStocks queries the "stocks" edge of the Exchange entity.
func (*Exchange) Unwrap ¶
Unwrap unwraps the Exchange 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 (*Exchange) Update ¶
func (e *Exchange) Update() *ExchangeUpdateOne
Update returns a builder for updating this Exchange. Note that you need to call Exchange.Unwrap() before calling this method if this Exchange was returned from a transaction, and the transaction was committed or rolled back.
type ExchangeClient ¶
type ExchangeClient struct {
// contains filtered or unexported fields
}
ExchangeClient is a client for the Exchange schema.
func NewExchangeClient ¶
func NewExchangeClient(c config) *ExchangeClient
NewExchangeClient returns a client for the Exchange from the given config.
func (*ExchangeClient) Create ¶
func (c *ExchangeClient) Create() *ExchangeCreate
Create returns a builder for creating a Exchange entity.
func (*ExchangeClient) CreateBulk ¶
func (c *ExchangeClient) CreateBulk(builders ...*ExchangeCreate) *ExchangeCreateBulk
CreateBulk returns a builder for creating a bulk of Exchange entities.
func (*ExchangeClient) Delete ¶
func (c *ExchangeClient) Delete() *ExchangeDelete
Delete returns a delete builder for Exchange.
func (*ExchangeClient) DeleteOne ¶
func (c *ExchangeClient) DeleteOne(e *Exchange) *ExchangeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ExchangeClient) DeleteOneID ¶
func (c *ExchangeClient) DeleteOneID(id int) *ExchangeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ExchangeClient) GetX ¶
func (c *ExchangeClient) GetX(ctx context.Context, id int) *Exchange
GetX is like Get, but panics if an error occurs.
func (*ExchangeClient) Hooks ¶
func (c *ExchangeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ExchangeClient) Intercept ¶
func (c *ExchangeClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `exchange.Intercept(f(g(h())))`.
func (*ExchangeClient) Interceptors ¶
func (c *ExchangeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ExchangeClient) Query ¶
func (c *ExchangeClient) Query() *ExchangeQuery
Query returns a query builder for Exchange.
func (*ExchangeClient) QueryStocks ¶
func (c *ExchangeClient) QueryStocks(e *Exchange) *EntityQuery
QueryStocks queries the stocks edge of a Exchange.
func (*ExchangeClient) Update ¶
func (c *ExchangeClient) Update() *ExchangeUpdate
Update returns an update builder for Exchange.
func (*ExchangeClient) UpdateOne ¶
func (c *ExchangeClient) UpdateOne(e *Exchange) *ExchangeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ExchangeClient) UpdateOneID ¶
func (c *ExchangeClient) UpdateOneID(id int) *ExchangeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ExchangeClient) Use ¶
func (c *ExchangeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `exchange.Hooks(f(g(h())))`.
type ExchangeCreate ¶
type ExchangeCreate struct {
// contains filtered or unexported fields
}
ExchangeCreate is the builder for creating a Exchange entity.
func (*ExchangeCreate) AddStockIDs ¶
func (ec *ExchangeCreate) AddStockIDs(ids ...int) *ExchangeCreate
AddStockIDs adds the "stocks" edge to the Entity entity by IDs.
func (*ExchangeCreate) AddStocks ¶
func (ec *ExchangeCreate) AddStocks(e ...*Entity) *ExchangeCreate
AddStocks adds the "stocks" edges to the Entity entity.
func (*ExchangeCreate) Exec ¶
func (ec *ExchangeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ExchangeCreate) ExecX ¶
func (ec *ExchangeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExchangeCreate) Mutation ¶
func (ec *ExchangeCreate) Mutation() *ExchangeMutation
Mutation returns the ExchangeMutation object of the builder.
func (*ExchangeCreate) Save ¶
func (ec *ExchangeCreate) Save(ctx context.Context) (*Exchange, error)
Save creates the Exchange in the database.
func (*ExchangeCreate) SaveX ¶
func (ec *ExchangeCreate) SaveX(ctx context.Context) *Exchange
SaveX calls Save and panics if Save returns an error.
func (*ExchangeCreate) SetCode ¶
func (ec *ExchangeCreate) SetCode(s string) *ExchangeCreate
SetCode sets the "code" field.
func (*ExchangeCreate) SetName ¶
func (ec *ExchangeCreate) SetName(s string) *ExchangeCreate
SetName sets the "name" field.
type ExchangeCreateBulk ¶
type ExchangeCreateBulk struct {
// contains filtered or unexported fields
}
ExchangeCreateBulk is the builder for creating many Exchange entities in bulk.
func (*ExchangeCreateBulk) Exec ¶
func (ecb *ExchangeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ExchangeCreateBulk) ExecX ¶
func (ecb *ExchangeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ExchangeDelete ¶
type ExchangeDelete struct {
// contains filtered or unexported fields
}
ExchangeDelete is the builder for deleting a Exchange entity.
func (*ExchangeDelete) Exec ¶
func (ed *ExchangeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ExchangeDelete) ExecX ¶
func (ed *ExchangeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ExchangeDelete) Where ¶
func (ed *ExchangeDelete) Where(ps ...predicate.Exchange) *ExchangeDelete
Where appends a list predicates to the ExchangeDelete builder.
type ExchangeDeleteOne ¶
type ExchangeDeleteOne struct {
// contains filtered or unexported fields
}
ExchangeDeleteOne is the builder for deleting a single Exchange entity.
func (*ExchangeDeleteOne) Exec ¶
func (edo *ExchangeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ExchangeDeleteOne) ExecX ¶
func (edo *ExchangeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ExchangeEdges ¶
type ExchangeEdges struct { // Stocks holds the value of the stocks edge. Stocks []*Entity `json:"stocks,omitempty"` // contains filtered or unexported fields }
ExchangeEdges holds the relations/edges for other nodes in the graph.
func (ExchangeEdges) StocksOrErr ¶
func (e ExchangeEdges) StocksOrErr() ([]*Entity, error)
StocksOrErr returns the Stocks value or an error if the edge was not loaded in eager-loading.
type ExchangeGroupBy ¶
type ExchangeGroupBy struct {
// contains filtered or unexported fields
}
ExchangeGroupBy is the group-by builder for Exchange entities.
func (*ExchangeGroupBy) Aggregate ¶
func (egb *ExchangeGroupBy) Aggregate(fns ...AggregateFunc) *ExchangeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ExchangeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ExchangeGroupBy) Scan ¶
func (egb *ExchangeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ExchangeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ExchangeMutation ¶
type ExchangeMutation struct {
// contains filtered or unexported fields
}
ExchangeMutation represents an operation that mutates the Exchange nodes in the graph.
func (*ExchangeMutation) AddField ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) AddStockIDs ¶
func (m *ExchangeMutation) AddStockIDs(ids ...int)
AddStockIDs adds the "stocks" edge to the Entity entity by ids.
func (*ExchangeMutation) AddedEdges ¶
func (m *ExchangeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ExchangeMutation) AddedField ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) AddedFields ¶
func (m *ExchangeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ExchangeMutation) AddedIDs ¶
func (m *ExchangeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ExchangeMutation) ClearEdge ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) ClearField ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) ClearStocks ¶
func (m *ExchangeMutation) ClearStocks()
ClearStocks clears the "stocks" edge to the Entity entity.
func (*ExchangeMutation) ClearedEdges ¶
func (m *ExchangeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ExchangeMutation) ClearedFields ¶
func (m *ExchangeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ExchangeMutation) Client ¶
func (m ExchangeMutation) 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 (*ExchangeMutation) Code ¶
func (m *ExchangeMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*ExchangeMutation) EdgeCleared ¶
func (m *ExchangeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ExchangeMutation) Field ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) FieldCleared ¶
func (m *ExchangeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ExchangeMutation) Fields ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) ID ¶
func (m *ExchangeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ExchangeMutation) IDs ¶
func (m *ExchangeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ExchangeMutation) Name ¶
func (m *ExchangeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ExchangeMutation) OldCode ¶
func (m *ExchangeMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Exchange entity. If the Exchange 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 (*ExchangeMutation) 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 (*ExchangeMutation) OldName ¶
func (m *ExchangeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Exchange entity. If the Exchange 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 (*ExchangeMutation) RemoveStockIDs ¶
func (m *ExchangeMutation) RemoveStockIDs(ids ...int)
RemoveStockIDs removes the "stocks" edge to the Entity entity by IDs.
func (*ExchangeMutation) RemovedEdges ¶
func (m *ExchangeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ExchangeMutation) RemovedIDs ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) RemovedStocksIDs ¶
func (m *ExchangeMutation) RemovedStocksIDs() (ids []int)
RemovedStocks returns the removed IDs of the "stocks" edge to the Entity entity.
func (*ExchangeMutation) ResetCode ¶
func (m *ExchangeMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*ExchangeMutation) ResetEdge ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) ResetField ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) ResetName ¶
func (m *ExchangeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ExchangeMutation) ResetStocks ¶
func (m *ExchangeMutation) ResetStocks()
ResetStocks resets all changes to the "stocks" edge.
func (*ExchangeMutation) SetCode ¶
func (m *ExchangeMutation) SetCode(s string)
SetCode sets the "code" field.
func (*ExchangeMutation) SetField ¶
func (m *ExchangeMutation) 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 (*ExchangeMutation) SetName ¶
func (m *ExchangeMutation) SetName(s string)
SetName sets the "name" field.
func (*ExchangeMutation) SetOp ¶
func (m *ExchangeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ExchangeMutation) StocksCleared ¶
func (m *ExchangeMutation) StocksCleared() bool
StocksCleared reports if the "stocks" edge to the Entity entity was cleared.
func (*ExchangeMutation) StocksIDs ¶
func (m *ExchangeMutation) StocksIDs() (ids []int)
StocksIDs returns the "stocks" edge IDs in the mutation.
func (ExchangeMutation) Tx ¶
func (m ExchangeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ExchangeMutation) Type ¶
func (m *ExchangeMutation) Type() string
Type returns the node type of this mutation (Exchange).
func (*ExchangeMutation) Where ¶
func (m *ExchangeMutation) Where(ps ...predicate.Exchange)
Where appends a list predicates to the ExchangeMutation builder.
func (*ExchangeMutation) WhereP ¶
func (m *ExchangeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ExchangeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ExchangeQuery ¶
type ExchangeQuery struct {
// contains filtered or unexported fields
}
ExchangeQuery is the builder for querying Exchange entities.
func (*ExchangeQuery) Aggregate ¶
func (eq *ExchangeQuery) Aggregate(fns ...AggregateFunc) *ExchangeSelect
Aggregate returns a ExchangeSelect configured with the given aggregations.
func (*ExchangeQuery) All ¶
func (eq *ExchangeQuery) All(ctx context.Context) ([]*Exchange, error)
All executes the query and returns a list of Exchanges.
func (*ExchangeQuery) AllX ¶
func (eq *ExchangeQuery) AllX(ctx context.Context) []*Exchange
AllX is like All, but panics if an error occurs.
func (*ExchangeQuery) Clone ¶
func (eq *ExchangeQuery) Clone() *ExchangeQuery
Clone returns a duplicate of the ExchangeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ExchangeQuery) Count ¶
func (eq *ExchangeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ExchangeQuery) CountX ¶
func (eq *ExchangeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ExchangeQuery) Exist ¶
func (eq *ExchangeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ExchangeQuery) ExistX ¶
func (eq *ExchangeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ExchangeQuery) First ¶
func (eq *ExchangeQuery) First(ctx context.Context) (*Exchange, error)
First returns the first Exchange entity from the query. Returns a *NotFoundError when no Exchange was found.
func (*ExchangeQuery) FirstID ¶
func (eq *ExchangeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Exchange ID from the query. Returns a *NotFoundError when no Exchange ID was found.
func (*ExchangeQuery) FirstIDX ¶
func (eq *ExchangeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ExchangeQuery) FirstX ¶
func (eq *ExchangeQuery) FirstX(ctx context.Context) *Exchange
FirstX is like First, but panics if an error occurs.
func (*ExchangeQuery) GroupBy ¶
func (eq *ExchangeQuery) GroupBy(field string, fields ...string) *ExchangeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Code string `json:"code,omitempty"` Count int `json:"count,omitempty"` } client.Exchange.Query(). GroupBy(exchange.FieldCode). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ExchangeQuery) IDs ¶
func (eq *ExchangeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Exchange IDs.
func (*ExchangeQuery) IDsX ¶
func (eq *ExchangeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ExchangeQuery) Limit ¶
func (eq *ExchangeQuery) Limit(limit int) *ExchangeQuery
Limit the number of records to be returned by this query.
func (*ExchangeQuery) Offset ¶
func (eq *ExchangeQuery) Offset(offset int) *ExchangeQuery
Offset to start from.
func (*ExchangeQuery) Only ¶
func (eq *ExchangeQuery) Only(ctx context.Context) (*Exchange, error)
Only returns a single Exchange entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Exchange entity is found. Returns a *NotFoundError when no Exchange entities are found.
func (*ExchangeQuery) OnlyID ¶
func (eq *ExchangeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Exchange ID in the query. Returns a *NotSingularError when more than one Exchange ID is found. Returns a *NotFoundError when no entities are found.
func (*ExchangeQuery) OnlyIDX ¶
func (eq *ExchangeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ExchangeQuery) OnlyX ¶
func (eq *ExchangeQuery) OnlyX(ctx context.Context) *Exchange
OnlyX is like Only, but panics if an error occurs.
func (*ExchangeQuery) Order ¶
func (eq *ExchangeQuery) Order(o ...OrderFunc) *ExchangeQuery
Order specifies how the records should be ordered.
func (*ExchangeQuery) QueryStocks ¶
func (eq *ExchangeQuery) QueryStocks() *EntityQuery
QueryStocks chains the current query on the "stocks" edge.
func (*ExchangeQuery) Select ¶
func (eq *ExchangeQuery) Select(fields ...string) *ExchangeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Code string `json:"code,omitempty"` } client.Exchange.Query(). Select(exchange.FieldCode). Scan(ctx, &v)
func (*ExchangeQuery) Unique ¶
func (eq *ExchangeQuery) Unique(unique bool) *ExchangeQuery
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 (*ExchangeQuery) Where ¶
func (eq *ExchangeQuery) Where(ps ...predicate.Exchange) *ExchangeQuery
Where adds a new predicate for the ExchangeQuery builder.
func (*ExchangeQuery) WithStocks ¶
func (eq *ExchangeQuery) WithStocks(opts ...func(*EntityQuery)) *ExchangeQuery
WithStocks tells the query-builder to eager-load the nodes that are connected to the "stocks" edge. The optional arguments are used to configure the query builder of the edge.
type ExchangeSelect ¶
type ExchangeSelect struct { *ExchangeQuery // contains filtered or unexported fields }
ExchangeSelect is the builder for selecting fields of Exchange entities.
func (*ExchangeSelect) Aggregate ¶
func (es *ExchangeSelect) Aggregate(fns ...AggregateFunc) *ExchangeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ExchangeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ExchangeSelect) Scan ¶
func (es *ExchangeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ExchangeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ExchangeUpdate ¶
type ExchangeUpdate struct {
// contains filtered or unexported fields
}
ExchangeUpdate is the builder for updating Exchange entities.
func (*ExchangeUpdate) AddStockIDs ¶
func (eu *ExchangeUpdate) AddStockIDs(ids ...int) *ExchangeUpdate
AddStockIDs adds the "stocks" edge to the Entity entity by IDs.
func (*ExchangeUpdate) AddStocks ¶
func (eu *ExchangeUpdate) AddStocks(e ...*Entity) *ExchangeUpdate
AddStocks adds the "stocks" edges to the Entity entity.
func (*ExchangeUpdate) ClearStocks ¶
func (eu *ExchangeUpdate) ClearStocks() *ExchangeUpdate
ClearStocks clears all "stocks" edges to the Entity entity.
func (*ExchangeUpdate) Exec ¶
func (eu *ExchangeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ExchangeUpdate) ExecX ¶
func (eu *ExchangeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExchangeUpdate) Mutation ¶
func (eu *ExchangeUpdate) Mutation() *ExchangeMutation
Mutation returns the ExchangeMutation object of the builder.
func (*ExchangeUpdate) RemoveStockIDs ¶
func (eu *ExchangeUpdate) RemoveStockIDs(ids ...int) *ExchangeUpdate
RemoveStockIDs removes the "stocks" edge to Entity entities by IDs.
func (*ExchangeUpdate) RemoveStocks ¶
func (eu *ExchangeUpdate) RemoveStocks(e ...*Entity) *ExchangeUpdate
RemoveStocks removes "stocks" edges to Entity entities.
func (*ExchangeUpdate) Save ¶
func (eu *ExchangeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ExchangeUpdate) SaveX ¶
func (eu *ExchangeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ExchangeUpdate) SetCode ¶
func (eu *ExchangeUpdate) SetCode(s string) *ExchangeUpdate
SetCode sets the "code" field.
func (*ExchangeUpdate) SetName ¶
func (eu *ExchangeUpdate) SetName(s string) *ExchangeUpdate
SetName sets the "name" field.
func (*ExchangeUpdate) Where ¶
func (eu *ExchangeUpdate) Where(ps ...predicate.Exchange) *ExchangeUpdate
Where appends a list predicates to the ExchangeUpdate builder.
type ExchangeUpdateOne ¶
type ExchangeUpdateOne struct {
// contains filtered or unexported fields
}
ExchangeUpdateOne is the builder for updating a single Exchange entity.
func (*ExchangeUpdateOne) AddStockIDs ¶
func (euo *ExchangeUpdateOne) AddStockIDs(ids ...int) *ExchangeUpdateOne
AddStockIDs adds the "stocks" edge to the Entity entity by IDs.
func (*ExchangeUpdateOne) AddStocks ¶
func (euo *ExchangeUpdateOne) AddStocks(e ...*Entity) *ExchangeUpdateOne
AddStocks adds the "stocks" edges to the Entity entity.
func (*ExchangeUpdateOne) ClearStocks ¶
func (euo *ExchangeUpdateOne) ClearStocks() *ExchangeUpdateOne
ClearStocks clears all "stocks" edges to the Entity entity.
func (*ExchangeUpdateOne) Exec ¶
func (euo *ExchangeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ExchangeUpdateOne) ExecX ¶
func (euo *ExchangeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExchangeUpdateOne) Mutation ¶
func (euo *ExchangeUpdateOne) Mutation() *ExchangeMutation
Mutation returns the ExchangeMutation object of the builder.
func (*ExchangeUpdateOne) RemoveStockIDs ¶
func (euo *ExchangeUpdateOne) RemoveStockIDs(ids ...int) *ExchangeUpdateOne
RemoveStockIDs removes the "stocks" edge to Entity entities by IDs.
func (*ExchangeUpdateOne) RemoveStocks ¶
func (euo *ExchangeUpdateOne) RemoveStocks(e ...*Entity) *ExchangeUpdateOne
RemoveStocks removes "stocks" edges to Entity entities.
func (*ExchangeUpdateOne) Save ¶
func (euo *ExchangeUpdateOne) Save(ctx context.Context) (*Exchange, error)
Save executes the query and returns the updated Exchange entity.
func (*ExchangeUpdateOne) SaveX ¶
func (euo *ExchangeUpdateOne) SaveX(ctx context.Context) *Exchange
SaveX is like Save, but panics if an error occurs.
func (*ExchangeUpdateOne) Select ¶
func (euo *ExchangeUpdateOne) Select(field string, fields ...string) *ExchangeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ExchangeUpdateOne) SetCode ¶
func (euo *ExchangeUpdateOne) SetCode(s string) *ExchangeUpdateOne
SetCode sets the "code" field.
func (*ExchangeUpdateOne) SetName ¶
func (euo *ExchangeUpdateOne) SetName(s string) *ExchangeUpdateOne
SetName sets the "name" field.
type Financial ¶
type Financial struct { // ID of the ent. ID int `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FinancialQuery when eager-loading is set. Edges FinancialEdges `json:"edges"` // contains filtered or unexported fields }
Financial is the model entity for the Financial schema.
func (*Financial) QueryStock ¶
func (f *Financial) QueryStock() *EntityQuery
QueryStock queries the "stock" edge of the Financial entity.
func (*Financial) Unwrap ¶
Unwrap unwraps the Financial 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 (*Financial) Update ¶
func (f *Financial) Update() *FinancialUpdateOne
Update returns a builder for updating this Financial. Note that you need to call Financial.Unwrap() before calling this method if this Financial was returned from a transaction, and the transaction was committed or rolled back.
type FinancialClient ¶
type FinancialClient struct {
// contains filtered or unexported fields
}
FinancialClient is a client for the Financial schema.
func NewFinancialClient ¶
func NewFinancialClient(c config) *FinancialClient
NewFinancialClient returns a client for the Financial from the given config.
func (*FinancialClient) Create ¶
func (c *FinancialClient) Create() *FinancialCreate
Create returns a builder for creating a Financial entity.
func (*FinancialClient) CreateBulk ¶
func (c *FinancialClient) CreateBulk(builders ...*FinancialCreate) *FinancialCreateBulk
CreateBulk returns a builder for creating a bulk of Financial entities.
func (*FinancialClient) Delete ¶
func (c *FinancialClient) Delete() *FinancialDelete
Delete returns a delete builder for Financial.
func (*FinancialClient) DeleteOne ¶
func (c *FinancialClient) DeleteOne(f *Financial) *FinancialDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FinancialClient) DeleteOneID ¶
func (c *FinancialClient) DeleteOneID(id int) *FinancialDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FinancialClient) GetX ¶
func (c *FinancialClient) GetX(ctx context.Context, id int) *Financial
GetX is like Get, but panics if an error occurs.
func (*FinancialClient) Hooks ¶
func (c *FinancialClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FinancialClient) Intercept ¶
func (c *FinancialClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `financial.Intercept(f(g(h())))`.
func (*FinancialClient) Interceptors ¶
func (c *FinancialClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FinancialClient) Query ¶
func (c *FinancialClient) Query() *FinancialQuery
Query returns a query builder for Financial.
func (*FinancialClient) QueryStock ¶
func (c *FinancialClient) QueryStock(f *Financial) *EntityQuery
QueryStock queries the stock edge of a Financial.
func (*FinancialClient) Update ¶
func (c *FinancialClient) Update() *FinancialUpdate
Update returns an update builder for Financial.
func (*FinancialClient) UpdateOne ¶
func (c *FinancialClient) UpdateOne(f *Financial) *FinancialUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FinancialClient) UpdateOneID ¶
func (c *FinancialClient) UpdateOneID(id int) *FinancialUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FinancialClient) Use ¶
func (c *FinancialClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `financial.Hooks(f(g(h())))`.
type FinancialCreate ¶
type FinancialCreate struct {
// contains filtered or unexported fields
}
FinancialCreate is the builder for creating a Financial entity.
func (*FinancialCreate) AddStock ¶
func (fc *FinancialCreate) AddStock(e ...*Entity) *FinancialCreate
AddStock adds the "stock" edges to the Entity entity.
func (*FinancialCreate) AddStockIDs ¶
func (fc *FinancialCreate) AddStockIDs(ids ...int) *FinancialCreate
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*FinancialCreate) Exec ¶
func (fc *FinancialCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialCreate) ExecX ¶
func (fc *FinancialCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialCreate) Mutation ¶
func (fc *FinancialCreate) Mutation() *FinancialMutation
Mutation returns the FinancialMutation object of the builder.
type FinancialCreateBulk ¶
type FinancialCreateBulk struct {
// contains filtered or unexported fields
}
FinancialCreateBulk is the builder for creating many Financial entities in bulk.
func (*FinancialCreateBulk) Exec ¶
func (fcb *FinancialCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialCreateBulk) ExecX ¶
func (fcb *FinancialCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FinancialDelete ¶
type FinancialDelete struct {
// contains filtered or unexported fields
}
FinancialDelete is the builder for deleting a Financial entity.
func (*FinancialDelete) Exec ¶
func (fd *FinancialDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FinancialDelete) ExecX ¶
func (fd *FinancialDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FinancialDelete) Where ¶
func (fd *FinancialDelete) Where(ps ...predicate.Financial) *FinancialDelete
Where appends a list predicates to the FinancialDelete builder.
type FinancialDeleteOne ¶
type FinancialDeleteOne struct {
// contains filtered or unexported fields
}
FinancialDeleteOne is the builder for deleting a single Financial entity.
func (*FinancialDeleteOne) Exec ¶
func (fdo *FinancialDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FinancialDeleteOne) ExecX ¶
func (fdo *FinancialDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FinancialEdges ¶
type FinancialEdges struct { // Stock holds the value of the stock edge. Stock []*Entity `json:"stock,omitempty"` // contains filtered or unexported fields }
FinancialEdges holds the relations/edges for other nodes in the graph.
func (FinancialEdges) StockOrErr ¶
func (e FinancialEdges) StockOrErr() ([]*Entity, error)
StockOrErr returns the Stock value or an error if the edge was not loaded in eager-loading.
type FinancialGroupBy ¶
type FinancialGroupBy struct {
// contains filtered or unexported fields
}
FinancialGroupBy is the group-by builder for Financial entities.
func (*FinancialGroupBy) Aggregate ¶
func (fgb *FinancialGroupBy) Aggregate(fns ...AggregateFunc) *FinancialGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FinancialGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialGroupBy) Scan ¶
func (fgb *FinancialGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FinancialMutation ¶
type FinancialMutation struct {
// contains filtered or unexported fields
}
FinancialMutation represents an operation that mutates the Financial nodes in the graph.
func (*FinancialMutation) AddField ¶
func (m *FinancialMutation) 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 (*FinancialMutation) AddStockIDs ¶
func (m *FinancialMutation) AddStockIDs(ids ...int)
AddStockIDs adds the "stock" edge to the Entity entity by ids.
func (*FinancialMutation) AddedEdges ¶
func (m *FinancialMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FinancialMutation) AddedField ¶
func (m *FinancialMutation) 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 (*FinancialMutation) AddedFields ¶
func (m *FinancialMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FinancialMutation) AddedIDs ¶
func (m *FinancialMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FinancialMutation) ClearEdge ¶
func (m *FinancialMutation) 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 (*FinancialMutation) ClearField ¶
func (m *FinancialMutation) 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 (*FinancialMutation) ClearStock ¶
func (m *FinancialMutation) ClearStock()
ClearStock clears the "stock" edge to the Entity entity.
func (*FinancialMutation) ClearedEdges ¶
func (m *FinancialMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FinancialMutation) ClearedFields ¶
func (m *FinancialMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FinancialMutation) Client ¶
func (m FinancialMutation) 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 (*FinancialMutation) EdgeCleared ¶
func (m *FinancialMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FinancialMutation) Field ¶
func (m *FinancialMutation) 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 (*FinancialMutation) FieldCleared ¶
func (m *FinancialMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FinancialMutation) Fields ¶
func (m *FinancialMutation) 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 (*FinancialMutation) ID ¶
func (m *FinancialMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FinancialMutation) IDs ¶
func (m *FinancialMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FinancialMutation) 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 (*FinancialMutation) RemoveStockIDs ¶
func (m *FinancialMutation) RemoveStockIDs(ids ...int)
RemoveStockIDs removes the "stock" edge to the Entity entity by IDs.
func (*FinancialMutation) RemovedEdges ¶
func (m *FinancialMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FinancialMutation) RemovedIDs ¶
func (m *FinancialMutation) 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 (*FinancialMutation) RemovedStockIDs ¶
func (m *FinancialMutation) RemovedStockIDs() (ids []int)
RemovedStock returns the removed IDs of the "stock" edge to the Entity entity.
func (*FinancialMutation) ResetEdge ¶
func (m *FinancialMutation) 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 (*FinancialMutation) ResetField ¶
func (m *FinancialMutation) 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 (*FinancialMutation) ResetStock ¶
func (m *FinancialMutation) ResetStock()
ResetStock resets all changes to the "stock" edge.
func (*FinancialMutation) SetField ¶
func (m *FinancialMutation) 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 (*FinancialMutation) SetOp ¶
func (m *FinancialMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FinancialMutation) StockCleared ¶
func (m *FinancialMutation) StockCleared() bool
StockCleared reports if the "stock" edge to the Entity entity was cleared.
func (*FinancialMutation) StockIDs ¶
func (m *FinancialMutation) StockIDs() (ids []int)
StockIDs returns the "stock" edge IDs in the mutation.
func (FinancialMutation) Tx ¶
func (m FinancialMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FinancialMutation) Type ¶
func (m *FinancialMutation) Type() string
Type returns the node type of this mutation (Financial).
func (*FinancialMutation) Where ¶
func (m *FinancialMutation) Where(ps ...predicate.Financial)
Where appends a list predicates to the FinancialMutation builder.
func (*FinancialMutation) WhereP ¶
func (m *FinancialMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FinancialMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FinancialQuery ¶
type FinancialQuery struct {
// contains filtered or unexported fields
}
FinancialQuery is the builder for querying Financial entities.
func (*FinancialQuery) Aggregate ¶
func (fq *FinancialQuery) Aggregate(fns ...AggregateFunc) *FinancialSelect
Aggregate returns a FinancialSelect configured with the given aggregations.
func (*FinancialQuery) All ¶
func (fq *FinancialQuery) All(ctx context.Context) ([]*Financial, error)
All executes the query and returns a list of Financials.
func (*FinancialQuery) AllX ¶
func (fq *FinancialQuery) AllX(ctx context.Context) []*Financial
AllX is like All, but panics if an error occurs.
func (*FinancialQuery) Clone ¶
func (fq *FinancialQuery) Clone() *FinancialQuery
Clone returns a duplicate of the FinancialQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FinancialQuery) Count ¶
func (fq *FinancialQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FinancialQuery) CountX ¶
func (fq *FinancialQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FinancialQuery) Exist ¶
func (fq *FinancialQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FinancialQuery) ExistX ¶
func (fq *FinancialQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FinancialQuery) First ¶
func (fq *FinancialQuery) First(ctx context.Context) (*Financial, error)
First returns the first Financial entity from the query. Returns a *NotFoundError when no Financial was found.
func (*FinancialQuery) FirstID ¶
func (fq *FinancialQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Financial ID from the query. Returns a *NotFoundError when no Financial ID was found.
func (*FinancialQuery) FirstIDX ¶
func (fq *FinancialQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*FinancialQuery) FirstX ¶
func (fq *FinancialQuery) FirstX(ctx context.Context) *Financial
FirstX is like First, but panics if an error occurs.
func (*FinancialQuery) GroupBy ¶
func (fq *FinancialQuery) GroupBy(field string, fields ...string) *FinancialGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*FinancialQuery) IDs ¶
func (fq *FinancialQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Financial IDs.
func (*FinancialQuery) IDsX ¶
func (fq *FinancialQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*FinancialQuery) Limit ¶
func (fq *FinancialQuery) Limit(limit int) *FinancialQuery
Limit the number of records to be returned by this query.
func (*FinancialQuery) Offset ¶
func (fq *FinancialQuery) Offset(offset int) *FinancialQuery
Offset to start from.
func (*FinancialQuery) Only ¶
func (fq *FinancialQuery) Only(ctx context.Context) (*Financial, error)
Only returns a single Financial entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Financial entity is found. Returns a *NotFoundError when no Financial entities are found.
func (*FinancialQuery) OnlyID ¶
func (fq *FinancialQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Financial ID in the query. Returns a *NotSingularError when more than one Financial ID is found. Returns a *NotFoundError when no entities are found.
func (*FinancialQuery) OnlyIDX ¶
func (fq *FinancialQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FinancialQuery) OnlyX ¶
func (fq *FinancialQuery) OnlyX(ctx context.Context) *Financial
OnlyX is like Only, but panics if an error occurs.
func (*FinancialQuery) Order ¶
func (fq *FinancialQuery) Order(o ...OrderFunc) *FinancialQuery
Order specifies how the records should be ordered.
func (*FinancialQuery) QueryStock ¶
func (fq *FinancialQuery) QueryStock() *EntityQuery
QueryStock chains the current query on the "stock" edge.
func (*FinancialQuery) Select ¶
func (fq *FinancialQuery) Select(fields ...string) *FinancialSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*FinancialQuery) Unique ¶
func (fq *FinancialQuery) Unique(unique bool) *FinancialQuery
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 (*FinancialQuery) Where ¶
func (fq *FinancialQuery) Where(ps ...predicate.Financial) *FinancialQuery
Where adds a new predicate for the FinancialQuery builder.
func (*FinancialQuery) WithStock ¶
func (fq *FinancialQuery) WithStock(opts ...func(*EntityQuery)) *FinancialQuery
WithStock tells the query-builder to eager-load the nodes that are connected to the "stock" edge. The optional arguments are used to configure the query builder of the edge.
type FinancialSelect ¶
type FinancialSelect struct { *FinancialQuery // contains filtered or unexported fields }
FinancialSelect is the builder for selecting fields of Financial entities.
func (*FinancialSelect) Aggregate ¶
func (fs *FinancialSelect) Aggregate(fns ...AggregateFunc) *FinancialSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FinancialSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialSelect) Scan ¶
func (fs *FinancialSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FinancialUpdate ¶
type FinancialUpdate struct {
// contains filtered or unexported fields
}
FinancialUpdate is the builder for updating Financial entities.
func (*FinancialUpdate) AddStock ¶
func (fu *FinancialUpdate) AddStock(e ...*Entity) *FinancialUpdate
AddStock adds the "stock" edges to the Entity entity.
func (*FinancialUpdate) AddStockIDs ¶
func (fu *FinancialUpdate) AddStockIDs(ids ...int) *FinancialUpdate
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*FinancialUpdate) ClearStock ¶
func (fu *FinancialUpdate) ClearStock() *FinancialUpdate
ClearStock clears all "stock" edges to the Entity entity.
func (*FinancialUpdate) Exec ¶
func (fu *FinancialUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialUpdate) ExecX ¶
func (fu *FinancialUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialUpdate) Mutation ¶
func (fu *FinancialUpdate) Mutation() *FinancialMutation
Mutation returns the FinancialMutation object of the builder.
func (*FinancialUpdate) RemoveStock ¶
func (fu *FinancialUpdate) RemoveStock(e ...*Entity) *FinancialUpdate
RemoveStock removes "stock" edges to Entity entities.
func (*FinancialUpdate) RemoveStockIDs ¶
func (fu *FinancialUpdate) RemoveStockIDs(ids ...int) *FinancialUpdate
RemoveStockIDs removes the "stock" edge to Entity entities by IDs.
func (*FinancialUpdate) Save ¶
func (fu *FinancialUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FinancialUpdate) SaveX ¶
func (fu *FinancialUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FinancialUpdate) Where ¶
func (fu *FinancialUpdate) Where(ps ...predicate.Financial) *FinancialUpdate
Where appends a list predicates to the FinancialUpdate builder.
type FinancialUpdateOne ¶
type FinancialUpdateOne struct {
// contains filtered or unexported fields
}
FinancialUpdateOne is the builder for updating a single Financial entity.
func (*FinancialUpdateOne) AddStock ¶
func (fuo *FinancialUpdateOne) AddStock(e ...*Entity) *FinancialUpdateOne
AddStock adds the "stock" edges to the Entity entity.
func (*FinancialUpdateOne) AddStockIDs ¶
func (fuo *FinancialUpdateOne) AddStockIDs(ids ...int) *FinancialUpdateOne
AddStockIDs adds the "stock" edge to the Entity entity by IDs.
func (*FinancialUpdateOne) ClearStock ¶
func (fuo *FinancialUpdateOne) ClearStock() *FinancialUpdateOne
ClearStock clears all "stock" edges to the Entity entity.
func (*FinancialUpdateOne) Exec ¶
func (fuo *FinancialUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FinancialUpdateOne) ExecX ¶
func (fuo *FinancialUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialUpdateOne) Mutation ¶
func (fuo *FinancialUpdateOne) Mutation() *FinancialMutation
Mutation returns the FinancialMutation object of the builder.
func (*FinancialUpdateOne) RemoveStock ¶
func (fuo *FinancialUpdateOne) RemoveStock(e ...*Entity) *FinancialUpdateOne
RemoveStock removes "stock" edges to Entity entities.
func (*FinancialUpdateOne) RemoveStockIDs ¶
func (fuo *FinancialUpdateOne) RemoveStockIDs(ids ...int) *FinancialUpdateOne
RemoveStockIDs removes the "stock" edge to Entity entities by IDs.
func (*FinancialUpdateOne) Save ¶
func (fuo *FinancialUpdateOne) Save(ctx context.Context) (*Financial, error)
Save executes the query and returns the updated Financial entity.
func (*FinancialUpdateOne) SaveX ¶
func (fuo *FinancialUpdateOne) SaveX(ctx context.Context) *Financial
SaveX is like Save, but panics if an error occurs.
func (*FinancialUpdateOne) Select ¶
func (fuo *FinancialUpdateOne) Select(field string, fields ...string) *FinancialUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
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 Interval ¶
type Interval struct { // ID of the ent. ID int `json:"id,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // Interval holds the value of the "interval" field. Interval interval.Interval `json:"interval,omitempty"` // StockID holds the value of the "stock_id" field. StockID int `json:"stock_id,omitempty"` // DataSourceID holds the value of the "data_source_id" field. DataSourceID int `json:"data_source_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IntervalQuery when eager-loading is set. Edges IntervalEdges `json:"edges"` // contains filtered or unexported fields }
Interval is the model entity for the Interval schema.
func (*Interval) QueryBars ¶
func (i *Interval) QueryBars() *BarTimeRangeQuery
QueryBars queries the "bars" edge of the Interval entity.
func (*Interval) QueryDataSource ¶
func (i *Interval) QueryDataSource() *DataSourceQuery
QueryDataSource queries the "data_source" edge of the Interval entity.
func (*Interval) QueryStock ¶
func (i *Interval) QueryStock() *EntityQuery
QueryStock queries the "stock" edge of the Interval entity.
func (*Interval) QueryTrades ¶
func (i *Interval) QueryTrades() *TradeTimeRangeQuery
QueryTrades queries the "trades" edge of the Interval entity.
func (*Interval) Unwrap ¶
Unwrap unwraps the Interval 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 (*Interval) Update ¶
func (i *Interval) Update() *IntervalUpdateOne
Update returns a builder for updating this Interval. Note that you need to call Interval.Unwrap() before calling this method if this Interval was returned from a transaction, and the transaction was committed or rolled back.
type IntervalClient ¶
type IntervalClient struct {
// contains filtered or unexported fields
}
IntervalClient is a client for the Interval schema.
func NewIntervalClient ¶
func NewIntervalClient(c config) *IntervalClient
NewIntervalClient returns a client for the Interval from the given config.
func (*IntervalClient) Create ¶
func (c *IntervalClient) Create() *IntervalCreate
Create returns a builder for creating a Interval entity.
func (*IntervalClient) CreateBulk ¶
func (c *IntervalClient) CreateBulk(builders ...*IntervalCreate) *IntervalCreateBulk
CreateBulk returns a builder for creating a bulk of Interval entities.
func (*IntervalClient) Delete ¶
func (c *IntervalClient) Delete() *IntervalDelete
Delete returns a delete builder for Interval.
func (*IntervalClient) DeleteOne ¶
func (c *IntervalClient) DeleteOne(i *Interval) *IntervalDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IntervalClient) DeleteOneID ¶
func (c *IntervalClient) DeleteOneID(id int) *IntervalDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IntervalClient) GetX ¶
func (c *IntervalClient) GetX(ctx context.Context, id int) *Interval
GetX is like Get, but panics if an error occurs.
func (*IntervalClient) Hooks ¶
func (c *IntervalClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IntervalClient) Intercept ¶
func (c *IntervalClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `interval.Intercept(f(g(h())))`.
func (*IntervalClient) Interceptors ¶
func (c *IntervalClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IntervalClient) Query ¶
func (c *IntervalClient) Query() *IntervalQuery
Query returns a query builder for Interval.
func (*IntervalClient) QueryBars ¶
func (c *IntervalClient) QueryBars(i *Interval) *BarTimeRangeQuery
QueryBars queries the bars edge of a Interval.
func (*IntervalClient) QueryDataSource ¶
func (c *IntervalClient) QueryDataSource(i *Interval) *DataSourceQuery
QueryDataSource queries the data_source edge of a Interval.
func (*IntervalClient) QueryStock ¶
func (c *IntervalClient) QueryStock(i *Interval) *EntityQuery
QueryStock queries the stock edge of a Interval.
func (*IntervalClient) QueryTrades ¶
func (c *IntervalClient) QueryTrades(i *Interval) *TradeTimeRangeQuery
QueryTrades queries the trades edge of a Interval.
func (*IntervalClient) Update ¶
func (c *IntervalClient) Update() *IntervalUpdate
Update returns an update builder for Interval.
func (*IntervalClient) UpdateOne ¶
func (c *IntervalClient) UpdateOne(i *Interval) *IntervalUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IntervalClient) UpdateOneID ¶
func (c *IntervalClient) UpdateOneID(id int) *IntervalUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IntervalClient) Use ¶
func (c *IntervalClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `interval.Hooks(f(g(h())))`.
type IntervalCreate ¶
type IntervalCreate struct {
// contains filtered or unexported fields
}
IntervalCreate is the builder for creating a Interval entity.
func (*IntervalCreate) AddBarIDs ¶
func (ic *IntervalCreate) AddBarIDs(ids ...int) *IntervalCreate
AddBarIDs adds the "bars" edge to the BarTimeRange entity by IDs.
func (*IntervalCreate) AddBars ¶
func (ic *IntervalCreate) AddBars(b ...*BarTimeRange) *IntervalCreate
AddBars adds the "bars" edges to the BarTimeRange entity.
func (*IntervalCreate) AddTradeIDs ¶
func (ic *IntervalCreate) AddTradeIDs(ids ...int) *IntervalCreate
AddTradeIDs adds the "trades" edge to the TradeTimeRange entity by IDs.
func (*IntervalCreate) AddTrades ¶
func (ic *IntervalCreate) AddTrades(t ...*TradeTimeRange) *IntervalCreate
AddTrades adds the "trades" edges to the TradeTimeRange entity.
func (*IntervalCreate) Exec ¶
func (ic *IntervalCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IntervalCreate) ExecX ¶
func (ic *IntervalCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IntervalCreate) Mutation ¶
func (ic *IntervalCreate) Mutation() *IntervalMutation
Mutation returns the IntervalMutation object of the builder.
func (*IntervalCreate) Save ¶
func (ic *IntervalCreate) Save(ctx context.Context) (*Interval, error)
Save creates the Interval in the database.
func (*IntervalCreate) SaveX ¶
func (ic *IntervalCreate) SaveX(ctx context.Context) *Interval
SaveX calls Save and panics if Save returns an error.
func (*IntervalCreate) SetActive ¶
func (ic *IntervalCreate) SetActive(b bool) *IntervalCreate
SetActive sets the "active" field.
func (*IntervalCreate) SetDataSource ¶
func (ic *IntervalCreate) SetDataSource(d *DataSource) *IntervalCreate
SetDataSource sets the "data_source" edge to the DataSource entity.
func (*IntervalCreate) SetDataSourceID ¶
func (ic *IntervalCreate) SetDataSourceID(i int) *IntervalCreate
SetDataSourceID sets the "data_source_id" field.
func (*IntervalCreate) SetInterval ¶
func (ic *IntervalCreate) SetInterval(i interval.Interval) *IntervalCreate
SetInterval sets the "interval" field.
func (*IntervalCreate) SetNillableActive ¶
func (ic *IntervalCreate) SetNillableActive(b *bool) *IntervalCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*IntervalCreate) SetStock ¶
func (ic *IntervalCreate) SetStock(e *Entity) *IntervalCreate
SetStock sets the "stock" edge to the Entity entity.
func (*IntervalCreate) SetStockID ¶
func (ic *IntervalCreate) SetStockID(i int) *IntervalCreate
SetStockID sets the "stock_id" field.
type IntervalCreateBulk ¶
type IntervalCreateBulk struct {
// contains filtered or unexported fields
}
IntervalCreateBulk is the builder for creating many Interval entities in bulk.
func (*IntervalCreateBulk) Exec ¶
func (icb *IntervalCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IntervalCreateBulk) ExecX ¶
func (icb *IntervalCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IntervalDelete ¶
type IntervalDelete struct {
// contains filtered or unexported fields
}
IntervalDelete is the builder for deleting a Interval entity.
func (*IntervalDelete) Exec ¶
func (id *IntervalDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IntervalDelete) ExecX ¶
func (id *IntervalDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IntervalDelete) Where ¶
func (id *IntervalDelete) Where(ps ...predicate.Interval) *IntervalDelete
Where appends a list predicates to the IntervalDelete builder.
type IntervalDeleteOne ¶
type IntervalDeleteOne struct {
// contains filtered or unexported fields
}
IntervalDeleteOne is the builder for deleting a single Interval entity.
func (*IntervalDeleteOne) Exec ¶
func (ido *IntervalDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IntervalDeleteOne) ExecX ¶
func (ido *IntervalDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IntervalEdges ¶
type IntervalEdges struct { // DataSource holds the value of the data_source edge. DataSource *DataSource `json:"data_source,omitempty"` // Stock holds the value of the stock edge. Stock *Entity `json:"stock,omitempty"` // Bars holds the value of the bars edge. Bars []*BarTimeRange `json:"bars,omitempty"` // Trades holds the value of the trades edge. Trades []*TradeTimeRange `json:"trades,omitempty"` // contains filtered or unexported fields }
IntervalEdges holds the relations/edges for other nodes in the graph.
func (IntervalEdges) BarsOrErr ¶
func (e IntervalEdges) BarsOrErr() ([]*BarTimeRange, error)
BarsOrErr returns the Bars value or an error if the edge was not loaded in eager-loading.
func (IntervalEdges) DataSourceOrErr ¶
func (e IntervalEdges) DataSourceOrErr() (*DataSource, error)
DataSourceOrErr returns the DataSource value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IntervalEdges) StockOrErr ¶
func (e IntervalEdges) StockOrErr() (*Entity, error)
StockOrErr returns the Stock value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IntervalEdges) TradesOrErr ¶
func (e IntervalEdges) TradesOrErr() ([]*TradeTimeRange, error)
TradesOrErr returns the Trades value or an error if the edge was not loaded in eager-loading.
type IntervalGroupBy ¶
type IntervalGroupBy struct {
// contains filtered or unexported fields
}
IntervalGroupBy is the group-by builder for Interval entities.
func (*IntervalGroupBy) Aggregate ¶
func (igb *IntervalGroupBy) Aggregate(fns ...AggregateFunc) *IntervalGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IntervalGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IntervalGroupBy) Scan ¶
func (igb *IntervalGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IntervalGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IntervalMutation ¶
type IntervalMutation struct {
// contains filtered or unexported fields
}
IntervalMutation represents an operation that mutates the Interval nodes in the graph.
func (*IntervalMutation) Active ¶
func (m *IntervalMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*IntervalMutation) AddBarIDs ¶
func (m *IntervalMutation) AddBarIDs(ids ...int)
AddBarIDs adds the "bars" edge to the BarTimeRange entity by ids.
func (*IntervalMutation) AddField ¶
func (m *IntervalMutation) 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 (*IntervalMutation) AddTradeIDs ¶
func (m *IntervalMutation) AddTradeIDs(ids ...int)
AddTradeIDs adds the "trades" edge to the TradeTimeRange entity by ids.
func (*IntervalMutation) AddedEdges ¶
func (m *IntervalMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IntervalMutation) AddedField ¶
func (m *IntervalMutation) 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 (*IntervalMutation) AddedFields ¶
func (m *IntervalMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IntervalMutation) AddedIDs ¶
func (m *IntervalMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IntervalMutation) BarsCleared ¶
func (m *IntervalMutation) BarsCleared() bool
BarsCleared reports if the "bars" edge to the BarTimeRange entity was cleared.
func (*IntervalMutation) BarsIDs ¶
func (m *IntervalMutation) BarsIDs() (ids []int)
BarsIDs returns the "bars" edge IDs in the mutation.
func (*IntervalMutation) ClearBars ¶
func (m *IntervalMutation) ClearBars()
ClearBars clears the "bars" edge to the BarTimeRange entity.
func (*IntervalMutation) ClearDataSource ¶
func (m *IntervalMutation) ClearDataSource()
ClearDataSource clears the "data_source" edge to the DataSource entity.
func (*IntervalMutation) ClearEdge ¶
func (m *IntervalMutation) 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 (*IntervalMutation) ClearField ¶
func (m *IntervalMutation) 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 (*IntervalMutation) ClearStock ¶
func (m *IntervalMutation) ClearStock()
ClearStock clears the "stock" edge to the Entity entity.
func (*IntervalMutation) ClearTrades ¶
func (m *IntervalMutation) ClearTrades()
ClearTrades clears the "trades" edge to the TradeTimeRange entity.
func (*IntervalMutation) ClearedEdges ¶
func (m *IntervalMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IntervalMutation) ClearedFields ¶
func (m *IntervalMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IntervalMutation) Client ¶
func (m IntervalMutation) 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 (*IntervalMutation) DataSourceCleared ¶
func (m *IntervalMutation) DataSourceCleared() bool
DataSourceCleared reports if the "data_source" edge to the DataSource entity was cleared.
func (*IntervalMutation) DataSourceID ¶
func (m *IntervalMutation) DataSourceID() (r int, exists bool)
DataSourceID returns the value of the "data_source_id" field in the mutation.
func (*IntervalMutation) DataSourceIDs ¶
func (m *IntervalMutation) DataSourceIDs() (ids []int)
DataSourceIDs returns the "data_source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DataSourceID instead. It exists only for internal usage by the builders.
func (*IntervalMutation) EdgeCleared ¶
func (m *IntervalMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IntervalMutation) Field ¶
func (m *IntervalMutation) 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 (*IntervalMutation) FieldCleared ¶
func (m *IntervalMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IntervalMutation) Fields ¶
func (m *IntervalMutation) 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 (*IntervalMutation) ID ¶
func (m *IntervalMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*IntervalMutation) IDs ¶
func (m *IntervalMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*IntervalMutation) Interval ¶
func (m *IntervalMutation) Interval() (r interval.Interval, exists bool)
Interval returns the value of the "interval" field in the mutation.
func (*IntervalMutation) OldActive ¶
func (m *IntervalMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Interval entity. If the Interval 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 (*IntervalMutation) OldDataSourceID ¶
func (m *IntervalMutation) OldDataSourceID(ctx context.Context) (v int, err error)
OldDataSourceID returns the old "data_source_id" field's value of the Interval entity. If the Interval 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 (*IntervalMutation) 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 (*IntervalMutation) OldInterval ¶
OldInterval returns the old "interval" field's value of the Interval entity. If the Interval 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 (*IntervalMutation) OldStockID ¶
func (m *IntervalMutation) OldStockID(ctx context.Context) (v int, err error)
OldStockID returns the old "stock_id" field's value of the Interval entity. If the Interval 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 (*IntervalMutation) RemoveBarIDs ¶
func (m *IntervalMutation) RemoveBarIDs(ids ...int)
RemoveBarIDs removes the "bars" edge to the BarTimeRange entity by IDs.
func (*IntervalMutation) RemoveTradeIDs ¶
func (m *IntervalMutation) RemoveTradeIDs(ids ...int)
RemoveTradeIDs removes the "trades" edge to the TradeTimeRange entity by IDs.
func (*IntervalMutation) RemovedBarsIDs ¶
func (m *IntervalMutation) RemovedBarsIDs() (ids []int)
RemovedBars returns the removed IDs of the "bars" edge to the BarTimeRange entity.
func (*IntervalMutation) RemovedEdges ¶
func (m *IntervalMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IntervalMutation) RemovedIDs ¶
func (m *IntervalMutation) 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 (*IntervalMutation) RemovedTradesIDs ¶
func (m *IntervalMutation) RemovedTradesIDs() (ids []int)
RemovedTrades returns the removed IDs of the "trades" edge to the TradeTimeRange entity.
func (*IntervalMutation) ResetActive ¶
func (m *IntervalMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*IntervalMutation) ResetBars ¶
func (m *IntervalMutation) ResetBars()
ResetBars resets all changes to the "bars" edge.
func (*IntervalMutation) ResetDataSource ¶
func (m *IntervalMutation) ResetDataSource()
ResetDataSource resets all changes to the "data_source" edge.
func (*IntervalMutation) ResetDataSourceID ¶
func (m *IntervalMutation) ResetDataSourceID()
ResetDataSourceID resets all changes to the "data_source_id" field.
func (*IntervalMutation) ResetEdge ¶
func (m *IntervalMutation) 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 (*IntervalMutation) ResetField ¶
func (m *IntervalMutation) 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 (*IntervalMutation) ResetInterval ¶
func (m *IntervalMutation) ResetInterval()
ResetInterval resets all changes to the "interval" field.
func (*IntervalMutation) ResetStock ¶
func (m *IntervalMutation) ResetStock()
ResetStock resets all changes to the "stock" edge.
func (*IntervalMutation) ResetStockID ¶
func (m *IntervalMutation) ResetStockID()
ResetStockID resets all changes to the "stock_id" field.
func (*IntervalMutation) ResetTrades ¶
func (m *IntervalMutation) ResetTrades()
ResetTrades resets all changes to the "trades" edge.
func (*IntervalMutation) SetActive ¶
func (m *IntervalMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*IntervalMutation) SetDataSourceID ¶
func (m *IntervalMutation) SetDataSourceID(i int)
SetDataSourceID sets the "data_source_id" field.
func (*IntervalMutation) SetField ¶
func (m *IntervalMutation) 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 (*IntervalMutation) SetInterval ¶
func (m *IntervalMutation) SetInterval(i interval.Interval)
SetInterval sets the "interval" field.
func (*IntervalMutation) SetOp ¶
func (m *IntervalMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IntervalMutation) SetStockID ¶
func (m *IntervalMutation) SetStockID(i int)
SetStockID sets the "stock_id" field.
func (*IntervalMutation) StockCleared ¶
func (m *IntervalMutation) StockCleared() bool
StockCleared reports if the "stock" edge to the Entity entity was cleared.
func (*IntervalMutation) StockID ¶
func (m *IntervalMutation) StockID() (r int, exists bool)
StockID returns the value of the "stock_id" field in the mutation.
func (*IntervalMutation) StockIDs ¶
func (m *IntervalMutation) StockIDs() (ids []int)
StockIDs returns the "stock" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StockID instead. It exists only for internal usage by the builders.
func (*IntervalMutation) TradesCleared ¶
func (m *IntervalMutation) TradesCleared() bool
TradesCleared reports if the "trades" edge to the TradeTimeRange entity was cleared.
func (*IntervalMutation) TradesIDs ¶
func (m *IntervalMutation) TradesIDs() (ids []int)
TradesIDs returns the "trades" edge IDs in the mutation.
func (IntervalMutation) Tx ¶
func (m IntervalMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IntervalMutation) Type ¶
func (m *IntervalMutation) Type() string
Type returns the node type of this mutation (Interval).
func (*IntervalMutation) Where ¶
func (m *IntervalMutation) Where(ps ...predicate.Interval)
Where appends a list predicates to the IntervalMutation builder.
func (*IntervalMutation) WhereP ¶
func (m *IntervalMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IntervalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IntervalQuery ¶
type IntervalQuery struct {
// contains filtered or unexported fields
}
IntervalQuery is the builder for querying Interval entities.
func (*IntervalQuery) Aggregate ¶
func (iq *IntervalQuery) Aggregate(fns ...AggregateFunc) *IntervalSelect
Aggregate returns a IntervalSelect configured with the given aggregations.
func (*IntervalQuery) All ¶
func (iq *IntervalQuery) All(ctx context.Context) ([]*Interval, error)
All executes the query and returns a list of Intervals.
func (*IntervalQuery) AllX ¶
func (iq *IntervalQuery) AllX(ctx context.Context) []*Interval
AllX is like All, but panics if an error occurs.
func (*IntervalQuery) Clone ¶
func (iq *IntervalQuery) Clone() *IntervalQuery
Clone returns a duplicate of the IntervalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IntervalQuery) Count ¶
func (iq *IntervalQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IntervalQuery) CountX ¶
func (iq *IntervalQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IntervalQuery) Exist ¶
func (iq *IntervalQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IntervalQuery) ExistX ¶
func (iq *IntervalQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IntervalQuery) First ¶
func (iq *IntervalQuery) First(ctx context.Context) (*Interval, error)
First returns the first Interval entity from the query. Returns a *NotFoundError when no Interval was found.
func (*IntervalQuery) FirstID ¶
func (iq *IntervalQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Interval ID from the query. Returns a *NotFoundError when no Interval ID was found.
func (*IntervalQuery) FirstIDX ¶
func (iq *IntervalQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IntervalQuery) FirstX ¶
func (iq *IntervalQuery) FirstX(ctx context.Context) *Interval
FirstX is like First, but panics if an error occurs.
func (*IntervalQuery) GroupBy ¶
func (iq *IntervalQuery) GroupBy(field string, fields ...string) *IntervalGroupBy
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 { Active bool `json:"active,omitempty"` Count int `json:"count,omitempty"` } client.Interval.Query(). GroupBy(interval.FieldActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IntervalQuery) IDs ¶
func (iq *IntervalQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Interval IDs.
func (*IntervalQuery) IDsX ¶
func (iq *IntervalQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IntervalQuery) Limit ¶
func (iq *IntervalQuery) Limit(limit int) *IntervalQuery
Limit the number of records to be returned by this query.
func (*IntervalQuery) Offset ¶
func (iq *IntervalQuery) Offset(offset int) *IntervalQuery
Offset to start from.
func (*IntervalQuery) Only ¶
func (iq *IntervalQuery) Only(ctx context.Context) (*Interval, error)
Only returns a single Interval entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Interval entity is found. Returns a *NotFoundError when no Interval entities are found.
func (*IntervalQuery) OnlyID ¶
func (iq *IntervalQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Interval ID in the query. Returns a *NotSingularError when more than one Interval ID is found. Returns a *NotFoundError when no entities are found.
func (*IntervalQuery) OnlyIDX ¶
func (iq *IntervalQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IntervalQuery) OnlyX ¶
func (iq *IntervalQuery) OnlyX(ctx context.Context) *Interval
OnlyX is like Only, but panics if an error occurs.
func (*IntervalQuery) Order ¶
func (iq *IntervalQuery) Order(o ...OrderFunc) *IntervalQuery
Order specifies how the records should be ordered.
func (*IntervalQuery) QueryBars ¶
func (iq *IntervalQuery) QueryBars() *BarTimeRangeQuery
QueryBars chains the current query on the "bars" edge.
func (*IntervalQuery) QueryDataSource ¶
func (iq *IntervalQuery) QueryDataSource() *DataSourceQuery
QueryDataSource chains the current query on the "data_source" edge.
func (*IntervalQuery) QueryStock ¶
func (iq *IntervalQuery) QueryStock() *EntityQuery
QueryStock chains the current query on the "stock" edge.
func (*IntervalQuery) QueryTrades ¶
func (iq *IntervalQuery) QueryTrades() *TradeTimeRangeQuery
QueryTrades chains the current query on the "trades" edge.
func (*IntervalQuery) Select ¶
func (iq *IntervalQuery) Select(fields ...string) *IntervalSelect
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 { Active bool `json:"active,omitempty"` } client.Interval.Query(). Select(interval.FieldActive). Scan(ctx, &v)
func (*IntervalQuery) Unique ¶
func (iq *IntervalQuery) Unique(unique bool) *IntervalQuery
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 (*IntervalQuery) Where ¶
func (iq *IntervalQuery) Where(ps ...predicate.Interval) *IntervalQuery
Where adds a new predicate for the IntervalQuery builder.
func (*IntervalQuery) WithBars ¶
func (iq *IntervalQuery) WithBars(opts ...func(*BarTimeRangeQuery)) *IntervalQuery
WithBars tells the query-builder to eager-load the nodes that are connected to the "bars" edge. The optional arguments are used to configure the query builder of the edge.
func (*IntervalQuery) WithDataSource ¶
func (iq *IntervalQuery) WithDataSource(opts ...func(*DataSourceQuery)) *IntervalQuery
WithDataSource tells the query-builder to eager-load the nodes that are connected to the "data_source" edge. The optional arguments are used to configure the query builder of the edge.
func (*IntervalQuery) WithStock ¶
func (iq *IntervalQuery) WithStock(opts ...func(*EntityQuery)) *IntervalQuery
WithStock tells the query-builder to eager-load the nodes that are connected to the "stock" edge. The optional arguments are used to configure the query builder of the edge.
func (*IntervalQuery) WithTrades ¶
func (iq *IntervalQuery) WithTrades(opts ...func(*TradeTimeRangeQuery)) *IntervalQuery
WithTrades tells the query-builder to eager-load the nodes that are connected to the "trades" edge. The optional arguments are used to configure the query builder of the edge.
type IntervalSelect ¶
type IntervalSelect struct { *IntervalQuery // contains filtered or unexported fields }
IntervalSelect is the builder for selecting fields of Interval entities.
func (*IntervalSelect) Aggregate ¶
func (is *IntervalSelect) Aggregate(fns ...AggregateFunc) *IntervalSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IntervalSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IntervalSelect) Scan ¶
func (is *IntervalSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IntervalSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IntervalUpdate ¶
type IntervalUpdate struct {
// contains filtered or unexported fields
}
IntervalUpdate is the builder for updating Interval entities.
func (*IntervalUpdate) AddBarIDs ¶
func (iu *IntervalUpdate) AddBarIDs(ids ...int) *IntervalUpdate
AddBarIDs adds the "bars" edge to the BarTimeRange entity by IDs.
func (*IntervalUpdate) AddBars ¶
func (iu *IntervalUpdate) AddBars(b ...*BarTimeRange) *IntervalUpdate
AddBars adds the "bars" edges to the BarTimeRange entity.
func (*IntervalUpdate) AddTradeIDs ¶
func (iu *IntervalUpdate) AddTradeIDs(ids ...int) *IntervalUpdate
AddTradeIDs adds the "trades" edge to the TradeTimeRange entity by IDs.
func (*IntervalUpdate) AddTrades ¶
func (iu *IntervalUpdate) AddTrades(t ...*TradeTimeRange) *IntervalUpdate
AddTrades adds the "trades" edges to the TradeTimeRange entity.
func (*IntervalUpdate) ClearBars ¶
func (iu *IntervalUpdate) ClearBars() *IntervalUpdate
ClearBars clears all "bars" edges to the BarTimeRange entity.
func (*IntervalUpdate) ClearDataSource ¶
func (iu *IntervalUpdate) ClearDataSource() *IntervalUpdate
ClearDataSource clears the "data_source" edge to the DataSource entity.
func (*IntervalUpdate) ClearStock ¶
func (iu *IntervalUpdate) ClearStock() *IntervalUpdate
ClearStock clears the "stock" edge to the Entity entity.
func (*IntervalUpdate) ClearTrades ¶
func (iu *IntervalUpdate) ClearTrades() *IntervalUpdate
ClearTrades clears all "trades" edges to the TradeTimeRange entity.
func (*IntervalUpdate) Exec ¶
func (iu *IntervalUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IntervalUpdate) ExecX ¶
func (iu *IntervalUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IntervalUpdate) Mutation ¶
func (iu *IntervalUpdate) Mutation() *IntervalMutation
Mutation returns the IntervalMutation object of the builder.
func (*IntervalUpdate) RemoveBarIDs ¶
func (iu *IntervalUpdate) RemoveBarIDs(ids ...int) *IntervalUpdate
RemoveBarIDs removes the "bars" edge to BarTimeRange entities by IDs.
func (*IntervalUpdate) RemoveBars ¶
func (iu *IntervalUpdate) RemoveBars(b ...*BarTimeRange) *IntervalUpdate
RemoveBars removes "bars" edges to BarTimeRange entities.
func (*IntervalUpdate) RemoveTradeIDs ¶
func (iu *IntervalUpdate) RemoveTradeIDs(ids ...int) *IntervalUpdate
RemoveTradeIDs removes the "trades" edge to TradeTimeRange entities by IDs.
func (*IntervalUpdate) RemoveTrades ¶
func (iu *IntervalUpdate) RemoveTrades(t ...*TradeTimeRange) *IntervalUpdate
RemoveTrades removes "trades" edges to TradeTimeRange entities.
func (*IntervalUpdate) Save ¶
func (iu *IntervalUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IntervalUpdate) SaveX ¶
func (iu *IntervalUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IntervalUpdate) SetActive ¶
func (iu *IntervalUpdate) SetActive(b bool) *IntervalUpdate
SetActive sets the "active" field.
func (*IntervalUpdate) SetDataSource ¶
func (iu *IntervalUpdate) SetDataSource(d *DataSource) *IntervalUpdate
SetDataSource sets the "data_source" edge to the DataSource entity.
func (*IntervalUpdate) SetDataSourceID ¶
func (iu *IntervalUpdate) SetDataSourceID(i int) *IntervalUpdate
SetDataSourceID sets the "data_source_id" field.
func (*IntervalUpdate) SetInterval ¶
func (iu *IntervalUpdate) SetInterval(i interval.Interval) *IntervalUpdate
SetInterval sets the "interval" field.
func (*IntervalUpdate) SetNillableActive ¶
func (iu *IntervalUpdate) SetNillableActive(b *bool) *IntervalUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*IntervalUpdate) SetStock ¶
func (iu *IntervalUpdate) SetStock(e *Entity) *IntervalUpdate
SetStock sets the "stock" edge to the Entity entity.
func (*IntervalUpdate) SetStockID ¶
func (iu *IntervalUpdate) SetStockID(i int) *IntervalUpdate
SetStockID sets the "stock_id" field.
func (*IntervalUpdate) Where ¶
func (iu *IntervalUpdate) Where(ps ...predicate.Interval) *IntervalUpdate
Where appends a list predicates to the IntervalUpdate builder.
type IntervalUpdateOne ¶
type IntervalUpdateOne struct {
// contains filtered or unexported fields
}
IntervalUpdateOne is the builder for updating a single Interval entity.
func (*IntervalUpdateOne) AddBarIDs ¶
func (iuo *IntervalUpdateOne) AddBarIDs(ids ...int) *IntervalUpdateOne
AddBarIDs adds the "bars" edge to the BarTimeRange entity by IDs.
func (*IntervalUpdateOne) AddBars ¶
func (iuo *IntervalUpdateOne) AddBars(b ...*BarTimeRange) *IntervalUpdateOne
AddBars adds the "bars" edges to the BarTimeRange entity.
func (*IntervalUpdateOne) AddTradeIDs ¶
func (iuo *IntervalUpdateOne) AddTradeIDs(ids ...int) *IntervalUpdateOne
AddTradeIDs adds the "trades" edge to the TradeTimeRange entity by IDs.
func (*IntervalUpdateOne) AddTrades ¶
func (iuo *IntervalUpdateOne) AddTrades(t ...*TradeTimeRange) *IntervalUpdateOne
AddTrades adds the "trades" edges to the TradeTimeRange entity.
func (*IntervalUpdateOne) ClearBars ¶
func (iuo *IntervalUpdateOne) ClearBars() *IntervalUpdateOne
ClearBars clears all "bars" edges to the BarTimeRange entity.
func (*IntervalUpdateOne) ClearDataSource ¶
func (iuo *IntervalUpdateOne) ClearDataSource() *IntervalUpdateOne
ClearDataSource clears the "data_source" edge to the DataSource entity.
func (*IntervalUpdateOne) ClearStock ¶
func (iuo *IntervalUpdateOne) ClearStock() *IntervalUpdateOne
ClearStock clears the "stock" edge to the Entity entity.
func (*IntervalUpdateOne) ClearTrades ¶
func (iuo *IntervalUpdateOne) ClearTrades() *IntervalUpdateOne
ClearTrades clears all "trades" edges to the TradeTimeRange entity.
func (*IntervalUpdateOne) Exec ¶
func (iuo *IntervalUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IntervalUpdateOne) ExecX ¶
func (iuo *IntervalUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IntervalUpdateOne) Mutation ¶
func (iuo *IntervalUpdateOne) Mutation() *IntervalMutation
Mutation returns the IntervalMutation object of the builder.
func (*IntervalUpdateOne) RemoveBarIDs ¶
func (iuo *IntervalUpdateOne) RemoveBarIDs(ids ...int) *IntervalUpdateOne
RemoveBarIDs removes the "bars" edge to BarTimeRange entities by IDs.
func (*IntervalUpdateOne) RemoveBars ¶
func (iuo *IntervalUpdateOne) RemoveBars(b ...*BarTimeRange) *IntervalUpdateOne
RemoveBars removes "bars" edges to BarTimeRange entities.
func (*IntervalUpdateOne) RemoveTradeIDs ¶
func (iuo *IntervalUpdateOne) RemoveTradeIDs(ids ...int) *IntervalUpdateOne
RemoveTradeIDs removes the "trades" edge to TradeTimeRange entities by IDs.
func (*IntervalUpdateOne) RemoveTrades ¶
func (iuo *IntervalUpdateOne) RemoveTrades(t ...*TradeTimeRange) *IntervalUpdateOne
RemoveTrades removes "trades" edges to TradeTimeRange entities.
func (*IntervalUpdateOne) Save ¶
func (iuo *IntervalUpdateOne) Save(ctx context.Context) (*Interval, error)
Save executes the query and returns the updated Interval entity.
func (*IntervalUpdateOne) SaveX ¶
func (iuo *IntervalUpdateOne) SaveX(ctx context.Context) *Interval
SaveX is like Save, but panics if an error occurs.
func (*IntervalUpdateOne) Select ¶
func (iuo *IntervalUpdateOne) Select(field string, fields ...string) *IntervalUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IntervalUpdateOne) SetActive ¶
func (iuo *IntervalUpdateOne) SetActive(b bool) *IntervalUpdateOne
SetActive sets the "active" field.
func (*IntervalUpdateOne) SetDataSource ¶
func (iuo *IntervalUpdateOne) SetDataSource(d *DataSource) *IntervalUpdateOne
SetDataSource sets the "data_source" edge to the DataSource entity.
func (*IntervalUpdateOne) SetDataSourceID ¶
func (iuo *IntervalUpdateOne) SetDataSourceID(i int) *IntervalUpdateOne
SetDataSourceID sets the "data_source_id" field.
func (*IntervalUpdateOne) SetInterval ¶
func (iuo *IntervalUpdateOne) SetInterval(i interval.Interval) *IntervalUpdateOne
SetInterval sets the "interval" field.
func (*IntervalUpdateOne) SetNillableActive ¶
func (iuo *IntervalUpdateOne) SetNillableActive(b *bool) *IntervalUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*IntervalUpdateOne) SetStock ¶
func (iuo *IntervalUpdateOne) SetStock(e *Entity) *IntervalUpdateOne
SetStock sets the "stock" edge to the Entity entity.
func (*IntervalUpdateOne) SetStockID ¶
func (iuo *IntervalUpdateOne) SetStockID(i int) *IntervalUpdateOne
SetStockID sets the "stock_id" field.
type MarketHours ¶
type MarketHours struct { // ID of the ent. ID int `json:"id,omitempty"` // Date holds the value of the "date" field. Date time.Time `json:"date,omitempty"` // StartTime holds the value of the "start_time" field. StartTime time.Time `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime time.Time `json:"end_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MarketHoursQuery when eager-loading is set. Edges MarketHoursEdges `json:"edges"` // contains filtered or unexported fields }
MarketHours is the model entity for the MarketHours schema.
func (*MarketHours) QueryMarketInfo ¶
func (mh *MarketHours) QueryMarketInfo() *MarketInfoQuery
QueryMarketInfo queries the "market_info" edge of the MarketHours entity.
func (*MarketHours) String ¶
func (mh *MarketHours) String() string
String implements the fmt.Stringer.
func (*MarketHours) Unwrap ¶
func (mh *MarketHours) Unwrap() *MarketHours
Unwrap unwraps the MarketHours 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 (*MarketHours) Update ¶
func (mh *MarketHours) Update() *MarketHoursUpdateOne
Update returns a builder for updating this MarketHours. Note that you need to call MarketHours.Unwrap() before calling this method if this MarketHours was returned from a transaction, and the transaction was committed or rolled back.
type MarketHoursClient ¶
type MarketHoursClient struct {
// contains filtered or unexported fields
}
MarketHoursClient is a client for the MarketHours schema.
func NewMarketHoursClient ¶
func NewMarketHoursClient(c config) *MarketHoursClient
NewMarketHoursClient returns a client for the MarketHours from the given config.
func (*MarketHoursClient) Create ¶
func (c *MarketHoursClient) Create() *MarketHoursCreate
Create returns a builder for creating a MarketHours entity.
func (*MarketHoursClient) CreateBulk ¶
func (c *MarketHoursClient) CreateBulk(builders ...*MarketHoursCreate) *MarketHoursCreateBulk
CreateBulk returns a builder for creating a bulk of MarketHours entities.
func (*MarketHoursClient) Delete ¶
func (c *MarketHoursClient) Delete() *MarketHoursDelete
Delete returns a delete builder for MarketHours.
func (*MarketHoursClient) DeleteOne ¶
func (c *MarketHoursClient) DeleteOne(mh *MarketHours) *MarketHoursDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MarketHoursClient) DeleteOneID ¶
func (c *MarketHoursClient) DeleteOneID(id int) *MarketHoursDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MarketHoursClient) Get ¶
func (c *MarketHoursClient) Get(ctx context.Context, id int) (*MarketHours, error)
Get returns a MarketHours entity by its id.
func (*MarketHoursClient) GetX ¶
func (c *MarketHoursClient) GetX(ctx context.Context, id int) *MarketHours
GetX is like Get, but panics if an error occurs.
func (*MarketHoursClient) Hooks ¶
func (c *MarketHoursClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MarketHoursClient) Intercept ¶
func (c *MarketHoursClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `markethours.Intercept(f(g(h())))`.
func (*MarketHoursClient) Interceptors ¶
func (c *MarketHoursClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MarketHoursClient) Query ¶
func (c *MarketHoursClient) Query() *MarketHoursQuery
Query returns a query builder for MarketHours.
func (*MarketHoursClient) QueryMarketInfo ¶
func (c *MarketHoursClient) QueryMarketInfo(mh *MarketHours) *MarketInfoQuery
QueryMarketInfo queries the market_info edge of a MarketHours.
func (*MarketHoursClient) Update ¶
func (c *MarketHoursClient) Update() *MarketHoursUpdate
Update returns an update builder for MarketHours.
func (*MarketHoursClient) UpdateOne ¶
func (c *MarketHoursClient) UpdateOne(mh *MarketHours) *MarketHoursUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MarketHoursClient) UpdateOneID ¶
func (c *MarketHoursClient) UpdateOneID(id int) *MarketHoursUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MarketHoursClient) Use ¶
func (c *MarketHoursClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `markethours.Hooks(f(g(h())))`.
type MarketHoursCreate ¶
type MarketHoursCreate struct {
// contains filtered or unexported fields
}
MarketHoursCreate is the builder for creating a MarketHours entity.
func (*MarketHoursCreate) Exec ¶
func (mhc *MarketHoursCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketHoursCreate) ExecX ¶
func (mhc *MarketHoursCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketHoursCreate) Mutation ¶
func (mhc *MarketHoursCreate) Mutation() *MarketHoursMutation
Mutation returns the MarketHoursMutation object of the builder.
func (*MarketHoursCreate) Save ¶
func (mhc *MarketHoursCreate) Save(ctx context.Context) (*MarketHours, error)
Save creates the MarketHours in the database.
func (*MarketHoursCreate) SaveX ¶
func (mhc *MarketHoursCreate) SaveX(ctx context.Context) *MarketHours
SaveX calls Save and panics if Save returns an error.
func (*MarketHoursCreate) SetDate ¶
func (mhc *MarketHoursCreate) SetDate(t time.Time) *MarketHoursCreate
SetDate sets the "date" field.
func (*MarketHoursCreate) SetEndTime ¶
func (mhc *MarketHoursCreate) SetEndTime(t time.Time) *MarketHoursCreate
SetEndTime sets the "end_time" field.
func (*MarketHoursCreate) SetMarketInfo ¶
func (mhc *MarketHoursCreate) SetMarketInfo(m *MarketInfo) *MarketHoursCreate
SetMarketInfo sets the "market_info" edge to the MarketInfo entity.
func (*MarketHoursCreate) SetMarketInfoID ¶
func (mhc *MarketHoursCreate) SetMarketInfoID(id int) *MarketHoursCreate
SetMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID.
func (*MarketHoursCreate) SetNillableMarketInfoID ¶
func (mhc *MarketHoursCreate) SetNillableMarketInfoID(id *int) *MarketHoursCreate
SetNillableMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID if the given value is not nil.
func (*MarketHoursCreate) SetStartTime ¶
func (mhc *MarketHoursCreate) SetStartTime(t time.Time) *MarketHoursCreate
SetStartTime sets the "start_time" field.
type MarketHoursCreateBulk ¶
type MarketHoursCreateBulk struct {
// contains filtered or unexported fields
}
MarketHoursCreateBulk is the builder for creating many MarketHours entities in bulk.
func (*MarketHoursCreateBulk) Exec ¶
func (mhcb *MarketHoursCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketHoursCreateBulk) ExecX ¶
func (mhcb *MarketHoursCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketHoursCreateBulk) Save ¶
func (mhcb *MarketHoursCreateBulk) Save(ctx context.Context) ([]*MarketHours, error)
Save creates the MarketHours entities in the database.
func (*MarketHoursCreateBulk) SaveX ¶
func (mhcb *MarketHoursCreateBulk) SaveX(ctx context.Context) []*MarketHours
SaveX is like Save, but panics if an error occurs.
type MarketHoursDelete ¶
type MarketHoursDelete struct {
// contains filtered or unexported fields
}
MarketHoursDelete is the builder for deleting a MarketHours entity.
func (*MarketHoursDelete) Exec ¶
func (mhd *MarketHoursDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MarketHoursDelete) ExecX ¶
func (mhd *MarketHoursDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MarketHoursDelete) Where ¶
func (mhd *MarketHoursDelete) Where(ps ...predicate.MarketHours) *MarketHoursDelete
Where appends a list predicates to the MarketHoursDelete builder.
type MarketHoursDeleteOne ¶
type MarketHoursDeleteOne struct {
// contains filtered or unexported fields
}
MarketHoursDeleteOne is the builder for deleting a single MarketHours entity.
func (*MarketHoursDeleteOne) Exec ¶
func (mhdo *MarketHoursDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MarketHoursDeleteOne) ExecX ¶
func (mhdo *MarketHoursDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MarketHoursEdges ¶
type MarketHoursEdges struct { // MarketInfo holds the value of the market_info edge. MarketInfo *MarketInfo `json:"market_info,omitempty"` // contains filtered or unexported fields }
MarketHoursEdges holds the relations/edges for other nodes in the graph.
func (MarketHoursEdges) MarketInfoOrErr ¶
func (e MarketHoursEdges) MarketInfoOrErr() (*MarketInfo, error)
MarketInfoOrErr returns the MarketInfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MarketHoursGroupBy ¶
type MarketHoursGroupBy struct {
// contains filtered or unexported fields
}
MarketHoursGroupBy is the group-by builder for MarketHours entities.
func (*MarketHoursGroupBy) Aggregate ¶
func (mhgb *MarketHoursGroupBy) Aggregate(fns ...AggregateFunc) *MarketHoursGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MarketHoursGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MarketHoursGroupBy) Scan ¶
func (mhgb *MarketHoursGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MarketHoursGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MarketHoursMutation ¶
type MarketHoursMutation struct {
// contains filtered or unexported fields
}
MarketHoursMutation represents an operation that mutates the MarketHours nodes in the graph.
func (*MarketHoursMutation) AddField ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) AddedEdges ¶
func (m *MarketHoursMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MarketHoursMutation) AddedField ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) AddedFields ¶
func (m *MarketHoursMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MarketHoursMutation) AddedIDs ¶
func (m *MarketHoursMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MarketHoursMutation) ClearEdge ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ClearField ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ClearMarketInfo ¶
func (m *MarketHoursMutation) ClearMarketInfo()
ClearMarketInfo clears the "market_info" edge to the MarketInfo entity.
func (*MarketHoursMutation) ClearedEdges ¶
func (m *MarketHoursMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MarketHoursMutation) ClearedFields ¶
func (m *MarketHoursMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MarketHoursMutation) Client ¶
func (m MarketHoursMutation) 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 (*MarketHoursMutation) Date ¶
func (m *MarketHoursMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*MarketHoursMutation) EdgeCleared ¶
func (m *MarketHoursMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MarketHoursMutation) EndTime ¶
func (m *MarketHoursMutation) EndTime() (r time.Time, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*MarketHoursMutation) Field ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) FieldCleared ¶
func (m *MarketHoursMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MarketHoursMutation) Fields ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ID ¶
func (m *MarketHoursMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MarketHoursMutation) IDs ¶
func (m *MarketHoursMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MarketHoursMutation) MarketInfoCleared ¶
func (m *MarketHoursMutation) MarketInfoCleared() bool
MarketInfoCleared reports if the "market_info" edge to the MarketInfo entity was cleared.
func (*MarketHoursMutation) MarketInfoID ¶
func (m *MarketHoursMutation) MarketInfoID() (id int, exists bool)
MarketInfoID returns the "market_info" edge ID in the mutation.
func (*MarketHoursMutation) MarketInfoIDs ¶
func (m *MarketHoursMutation) MarketInfoIDs() (ids []int)
MarketInfoIDs returns the "market_info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MarketInfoID instead. It exists only for internal usage by the builders.
func (*MarketHoursMutation) OldDate ¶
OldDate returns the old "date" field's value of the MarketHours entity. If the MarketHours 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 (*MarketHoursMutation) OldEndTime ¶
OldEndTime returns the old "end_time" field's value of the MarketHours entity. If the MarketHours 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 (*MarketHoursMutation) 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 (*MarketHoursMutation) OldStartTime ¶
OldStartTime returns the old "start_time" field's value of the MarketHours entity. If the MarketHours 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 (*MarketHoursMutation) Op ¶
func (m *MarketHoursMutation) Op() Op
Op returns the operation name.
func (*MarketHoursMutation) RemovedEdges ¶
func (m *MarketHoursMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MarketHoursMutation) RemovedIDs ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ResetDate ¶
func (m *MarketHoursMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*MarketHoursMutation) ResetEdge ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ResetEndTime ¶
func (m *MarketHoursMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*MarketHoursMutation) ResetField ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) ResetMarketInfo ¶
func (m *MarketHoursMutation) ResetMarketInfo()
ResetMarketInfo resets all changes to the "market_info" edge.
func (*MarketHoursMutation) ResetStartTime ¶
func (m *MarketHoursMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*MarketHoursMutation) SetDate ¶
func (m *MarketHoursMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*MarketHoursMutation) SetEndTime ¶
func (m *MarketHoursMutation) SetEndTime(t time.Time)
SetEndTime sets the "end_time" field.
func (*MarketHoursMutation) SetField ¶
func (m *MarketHoursMutation) 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 (*MarketHoursMutation) SetMarketInfoID ¶
func (m *MarketHoursMutation) SetMarketInfoID(id int)
SetMarketInfoID sets the "market_info" edge to the MarketInfo entity by id.
func (*MarketHoursMutation) SetOp ¶
func (m *MarketHoursMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MarketHoursMutation) SetStartTime ¶
func (m *MarketHoursMutation) SetStartTime(t time.Time)
SetStartTime sets the "start_time" field.
func (*MarketHoursMutation) StartTime ¶
func (m *MarketHoursMutation) StartTime() (r time.Time, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (MarketHoursMutation) Tx ¶
func (m MarketHoursMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MarketHoursMutation) Type ¶
func (m *MarketHoursMutation) Type() string
Type returns the node type of this mutation (MarketHours).
func (*MarketHoursMutation) Where ¶
func (m *MarketHoursMutation) Where(ps ...predicate.MarketHours)
Where appends a list predicates to the MarketHoursMutation builder.
func (*MarketHoursMutation) WhereP ¶
func (m *MarketHoursMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MarketHoursMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MarketHoursQuery ¶
type MarketHoursQuery struct {
// contains filtered or unexported fields
}
MarketHoursQuery is the builder for querying MarketHours entities.
func (*MarketHoursQuery) Aggregate ¶
func (mhq *MarketHoursQuery) Aggregate(fns ...AggregateFunc) *MarketHoursSelect
Aggregate returns a MarketHoursSelect configured with the given aggregations.
func (*MarketHoursQuery) All ¶
func (mhq *MarketHoursQuery) All(ctx context.Context) ([]*MarketHours, error)
All executes the query and returns a list of MarketHoursSlice.
func (*MarketHoursQuery) AllX ¶
func (mhq *MarketHoursQuery) AllX(ctx context.Context) []*MarketHours
AllX is like All, but panics if an error occurs.
func (*MarketHoursQuery) Clone ¶
func (mhq *MarketHoursQuery) Clone() *MarketHoursQuery
Clone returns a duplicate of the MarketHoursQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MarketHoursQuery) Count ¶
func (mhq *MarketHoursQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MarketHoursQuery) CountX ¶
func (mhq *MarketHoursQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MarketHoursQuery) Exist ¶
func (mhq *MarketHoursQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MarketHoursQuery) ExistX ¶
func (mhq *MarketHoursQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MarketHoursQuery) First ¶
func (mhq *MarketHoursQuery) First(ctx context.Context) (*MarketHours, error)
First returns the first MarketHours entity from the query. Returns a *NotFoundError when no MarketHours was found.
func (*MarketHoursQuery) FirstID ¶
func (mhq *MarketHoursQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MarketHours ID from the query. Returns a *NotFoundError when no MarketHours ID was found.
func (*MarketHoursQuery) FirstIDX ¶
func (mhq *MarketHoursQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MarketHoursQuery) FirstX ¶
func (mhq *MarketHoursQuery) FirstX(ctx context.Context) *MarketHours
FirstX is like First, but panics if an error occurs.
func (*MarketHoursQuery) GroupBy ¶
func (mhq *MarketHoursQuery) GroupBy(field string, fields ...string) *MarketHoursGroupBy
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 { Date time.Time `json:"date,omitempty"` Count int `json:"count,omitempty"` } client.MarketHours.Query(). GroupBy(markethours.FieldDate). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MarketHoursQuery) IDs ¶
func (mhq *MarketHoursQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MarketHours IDs.
func (*MarketHoursQuery) IDsX ¶
func (mhq *MarketHoursQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MarketHoursQuery) Limit ¶
func (mhq *MarketHoursQuery) Limit(limit int) *MarketHoursQuery
Limit the number of records to be returned by this query.
func (*MarketHoursQuery) Offset ¶
func (mhq *MarketHoursQuery) Offset(offset int) *MarketHoursQuery
Offset to start from.
func (*MarketHoursQuery) Only ¶
func (mhq *MarketHoursQuery) Only(ctx context.Context) (*MarketHours, error)
Only returns a single MarketHours entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MarketHours entity is found. Returns a *NotFoundError when no MarketHours entities are found.
func (*MarketHoursQuery) OnlyID ¶
func (mhq *MarketHoursQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MarketHours ID in the query. Returns a *NotSingularError when more than one MarketHours ID is found. Returns a *NotFoundError when no entities are found.
func (*MarketHoursQuery) OnlyIDX ¶
func (mhq *MarketHoursQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MarketHoursQuery) OnlyX ¶
func (mhq *MarketHoursQuery) OnlyX(ctx context.Context) *MarketHours
OnlyX is like Only, but panics if an error occurs.
func (*MarketHoursQuery) Order ¶
func (mhq *MarketHoursQuery) Order(o ...OrderFunc) *MarketHoursQuery
Order specifies how the records should be ordered.
func (*MarketHoursQuery) QueryMarketInfo ¶
func (mhq *MarketHoursQuery) QueryMarketInfo() *MarketInfoQuery
QueryMarketInfo chains the current query on the "market_info" edge.
func (*MarketHoursQuery) Select ¶
func (mhq *MarketHoursQuery) Select(fields ...string) *MarketHoursSelect
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 { Date time.Time `json:"date,omitempty"` } client.MarketHours.Query(). Select(markethours.FieldDate). Scan(ctx, &v)
func (*MarketHoursQuery) Unique ¶
func (mhq *MarketHoursQuery) Unique(unique bool) *MarketHoursQuery
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 (*MarketHoursQuery) Where ¶
func (mhq *MarketHoursQuery) Where(ps ...predicate.MarketHours) *MarketHoursQuery
Where adds a new predicate for the MarketHoursQuery builder.
func (*MarketHoursQuery) WithMarketInfo ¶
func (mhq *MarketHoursQuery) WithMarketInfo(opts ...func(*MarketInfoQuery)) *MarketHoursQuery
WithMarketInfo tells the query-builder to eager-load the nodes that are connected to the "market_info" edge. The optional arguments are used to configure the query builder of the edge.
type MarketHoursSelect ¶
type MarketHoursSelect struct { *MarketHoursQuery // contains filtered or unexported fields }
MarketHoursSelect is the builder for selecting fields of MarketHours entities.
func (*MarketHoursSelect) Aggregate ¶
func (mhs *MarketHoursSelect) Aggregate(fns ...AggregateFunc) *MarketHoursSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MarketHoursSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MarketHoursSelect) Scan ¶
func (mhs *MarketHoursSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MarketHoursSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MarketHoursSlice ¶
type MarketHoursSlice []*MarketHours
MarketHoursSlice is a parsable slice of MarketHours.
type MarketHoursUpdate ¶
type MarketHoursUpdate struct {
// contains filtered or unexported fields
}
MarketHoursUpdate is the builder for updating MarketHours entities.
func (*MarketHoursUpdate) ClearMarketInfo ¶
func (mhu *MarketHoursUpdate) ClearMarketInfo() *MarketHoursUpdate
ClearMarketInfo clears the "market_info" edge to the MarketInfo entity.
func (*MarketHoursUpdate) Exec ¶
func (mhu *MarketHoursUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketHoursUpdate) ExecX ¶
func (mhu *MarketHoursUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketHoursUpdate) Mutation ¶
func (mhu *MarketHoursUpdate) Mutation() *MarketHoursMutation
Mutation returns the MarketHoursMutation object of the builder.
func (*MarketHoursUpdate) Save ¶
func (mhu *MarketHoursUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MarketHoursUpdate) SaveX ¶
func (mhu *MarketHoursUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MarketHoursUpdate) SetDate ¶
func (mhu *MarketHoursUpdate) SetDate(t time.Time) *MarketHoursUpdate
SetDate sets the "date" field.
func (*MarketHoursUpdate) SetEndTime ¶
func (mhu *MarketHoursUpdate) SetEndTime(t time.Time) *MarketHoursUpdate
SetEndTime sets the "end_time" field.
func (*MarketHoursUpdate) SetMarketInfo ¶
func (mhu *MarketHoursUpdate) SetMarketInfo(m *MarketInfo) *MarketHoursUpdate
SetMarketInfo sets the "market_info" edge to the MarketInfo entity.
func (*MarketHoursUpdate) SetMarketInfoID ¶
func (mhu *MarketHoursUpdate) SetMarketInfoID(id int) *MarketHoursUpdate
SetMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID.
func (*MarketHoursUpdate) SetNillableMarketInfoID ¶
func (mhu *MarketHoursUpdate) SetNillableMarketInfoID(id *int) *MarketHoursUpdate
SetNillableMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID if the given value is not nil.
func (*MarketHoursUpdate) SetStartTime ¶
func (mhu *MarketHoursUpdate) SetStartTime(t time.Time) *MarketHoursUpdate
SetStartTime sets the "start_time" field.
func (*MarketHoursUpdate) Where ¶
func (mhu *MarketHoursUpdate) Where(ps ...predicate.MarketHours) *MarketHoursUpdate
Where appends a list predicates to the MarketHoursUpdate builder.
type MarketHoursUpdateOne ¶
type MarketHoursUpdateOne struct {
// contains filtered or unexported fields
}
MarketHoursUpdateOne is the builder for updating a single MarketHours entity.
func (*MarketHoursUpdateOne) ClearMarketInfo ¶
func (mhuo *MarketHoursUpdateOne) ClearMarketInfo() *MarketHoursUpdateOne
ClearMarketInfo clears the "market_info" edge to the MarketInfo entity.
func (*MarketHoursUpdateOne) Exec ¶
func (mhuo *MarketHoursUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MarketHoursUpdateOne) ExecX ¶
func (mhuo *MarketHoursUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketHoursUpdateOne) Mutation ¶
func (mhuo *MarketHoursUpdateOne) Mutation() *MarketHoursMutation
Mutation returns the MarketHoursMutation object of the builder.
func (*MarketHoursUpdateOne) Save ¶
func (mhuo *MarketHoursUpdateOne) Save(ctx context.Context) (*MarketHours, error)
Save executes the query and returns the updated MarketHours entity.
func (*MarketHoursUpdateOne) SaveX ¶
func (mhuo *MarketHoursUpdateOne) SaveX(ctx context.Context) *MarketHours
SaveX is like Save, but panics if an error occurs.
func (*MarketHoursUpdateOne) Select ¶
func (mhuo *MarketHoursUpdateOne) Select(field string, fields ...string) *MarketHoursUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MarketHoursUpdateOne) SetDate ¶
func (mhuo *MarketHoursUpdateOne) SetDate(t time.Time) *MarketHoursUpdateOne
SetDate sets the "date" field.
func (*MarketHoursUpdateOne) SetEndTime ¶
func (mhuo *MarketHoursUpdateOne) SetEndTime(t time.Time) *MarketHoursUpdateOne
SetEndTime sets the "end_time" field.
func (*MarketHoursUpdateOne) SetMarketInfo ¶
func (mhuo *MarketHoursUpdateOne) SetMarketInfo(m *MarketInfo) *MarketHoursUpdateOne
SetMarketInfo sets the "market_info" edge to the MarketInfo entity.
func (*MarketHoursUpdateOne) SetMarketInfoID ¶
func (mhuo *MarketHoursUpdateOne) SetMarketInfoID(id int) *MarketHoursUpdateOne
SetMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID.
func (*MarketHoursUpdateOne) SetNillableMarketInfoID ¶
func (mhuo *MarketHoursUpdateOne) SetNillableMarketInfoID(id *int) *MarketHoursUpdateOne
SetNillableMarketInfoID sets the "market_info" edge to the MarketInfo entity by ID if the given value is not nil.
func (*MarketHoursUpdateOne) SetStartTime ¶
func (mhuo *MarketHoursUpdateOne) SetStartTime(t time.Time) *MarketHoursUpdateOne
SetStartTime sets the "start_time" field.
type MarketInfo ¶
type MarketInfo struct { // ID of the ent. ID int `json:"id,omitempty"` // HoursStart holds the value of the "hours_start" field. HoursStart time.Time `json:"hours_start,omitempty"` // HoursEnd holds the value of the "hours_end" field. HoursEnd time.Time `json:"hours_end,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MarketInfoQuery when eager-loading is set. Edges MarketInfoEdges `json:"edges"` // contains filtered or unexported fields }
MarketInfo is the model entity for the MarketInfo schema.
func (*MarketInfo) QueryHours ¶
func (mi *MarketInfo) QueryHours() *MarketHoursQuery
QueryHours queries the "hours" edge of the MarketInfo entity.
func (*MarketInfo) String ¶
func (mi *MarketInfo) String() string
String implements the fmt.Stringer.
func (*MarketInfo) Unwrap ¶
func (mi *MarketInfo) Unwrap() *MarketInfo
Unwrap unwraps the MarketInfo 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 (*MarketInfo) Update ¶
func (mi *MarketInfo) Update() *MarketInfoUpdateOne
Update returns a builder for updating this MarketInfo. Note that you need to call MarketInfo.Unwrap() before calling this method if this MarketInfo was returned from a transaction, and the transaction was committed or rolled back.
type MarketInfoClient ¶
type MarketInfoClient struct {
// contains filtered or unexported fields
}
MarketInfoClient is a client for the MarketInfo schema.
func NewMarketInfoClient ¶
func NewMarketInfoClient(c config) *MarketInfoClient
NewMarketInfoClient returns a client for the MarketInfo from the given config.
func (*MarketInfoClient) Create ¶
func (c *MarketInfoClient) Create() *MarketInfoCreate
Create returns a builder for creating a MarketInfo entity.
func (*MarketInfoClient) CreateBulk ¶
func (c *MarketInfoClient) CreateBulk(builders ...*MarketInfoCreate) *MarketInfoCreateBulk
CreateBulk returns a builder for creating a bulk of MarketInfo entities.
func (*MarketInfoClient) Delete ¶
func (c *MarketInfoClient) Delete() *MarketInfoDelete
Delete returns a delete builder for MarketInfo.
func (*MarketInfoClient) DeleteOne ¶
func (c *MarketInfoClient) DeleteOne(mi *MarketInfo) *MarketInfoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MarketInfoClient) DeleteOneID ¶
func (c *MarketInfoClient) DeleteOneID(id int) *MarketInfoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MarketInfoClient) Get ¶
func (c *MarketInfoClient) Get(ctx context.Context, id int) (*MarketInfo, error)
Get returns a MarketInfo entity by its id.
func (*MarketInfoClient) GetX ¶
func (c *MarketInfoClient) GetX(ctx context.Context, id int) *MarketInfo
GetX is like Get, but panics if an error occurs.
func (*MarketInfoClient) Hooks ¶
func (c *MarketInfoClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MarketInfoClient) Intercept ¶
func (c *MarketInfoClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `marketinfo.Intercept(f(g(h())))`.
func (*MarketInfoClient) Interceptors ¶
func (c *MarketInfoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MarketInfoClient) Query ¶
func (c *MarketInfoClient) Query() *MarketInfoQuery
Query returns a query builder for MarketInfo.
func (*MarketInfoClient) QueryHours ¶
func (c *MarketInfoClient) QueryHours(mi *MarketInfo) *MarketHoursQuery
QueryHours queries the hours edge of a MarketInfo.
func (*MarketInfoClient) Update ¶
func (c *MarketInfoClient) Update() *MarketInfoUpdate
Update returns an update builder for MarketInfo.
func (*MarketInfoClient) UpdateOne ¶
func (c *MarketInfoClient) UpdateOne(mi *MarketInfo) *MarketInfoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MarketInfoClient) UpdateOneID ¶
func (c *MarketInfoClient) UpdateOneID(id int) *MarketInfoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MarketInfoClient) Use ¶
func (c *MarketInfoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `marketinfo.Hooks(f(g(h())))`.
type MarketInfoCreate ¶
type MarketInfoCreate struct {
// contains filtered or unexported fields
}
MarketInfoCreate is the builder for creating a MarketInfo entity.
func (*MarketInfoCreate) AddHourIDs ¶
func (mic *MarketInfoCreate) AddHourIDs(ids ...int) *MarketInfoCreate
AddHourIDs adds the "hours" edge to the MarketHours entity by IDs.
func (*MarketInfoCreate) AddHours ¶
func (mic *MarketInfoCreate) AddHours(m ...*MarketHours) *MarketInfoCreate
AddHours adds the "hours" edges to the MarketHours entity.
func (*MarketInfoCreate) Exec ¶
func (mic *MarketInfoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketInfoCreate) ExecX ¶
func (mic *MarketInfoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketInfoCreate) Mutation ¶
func (mic *MarketInfoCreate) Mutation() *MarketInfoMutation
Mutation returns the MarketInfoMutation object of the builder.
func (*MarketInfoCreate) Save ¶
func (mic *MarketInfoCreate) Save(ctx context.Context) (*MarketInfo, error)
Save creates the MarketInfo in the database.
func (*MarketInfoCreate) SaveX ¶
func (mic *MarketInfoCreate) SaveX(ctx context.Context) *MarketInfo
SaveX calls Save and panics if Save returns an error.
func (*MarketInfoCreate) SetHoursEnd ¶
func (mic *MarketInfoCreate) SetHoursEnd(t time.Time) *MarketInfoCreate
SetHoursEnd sets the "hours_end" field.
func (*MarketInfoCreate) SetHoursStart ¶
func (mic *MarketInfoCreate) SetHoursStart(t time.Time) *MarketInfoCreate
SetHoursStart sets the "hours_start" field.
type MarketInfoCreateBulk ¶
type MarketInfoCreateBulk struct {
// contains filtered or unexported fields
}
MarketInfoCreateBulk is the builder for creating many MarketInfo entities in bulk.
func (*MarketInfoCreateBulk) Exec ¶
func (micb *MarketInfoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketInfoCreateBulk) ExecX ¶
func (micb *MarketInfoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketInfoCreateBulk) Save ¶
func (micb *MarketInfoCreateBulk) Save(ctx context.Context) ([]*MarketInfo, error)
Save creates the MarketInfo entities in the database.
func (*MarketInfoCreateBulk) SaveX ¶
func (micb *MarketInfoCreateBulk) SaveX(ctx context.Context) []*MarketInfo
SaveX is like Save, but panics if an error occurs.
type MarketInfoDelete ¶
type MarketInfoDelete struct {
// contains filtered or unexported fields
}
MarketInfoDelete is the builder for deleting a MarketInfo entity.
func (*MarketInfoDelete) Exec ¶
func (mid *MarketInfoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MarketInfoDelete) ExecX ¶
func (mid *MarketInfoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MarketInfoDelete) Where ¶
func (mid *MarketInfoDelete) Where(ps ...predicate.MarketInfo) *MarketInfoDelete
Where appends a list predicates to the MarketInfoDelete builder.
type MarketInfoDeleteOne ¶
type MarketInfoDeleteOne struct {
// contains filtered or unexported fields
}
MarketInfoDeleteOne is the builder for deleting a single MarketInfo entity.
func (*MarketInfoDeleteOne) Exec ¶
func (mido *MarketInfoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MarketInfoDeleteOne) ExecX ¶
func (mido *MarketInfoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MarketInfoEdges ¶
type MarketInfoEdges struct { // Hours holds the value of the hours edge. Hours []*MarketHours `json:"hours,omitempty"` // contains filtered or unexported fields }
MarketInfoEdges holds the relations/edges for other nodes in the graph.
func (MarketInfoEdges) HoursOrErr ¶
func (e MarketInfoEdges) HoursOrErr() ([]*MarketHours, error)
HoursOrErr returns the Hours value or an error if the edge was not loaded in eager-loading.
type MarketInfoGroupBy ¶
type MarketInfoGroupBy struct {
// contains filtered or unexported fields
}
MarketInfoGroupBy is the group-by builder for MarketInfo entities.
func (*MarketInfoGroupBy) Aggregate ¶
func (migb *MarketInfoGroupBy) Aggregate(fns ...AggregateFunc) *MarketInfoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MarketInfoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MarketInfoGroupBy) Scan ¶
func (migb *MarketInfoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MarketInfoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MarketInfoMutation ¶
type MarketInfoMutation struct {
// contains filtered or unexported fields
}
MarketInfoMutation represents an operation that mutates the MarketInfo nodes in the graph.
func (*MarketInfoMutation) AddField ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) AddHourIDs ¶
func (m *MarketInfoMutation) AddHourIDs(ids ...int)
AddHourIDs adds the "hours" edge to the MarketHours entity by ids.
func (*MarketInfoMutation) AddedEdges ¶
func (m *MarketInfoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MarketInfoMutation) AddedField ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) AddedFields ¶
func (m *MarketInfoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MarketInfoMutation) AddedIDs ¶
func (m *MarketInfoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MarketInfoMutation) ClearEdge ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) ClearField ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) ClearHours ¶
func (m *MarketInfoMutation) ClearHours()
ClearHours clears the "hours" edge to the MarketHours entity.
func (*MarketInfoMutation) ClearedEdges ¶
func (m *MarketInfoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MarketInfoMutation) ClearedFields ¶
func (m *MarketInfoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MarketInfoMutation) Client ¶
func (m MarketInfoMutation) 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 (*MarketInfoMutation) EdgeCleared ¶
func (m *MarketInfoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MarketInfoMutation) Field ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) FieldCleared ¶
func (m *MarketInfoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MarketInfoMutation) Fields ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) HoursCleared ¶
func (m *MarketInfoMutation) HoursCleared() bool
HoursCleared reports if the "hours" edge to the MarketHours entity was cleared.
func (*MarketInfoMutation) HoursEnd ¶
func (m *MarketInfoMutation) HoursEnd() (r time.Time, exists bool)
HoursEnd returns the value of the "hours_end" field in the mutation.
func (*MarketInfoMutation) HoursIDs ¶
func (m *MarketInfoMutation) HoursIDs() (ids []int)
HoursIDs returns the "hours" edge IDs in the mutation.
func (*MarketInfoMutation) HoursStart ¶
func (m *MarketInfoMutation) HoursStart() (r time.Time, exists bool)
HoursStart returns the value of the "hours_start" field in the mutation.
func (*MarketInfoMutation) ID ¶
func (m *MarketInfoMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MarketInfoMutation) IDs ¶
func (m *MarketInfoMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MarketInfoMutation) 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 (*MarketInfoMutation) OldHoursEnd ¶
OldHoursEnd returns the old "hours_end" field's value of the MarketInfo entity. If the MarketInfo 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 (*MarketInfoMutation) OldHoursStart ¶
OldHoursStart returns the old "hours_start" field's value of the MarketInfo entity. If the MarketInfo 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 (*MarketInfoMutation) RemoveHourIDs ¶
func (m *MarketInfoMutation) RemoveHourIDs(ids ...int)
RemoveHourIDs removes the "hours" edge to the MarketHours entity by IDs.
func (*MarketInfoMutation) RemovedEdges ¶
func (m *MarketInfoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MarketInfoMutation) RemovedHoursIDs ¶
func (m *MarketInfoMutation) RemovedHoursIDs() (ids []int)
RemovedHours returns the removed IDs of the "hours" edge to the MarketHours entity.
func (*MarketInfoMutation) RemovedIDs ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) ResetEdge ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) ResetField ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) ResetHours ¶
func (m *MarketInfoMutation) ResetHours()
ResetHours resets all changes to the "hours" edge.
func (*MarketInfoMutation) ResetHoursEnd ¶
func (m *MarketInfoMutation) ResetHoursEnd()
ResetHoursEnd resets all changes to the "hours_end" field.
func (*MarketInfoMutation) ResetHoursStart ¶
func (m *MarketInfoMutation) ResetHoursStart()
ResetHoursStart resets all changes to the "hours_start" field.
func (*MarketInfoMutation) SetField ¶
func (m *MarketInfoMutation) 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 (*MarketInfoMutation) SetHoursEnd ¶
func (m *MarketInfoMutation) SetHoursEnd(t time.Time)
SetHoursEnd sets the "hours_end" field.
func (*MarketInfoMutation) SetHoursStart ¶
func (m *MarketInfoMutation) SetHoursStart(t time.Time)
SetHoursStart sets the "hours_start" field.
func (*MarketInfoMutation) SetOp ¶
func (m *MarketInfoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (MarketInfoMutation) Tx ¶
func (m MarketInfoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MarketInfoMutation) Type ¶
func (m *MarketInfoMutation) Type() string
Type returns the node type of this mutation (MarketInfo).
func (*MarketInfoMutation) Where ¶
func (m *MarketInfoMutation) Where(ps ...predicate.MarketInfo)
Where appends a list predicates to the MarketInfoMutation builder.
func (*MarketInfoMutation) WhereP ¶
func (m *MarketInfoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MarketInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MarketInfoQuery ¶
type MarketInfoQuery struct {
// contains filtered or unexported fields
}
MarketInfoQuery is the builder for querying MarketInfo entities.
func (*MarketInfoQuery) Aggregate ¶
func (miq *MarketInfoQuery) Aggregate(fns ...AggregateFunc) *MarketInfoSelect
Aggregate returns a MarketInfoSelect configured with the given aggregations.
func (*MarketInfoQuery) All ¶
func (miq *MarketInfoQuery) All(ctx context.Context) ([]*MarketInfo, error)
All executes the query and returns a list of MarketInfos.
func (*MarketInfoQuery) AllX ¶
func (miq *MarketInfoQuery) AllX(ctx context.Context) []*MarketInfo
AllX is like All, but panics if an error occurs.
func (*MarketInfoQuery) Clone ¶
func (miq *MarketInfoQuery) Clone() *MarketInfoQuery
Clone returns a duplicate of the MarketInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MarketInfoQuery) Count ¶
func (miq *MarketInfoQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MarketInfoQuery) CountX ¶
func (miq *MarketInfoQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MarketInfoQuery) Exist ¶
func (miq *MarketInfoQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MarketInfoQuery) ExistX ¶
func (miq *MarketInfoQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MarketInfoQuery) First ¶
func (miq *MarketInfoQuery) First(ctx context.Context) (*MarketInfo, error)
First returns the first MarketInfo entity from the query. Returns a *NotFoundError when no MarketInfo was found.
func (*MarketInfoQuery) FirstID ¶
func (miq *MarketInfoQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MarketInfo ID from the query. Returns a *NotFoundError when no MarketInfo ID was found.
func (*MarketInfoQuery) FirstIDX ¶
func (miq *MarketInfoQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MarketInfoQuery) FirstX ¶
func (miq *MarketInfoQuery) FirstX(ctx context.Context) *MarketInfo
FirstX is like First, but panics if an error occurs.
func (*MarketInfoQuery) GroupBy ¶
func (miq *MarketInfoQuery) GroupBy(field string, fields ...string) *MarketInfoGroupBy
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 { HoursStart time.Time `json:"hours_start,omitempty"` Count int `json:"count,omitempty"` } client.MarketInfo.Query(). GroupBy(marketinfo.FieldHoursStart). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MarketInfoQuery) IDs ¶
func (miq *MarketInfoQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MarketInfo IDs.
func (*MarketInfoQuery) IDsX ¶
func (miq *MarketInfoQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MarketInfoQuery) Limit ¶
func (miq *MarketInfoQuery) Limit(limit int) *MarketInfoQuery
Limit the number of records to be returned by this query.
func (*MarketInfoQuery) Offset ¶
func (miq *MarketInfoQuery) Offset(offset int) *MarketInfoQuery
Offset to start from.
func (*MarketInfoQuery) Only ¶
func (miq *MarketInfoQuery) Only(ctx context.Context) (*MarketInfo, error)
Only returns a single MarketInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MarketInfo entity is found. Returns a *NotFoundError when no MarketInfo entities are found.
func (*MarketInfoQuery) OnlyID ¶
func (miq *MarketInfoQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MarketInfo ID in the query. Returns a *NotSingularError when more than one MarketInfo ID is found. Returns a *NotFoundError when no entities are found.
func (*MarketInfoQuery) OnlyIDX ¶
func (miq *MarketInfoQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MarketInfoQuery) OnlyX ¶
func (miq *MarketInfoQuery) OnlyX(ctx context.Context) *MarketInfo
OnlyX is like Only, but panics if an error occurs.
func (*MarketInfoQuery) Order ¶
func (miq *MarketInfoQuery) Order(o ...OrderFunc) *MarketInfoQuery
Order specifies how the records should be ordered.
func (*MarketInfoQuery) QueryHours ¶
func (miq *MarketInfoQuery) QueryHours() *MarketHoursQuery
QueryHours chains the current query on the "hours" edge.
func (*MarketInfoQuery) Select ¶
func (miq *MarketInfoQuery) Select(fields ...string) *MarketInfoSelect
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 { HoursStart time.Time `json:"hours_start,omitempty"` } client.MarketInfo.Query(). Select(marketinfo.FieldHoursStart). Scan(ctx, &v)
func (*MarketInfoQuery) Unique ¶
func (miq *MarketInfoQuery) Unique(unique bool) *MarketInfoQuery
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 (*MarketInfoQuery) Where ¶
func (miq *MarketInfoQuery) Where(ps ...predicate.MarketInfo) *MarketInfoQuery
Where adds a new predicate for the MarketInfoQuery builder.
func (*MarketInfoQuery) WithHours ¶
func (miq *MarketInfoQuery) WithHours(opts ...func(*MarketHoursQuery)) *MarketInfoQuery
WithHours tells the query-builder to eager-load the nodes that are connected to the "hours" edge. The optional arguments are used to configure the query builder of the edge.
type MarketInfoSelect ¶
type MarketInfoSelect struct { *MarketInfoQuery // contains filtered or unexported fields }
MarketInfoSelect is the builder for selecting fields of MarketInfo entities.
func (*MarketInfoSelect) Aggregate ¶
func (mis *MarketInfoSelect) Aggregate(fns ...AggregateFunc) *MarketInfoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MarketInfoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MarketInfoSelect) Scan ¶
func (mis *MarketInfoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MarketInfoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MarketInfoUpdate ¶
type MarketInfoUpdate struct {
// contains filtered or unexported fields
}
MarketInfoUpdate is the builder for updating MarketInfo entities.
func (*MarketInfoUpdate) AddHourIDs ¶
func (miu *MarketInfoUpdate) AddHourIDs(ids ...int) *MarketInfoUpdate
AddHourIDs adds the "hours" edge to the MarketHours entity by IDs.
func (*MarketInfoUpdate) AddHours ¶
func (miu *MarketInfoUpdate) AddHours(m ...*MarketHours) *MarketInfoUpdate
AddHours adds the "hours" edges to the MarketHours entity.
func (*MarketInfoUpdate) ClearHours ¶
func (miu *MarketInfoUpdate) ClearHours() *MarketInfoUpdate
ClearHours clears all "hours" edges to the MarketHours entity.
func (*MarketInfoUpdate) Exec ¶
func (miu *MarketInfoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MarketInfoUpdate) ExecX ¶
func (miu *MarketInfoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketInfoUpdate) Mutation ¶
func (miu *MarketInfoUpdate) Mutation() *MarketInfoMutation
Mutation returns the MarketInfoMutation object of the builder.
func (*MarketInfoUpdate) RemoveHourIDs ¶
func (miu *MarketInfoUpdate) RemoveHourIDs(ids ...int) *MarketInfoUpdate
RemoveHourIDs removes the "hours" edge to MarketHours entities by IDs.
func (*MarketInfoUpdate) RemoveHours ¶
func (miu *MarketInfoUpdate) RemoveHours(m ...*MarketHours) *MarketInfoUpdate
RemoveHours removes "hours" edges to MarketHours entities.
func (*MarketInfoUpdate) Save ¶
func (miu *MarketInfoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MarketInfoUpdate) SaveX ¶
func (miu *MarketInfoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MarketInfoUpdate) SetHoursEnd ¶
func (miu *MarketInfoUpdate) SetHoursEnd(t time.Time) *MarketInfoUpdate
SetHoursEnd sets the "hours_end" field.
func (*MarketInfoUpdate) SetHoursStart ¶
func (miu *MarketInfoUpdate) SetHoursStart(t time.Time) *MarketInfoUpdate
SetHoursStart sets the "hours_start" field.
func (*MarketInfoUpdate) Where ¶
func (miu *MarketInfoUpdate) Where(ps ...predicate.MarketInfo) *MarketInfoUpdate
Where appends a list predicates to the MarketInfoUpdate builder.
type MarketInfoUpdateOne ¶
type MarketInfoUpdateOne struct {
// contains filtered or unexported fields
}
MarketInfoUpdateOne is the builder for updating a single MarketInfo entity.
func (*MarketInfoUpdateOne) AddHourIDs ¶
func (miuo *MarketInfoUpdateOne) AddHourIDs(ids ...int) *MarketInfoUpdateOne
AddHourIDs adds the "hours" edge to the MarketHours entity by IDs.
func (*MarketInfoUpdateOne) AddHours ¶
func (miuo *MarketInfoUpdateOne) AddHours(m ...*MarketHours) *MarketInfoUpdateOne
AddHours adds the "hours" edges to the MarketHours entity.
func (*MarketInfoUpdateOne) ClearHours ¶
func (miuo *MarketInfoUpdateOne) ClearHours() *MarketInfoUpdateOne
ClearHours clears all "hours" edges to the MarketHours entity.
func (*MarketInfoUpdateOne) Exec ¶
func (miuo *MarketInfoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MarketInfoUpdateOne) ExecX ¶
func (miuo *MarketInfoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MarketInfoUpdateOne) Mutation ¶
func (miuo *MarketInfoUpdateOne) Mutation() *MarketInfoMutation
Mutation returns the MarketInfoMutation object of the builder.
func (*MarketInfoUpdateOne) RemoveHourIDs ¶
func (miuo *MarketInfoUpdateOne) RemoveHourIDs(ids ...int) *MarketInfoUpdateOne
RemoveHourIDs removes the "hours" edge to MarketHours entities by IDs.
func (*MarketInfoUpdateOne) RemoveHours ¶
func (miuo *MarketInfoUpdateOne) RemoveHours(m ...*MarketHours) *MarketInfoUpdateOne
RemoveHours removes "hours" edges to MarketHours entities.
func (*MarketInfoUpdateOne) Save ¶
func (miuo *MarketInfoUpdateOne) Save(ctx context.Context) (*MarketInfo, error)
Save executes the query and returns the updated MarketInfo entity.
func (*MarketInfoUpdateOne) SaveX ¶
func (miuo *MarketInfoUpdateOne) SaveX(ctx context.Context) *MarketInfo
SaveX is like Save, but panics if an error occurs.
func (*MarketInfoUpdateOne) Select ¶
func (miuo *MarketInfoUpdateOne) Select(field string, fields ...string) *MarketInfoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MarketInfoUpdateOne) SetHoursEnd ¶
func (miuo *MarketInfoUpdateOne) SetHoursEnd(t time.Time) *MarketInfoUpdateOne
SetHoursEnd sets the "hours_end" field.
func (*MarketInfoUpdateOne) SetHoursStart ¶
func (miuo *MarketInfoUpdateOne) SetHoursStart(t time.Time) *MarketInfoUpdateOne
SetHoursStart sets the "hours_start" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 Split ¶
type Split struct { // ID of the ent. ID int `json:"id,omitempty"` // ExecutionDate holds the value of the "execution_date" field. ExecutionDate time.Time `json:"execution_date,omitempty"` // From holds the value of the "from" field. From float64 `json:"from,omitempty"` // To holds the value of the "to" field. To float64 `json:"to,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SplitQuery when eager-loading is set. Edges SplitEdges `json:"edges"` // contains filtered or unexported fields }
Split is the model entity for the Split schema.
func (*Split) QueryStock ¶
func (s *Split) QueryStock() *EntityQuery
QueryStock queries the "stock" edge of the Split entity.
func (*Split) Unwrap ¶
Unwrap unwraps the Split 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 (*Split) Update ¶
func (s *Split) Update() *SplitUpdateOne
Update returns a builder for updating this Split. Note that you need to call Split.Unwrap() before calling this method if this Split was returned from a transaction, and the transaction was committed or rolled back.
type SplitClient ¶
type SplitClient struct {
// contains filtered or unexported fields
}
SplitClient is a client for the Split schema.
func NewSplitClient ¶
func NewSplitClient(c config) *SplitClient
NewSplitClient returns a client for the Split from the given config.
func (*SplitClient) Create ¶
func (c *SplitClient) Create() *SplitCreate
Create returns a builder for creating a Split entity.
func (*SplitClient) CreateBulk ¶
func (c *SplitClient) CreateBulk(builders ...*SplitCreate) *SplitCreateBulk
CreateBulk returns a builder for creating a bulk of Split entities.
func (*SplitClient) Delete ¶
func (c *SplitClient) Delete() *SplitDelete
Delete returns a delete builder for Split.
func (*SplitClient) DeleteOne ¶
func (c *SplitClient) DeleteOne(s *Split) *SplitDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SplitClient) DeleteOneID ¶
func (c *SplitClient) DeleteOneID(id int) *SplitDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SplitClient) GetX ¶
func (c *SplitClient) GetX(ctx context.Context, id int) *Split
GetX is like Get, but panics if an error occurs.
func (*SplitClient) Intercept ¶
func (c *SplitClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `split.Intercept(f(g(h())))`.
func (*SplitClient) Interceptors ¶
func (c *SplitClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SplitClient) Query ¶
func (c *SplitClient) Query() *SplitQuery
Query returns a query builder for Split.
func (*SplitClient) QueryStock ¶
func (c *SplitClient) QueryStock(s *Split) *EntityQuery
QueryStock queries the stock edge of a Split.
func (*SplitClient) Update ¶
func (c *SplitClient) Update() *SplitUpdate
Update returns an update builder for Split.
func (*SplitClient) UpdateOne ¶
func (c *SplitClient) UpdateOne(s *Split) *SplitUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SplitClient) UpdateOneID ¶
func (c *SplitClient) UpdateOneID(id int) *SplitUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SplitClient) Use ¶
func (c *SplitClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `split.Hooks(f(g(h())))`.
type SplitCreate ¶
type SplitCreate struct {
// contains filtered or unexported fields
}
SplitCreate is the builder for creating a Split entity.
func (*SplitCreate) Exec ¶
func (sc *SplitCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SplitCreate) ExecX ¶
func (sc *SplitCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SplitCreate) Mutation ¶
func (sc *SplitCreate) Mutation() *SplitMutation
Mutation returns the SplitMutation object of the builder.
func (*SplitCreate) Save ¶
func (sc *SplitCreate) Save(ctx context.Context) (*Split, error)
Save creates the Split in the database.
func (*SplitCreate) SaveX ¶
func (sc *SplitCreate) SaveX(ctx context.Context) *Split
SaveX calls Save and panics if Save returns an error.
func (*SplitCreate) SetExecutionDate ¶
func (sc *SplitCreate) SetExecutionDate(t time.Time) *SplitCreate
SetExecutionDate sets the "execution_date" field.
func (*SplitCreate) SetFrom ¶
func (sc *SplitCreate) SetFrom(f float64) *SplitCreate
SetFrom sets the "from" field.
func (*SplitCreate) SetNillableStockID ¶
func (sc *SplitCreate) SetNillableStockID(id *int) *SplitCreate
SetNillableStockID sets the "stock" edge to the Entity entity by ID if the given value is not nil.
func (*SplitCreate) SetStock ¶
func (sc *SplitCreate) SetStock(e *Entity) *SplitCreate
SetStock sets the "stock" edge to the Entity entity.
func (*SplitCreate) SetStockID ¶
func (sc *SplitCreate) SetStockID(id int) *SplitCreate
SetStockID sets the "stock" edge to the Entity entity by ID.
func (*SplitCreate) SetTo ¶
func (sc *SplitCreate) SetTo(f float64) *SplitCreate
SetTo sets the "to" field.
type SplitCreateBulk ¶
type SplitCreateBulk struct {
// contains filtered or unexported fields
}
SplitCreateBulk is the builder for creating many Split entities in bulk.
func (*SplitCreateBulk) Exec ¶
func (scb *SplitCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SplitCreateBulk) ExecX ¶
func (scb *SplitCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SplitDelete ¶
type SplitDelete struct {
// contains filtered or unexported fields
}
SplitDelete is the builder for deleting a Split entity.
func (*SplitDelete) Exec ¶
func (sd *SplitDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SplitDelete) ExecX ¶
func (sd *SplitDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SplitDelete) Where ¶
func (sd *SplitDelete) Where(ps ...predicate.Split) *SplitDelete
Where appends a list predicates to the SplitDelete builder.
type SplitDeleteOne ¶
type SplitDeleteOne struct {
// contains filtered or unexported fields
}
SplitDeleteOne is the builder for deleting a single Split entity.
func (*SplitDeleteOne) Exec ¶
func (sdo *SplitDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SplitDeleteOne) ExecX ¶
func (sdo *SplitDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SplitEdges ¶
type SplitEdges struct { // Stock holds the value of the stock edge. Stock *Entity `json:"stock,omitempty"` // contains filtered or unexported fields }
SplitEdges holds the relations/edges for other nodes in the graph.
func (SplitEdges) StockOrErr ¶
func (e SplitEdges) StockOrErr() (*Entity, error)
StockOrErr returns the Stock value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SplitGroupBy ¶
type SplitGroupBy struct {
// contains filtered or unexported fields
}
SplitGroupBy is the group-by builder for Split entities.
func (*SplitGroupBy) Aggregate ¶
func (sgb *SplitGroupBy) Aggregate(fns ...AggregateFunc) *SplitGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SplitGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SplitGroupBy) Scan ¶
func (sgb *SplitGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SplitGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SplitMutation ¶
type SplitMutation struct {
// contains filtered or unexported fields
}
SplitMutation represents an operation that mutates the Split nodes in the graph.
func (*SplitMutation) AddField ¶
func (m *SplitMutation) 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 (*SplitMutation) AddFrom ¶
func (m *SplitMutation) AddFrom(f float64)
AddFrom adds f to the "from" field.
func (*SplitMutation) AddTo ¶
func (m *SplitMutation) AddTo(f float64)
AddTo adds f to the "to" field.
func (*SplitMutation) AddedEdges ¶
func (m *SplitMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SplitMutation) AddedField ¶
func (m *SplitMutation) 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 (*SplitMutation) AddedFields ¶
func (m *SplitMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SplitMutation) AddedFrom ¶
func (m *SplitMutation) AddedFrom() (r float64, exists bool)
AddedFrom returns the value that was added to the "from" field in this mutation.
func (*SplitMutation) AddedIDs ¶
func (m *SplitMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SplitMutation) AddedTo ¶
func (m *SplitMutation) AddedTo() (r float64, exists bool)
AddedTo returns the value that was added to the "to" field in this mutation.
func (*SplitMutation) ClearEdge ¶
func (m *SplitMutation) 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 (*SplitMutation) ClearField ¶
func (m *SplitMutation) 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 (*SplitMutation) ClearStock ¶
func (m *SplitMutation) ClearStock()
ClearStock clears the "stock" edge to the Entity entity.
func (*SplitMutation) ClearedEdges ¶
func (m *SplitMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SplitMutation) ClearedFields ¶
func (m *SplitMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SplitMutation) Client ¶
func (m SplitMutation) 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 (*SplitMutation) EdgeCleared ¶
func (m *SplitMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SplitMutation) ExecutionDate ¶
func (m *SplitMutation) ExecutionDate() (r time.Time, exists bool)
ExecutionDate returns the value of the "execution_date" field in the mutation.
func (*SplitMutation) Field ¶
func (m *SplitMutation) 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 (*SplitMutation) FieldCleared ¶
func (m *SplitMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SplitMutation) Fields ¶
func (m *SplitMutation) 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 (*SplitMutation) From ¶
func (m *SplitMutation) From() (r float64, exists bool)
From returns the value of the "from" field in the mutation.
func (*SplitMutation) ID ¶
func (m *SplitMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SplitMutation) IDs ¶
func (m *SplitMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SplitMutation) OldExecutionDate ¶
OldExecutionDate returns the old "execution_date" field's value of the Split entity. If the Split 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 (*SplitMutation) 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 (*SplitMutation) OldFrom ¶
func (m *SplitMutation) OldFrom(ctx context.Context) (v float64, err error)
OldFrom returns the old "from" field's value of the Split entity. If the Split 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 (*SplitMutation) OldTo ¶
func (m *SplitMutation) OldTo(ctx context.Context) (v float64, err error)
OldTo returns the old "to" field's value of the Split entity. If the Split 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 (*SplitMutation) RemovedEdges ¶
func (m *SplitMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SplitMutation) RemovedIDs ¶
func (m *SplitMutation) 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 (*SplitMutation) ResetEdge ¶
func (m *SplitMutation) 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 (*SplitMutation) ResetExecutionDate ¶
func (m *SplitMutation) ResetExecutionDate()
ResetExecutionDate resets all changes to the "execution_date" field.
func (*SplitMutation) ResetField ¶
func (m *SplitMutation) 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 (*SplitMutation) ResetFrom ¶
func (m *SplitMutation) ResetFrom()
ResetFrom resets all changes to the "from" field.
func (*SplitMutation) ResetStock ¶
func (m *SplitMutation) ResetStock()
ResetStock resets all changes to the "stock" edge.
func (*SplitMutation) ResetTo ¶
func (m *SplitMutation) ResetTo()
ResetTo resets all changes to the "to" field.
func (*SplitMutation) SetExecutionDate ¶
func (m *SplitMutation) SetExecutionDate(t time.Time)
SetExecutionDate sets the "execution_date" field.
func (*SplitMutation) SetField ¶
func (m *SplitMutation) 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 (*SplitMutation) SetFrom ¶
func (m *SplitMutation) SetFrom(f float64)
SetFrom sets the "from" field.
func (*SplitMutation) SetOp ¶
func (m *SplitMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SplitMutation) SetStockID ¶
func (m *SplitMutation) SetStockID(id int)
SetStockID sets the "stock" edge to the Entity entity by id.
func (*SplitMutation) StockCleared ¶
func (m *SplitMutation) StockCleared() bool
StockCleared reports if the "stock" edge to the Entity entity was cleared.
func (*SplitMutation) StockID ¶
func (m *SplitMutation) StockID() (id int, exists bool)
StockID returns the "stock" edge ID in the mutation.
func (*SplitMutation) StockIDs ¶
func (m *SplitMutation) StockIDs() (ids []int)
StockIDs returns the "stock" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StockID instead. It exists only for internal usage by the builders.
func (*SplitMutation) To ¶
func (m *SplitMutation) To() (r float64, exists bool)
To returns the value of the "to" field in the mutation.
func (SplitMutation) Tx ¶
func (m SplitMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SplitMutation) Type ¶
func (m *SplitMutation) Type() string
Type returns the node type of this mutation (Split).
func (*SplitMutation) Where ¶
func (m *SplitMutation) Where(ps ...predicate.Split)
Where appends a list predicates to the SplitMutation builder.
func (*SplitMutation) WhereP ¶
func (m *SplitMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SplitMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SplitQuery ¶
type SplitQuery struct {
// contains filtered or unexported fields
}
SplitQuery is the builder for querying Split entities.
func (*SplitQuery) Aggregate ¶
func (sq *SplitQuery) Aggregate(fns ...AggregateFunc) *SplitSelect
Aggregate returns a SplitSelect configured with the given aggregations.
func (*SplitQuery) All ¶
func (sq *SplitQuery) All(ctx context.Context) ([]*Split, error)
All executes the query and returns a list of Splits.
func (*SplitQuery) AllX ¶
func (sq *SplitQuery) AllX(ctx context.Context) []*Split
AllX is like All, but panics if an error occurs.
func (*SplitQuery) Clone ¶
func (sq *SplitQuery) Clone() *SplitQuery
Clone returns a duplicate of the SplitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SplitQuery) Count ¶
func (sq *SplitQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SplitQuery) CountX ¶
func (sq *SplitQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SplitQuery) Exist ¶
func (sq *SplitQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SplitQuery) ExistX ¶
func (sq *SplitQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SplitQuery) First ¶
func (sq *SplitQuery) First(ctx context.Context) (*Split, error)
First returns the first Split entity from the query. Returns a *NotFoundError when no Split was found.
func (*SplitQuery) FirstID ¶
func (sq *SplitQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Split ID from the query. Returns a *NotFoundError when no Split ID was found.
func (*SplitQuery) FirstIDX ¶
func (sq *SplitQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SplitQuery) FirstX ¶
func (sq *SplitQuery) FirstX(ctx context.Context) *Split
FirstX is like First, but panics if an error occurs.
func (*SplitQuery) GroupBy ¶
func (sq *SplitQuery) GroupBy(field string, fields ...string) *SplitGroupBy
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 { ExecutionDate time.Time `json:"execution_date,omitempty"` Count int `json:"count,omitempty"` } client.Split.Query(). GroupBy(split.FieldExecutionDate). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SplitQuery) IDs ¶
func (sq *SplitQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Split IDs.
func (*SplitQuery) IDsX ¶
func (sq *SplitQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SplitQuery) Limit ¶
func (sq *SplitQuery) Limit(limit int) *SplitQuery
Limit the number of records to be returned by this query.
func (*SplitQuery) Offset ¶
func (sq *SplitQuery) Offset(offset int) *SplitQuery
Offset to start from.
func (*SplitQuery) Only ¶
func (sq *SplitQuery) Only(ctx context.Context) (*Split, error)
Only returns a single Split entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Split entity is found. Returns a *NotFoundError when no Split entities are found.
func (*SplitQuery) OnlyID ¶
func (sq *SplitQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Split ID in the query. Returns a *NotSingularError when more than one Split ID is found. Returns a *NotFoundError when no entities are found.
func (*SplitQuery) OnlyIDX ¶
func (sq *SplitQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SplitQuery) OnlyX ¶
func (sq *SplitQuery) OnlyX(ctx context.Context) *Split
OnlyX is like Only, but panics if an error occurs.
func (*SplitQuery) Order ¶
func (sq *SplitQuery) Order(o ...OrderFunc) *SplitQuery
Order specifies how the records should be ordered.
func (*SplitQuery) QueryStock ¶
func (sq *SplitQuery) QueryStock() *EntityQuery
QueryStock chains the current query on the "stock" edge.
func (*SplitQuery) Select ¶
func (sq *SplitQuery) Select(fields ...string) *SplitSelect
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 { ExecutionDate time.Time `json:"execution_date,omitempty"` } client.Split.Query(). Select(split.FieldExecutionDate). Scan(ctx, &v)
func (*SplitQuery) Unique ¶
func (sq *SplitQuery) Unique(unique bool) *SplitQuery
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 (*SplitQuery) Where ¶
func (sq *SplitQuery) Where(ps ...predicate.Split) *SplitQuery
Where adds a new predicate for the SplitQuery builder.
func (*SplitQuery) WithStock ¶
func (sq *SplitQuery) WithStock(opts ...func(*EntityQuery)) *SplitQuery
WithStock tells the query-builder to eager-load the nodes that are connected to the "stock" edge. The optional arguments are used to configure the query builder of the edge.
type SplitSelect ¶
type SplitSelect struct { *SplitQuery // contains filtered or unexported fields }
SplitSelect is the builder for selecting fields of Split entities.
func (*SplitSelect) Aggregate ¶
func (ss *SplitSelect) Aggregate(fns ...AggregateFunc) *SplitSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SplitSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SplitSelect) Scan ¶
func (ss *SplitSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SplitSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SplitUpdate ¶
type SplitUpdate struct {
// contains filtered or unexported fields
}
SplitUpdate is the builder for updating Split entities.
func (*SplitUpdate) AddFrom ¶
func (su *SplitUpdate) AddFrom(f float64) *SplitUpdate
AddFrom adds f to the "from" field.
func (*SplitUpdate) AddTo ¶
func (su *SplitUpdate) AddTo(f float64) *SplitUpdate
AddTo adds f to the "to" field.
func (*SplitUpdate) ClearStock ¶
func (su *SplitUpdate) ClearStock() *SplitUpdate
ClearStock clears the "stock" edge to the Entity entity.
func (*SplitUpdate) Exec ¶
func (su *SplitUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SplitUpdate) ExecX ¶
func (su *SplitUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SplitUpdate) Mutation ¶
func (su *SplitUpdate) Mutation() *SplitMutation
Mutation returns the SplitMutation object of the builder.
func (*SplitUpdate) Save ¶
func (su *SplitUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SplitUpdate) SaveX ¶
func (su *SplitUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SplitUpdate) SetExecutionDate ¶
func (su *SplitUpdate) SetExecutionDate(t time.Time) *SplitUpdate
SetExecutionDate sets the "execution_date" field.
func (*SplitUpdate) SetFrom ¶
func (su *SplitUpdate) SetFrom(f float64) *SplitUpdate
SetFrom sets the "from" field.
func (*SplitUpdate) SetNillableStockID ¶
func (su *SplitUpdate) SetNillableStockID(id *int) *SplitUpdate
SetNillableStockID sets the "stock" edge to the Entity entity by ID if the given value is not nil.
func (*SplitUpdate) SetStock ¶
func (su *SplitUpdate) SetStock(e *Entity) *SplitUpdate
SetStock sets the "stock" edge to the Entity entity.
func (*SplitUpdate) SetStockID ¶
func (su *SplitUpdate) SetStockID(id int) *SplitUpdate
SetStockID sets the "stock" edge to the Entity entity by ID.
func (*SplitUpdate) SetTo ¶
func (su *SplitUpdate) SetTo(f float64) *SplitUpdate
SetTo sets the "to" field.
func (*SplitUpdate) Where ¶
func (su *SplitUpdate) Where(ps ...predicate.Split) *SplitUpdate
Where appends a list predicates to the SplitUpdate builder.
type SplitUpdateOne ¶
type SplitUpdateOne struct {
// contains filtered or unexported fields
}
SplitUpdateOne is the builder for updating a single Split entity.
func (*SplitUpdateOne) AddFrom ¶
func (suo *SplitUpdateOne) AddFrom(f float64) *SplitUpdateOne
AddFrom adds f to the "from" field.
func (*SplitUpdateOne) AddTo ¶
func (suo *SplitUpdateOne) AddTo(f float64) *SplitUpdateOne
AddTo adds f to the "to" field.
func (*SplitUpdateOne) ClearStock ¶
func (suo *SplitUpdateOne) ClearStock() *SplitUpdateOne
ClearStock clears the "stock" edge to the Entity entity.
func (*SplitUpdateOne) Exec ¶
func (suo *SplitUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SplitUpdateOne) ExecX ¶
func (suo *SplitUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SplitUpdateOne) Mutation ¶
func (suo *SplitUpdateOne) Mutation() *SplitMutation
Mutation returns the SplitMutation object of the builder.
func (*SplitUpdateOne) Save ¶
func (suo *SplitUpdateOne) Save(ctx context.Context) (*Split, error)
Save executes the query and returns the updated Split entity.
func (*SplitUpdateOne) SaveX ¶
func (suo *SplitUpdateOne) SaveX(ctx context.Context) *Split
SaveX is like Save, but panics if an error occurs.
func (*SplitUpdateOne) Select ¶
func (suo *SplitUpdateOne) Select(field string, fields ...string) *SplitUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SplitUpdateOne) SetExecutionDate ¶
func (suo *SplitUpdateOne) SetExecutionDate(t time.Time) *SplitUpdateOne
SetExecutionDate sets the "execution_date" field.
func (*SplitUpdateOne) SetFrom ¶
func (suo *SplitUpdateOne) SetFrom(f float64) *SplitUpdateOne
SetFrom sets the "from" field.
func (*SplitUpdateOne) SetNillableStockID ¶
func (suo *SplitUpdateOne) SetNillableStockID(id *int) *SplitUpdateOne
SetNillableStockID sets the "stock" edge to the Entity entity by ID if the given value is not nil.
func (*SplitUpdateOne) SetStock ¶
func (suo *SplitUpdateOne) SetStock(e *Entity) *SplitUpdateOne
SetStock sets the "stock" edge to the Entity entity.
func (*SplitUpdateOne) SetStockID ¶
func (suo *SplitUpdateOne) SetStockID(id int) *SplitUpdateOne
SetStockID sets the "stock" edge to the Entity entity by ID.
func (*SplitUpdateOne) SetTo ¶
func (suo *SplitUpdateOne) SetTo(f float64) *SplitUpdateOne
SetTo sets the "to" field.
type TradeCondition ¶
type TradeCondition struct { // ID of the ent. ID int `json:"id,omitempty"` // Condition holds the value of the "condition" field. Condition string `json:"condition,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TradeConditionQuery when eager-loading is set. Edges TradeConditionEdges `json:"edges"` // contains filtered or unexported fields }
TradeCondition is the model entity for the TradeCondition schema.
func (*TradeCondition) QueryRecord ¶
func (tc *TradeCondition) QueryRecord() *TradeRecordQuery
QueryRecord queries the "record" edge of the TradeCondition entity.
func (*TradeCondition) String ¶
func (tc *TradeCondition) String() string
String implements the fmt.Stringer.
func (*TradeCondition) Unwrap ¶
func (tc *TradeCondition) Unwrap() *TradeCondition
Unwrap unwraps the TradeCondition 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 (*TradeCondition) Update ¶
func (tc *TradeCondition) Update() *TradeConditionUpdateOne
Update returns a builder for updating this TradeCondition. Note that you need to call TradeCondition.Unwrap() before calling this method if this TradeCondition was returned from a transaction, and the transaction was committed or rolled back.
type TradeConditionClient ¶
type TradeConditionClient struct {
// contains filtered or unexported fields
}
TradeConditionClient is a client for the TradeCondition schema.
func NewTradeConditionClient ¶
func NewTradeConditionClient(c config) *TradeConditionClient
NewTradeConditionClient returns a client for the TradeCondition from the given config.
func (*TradeConditionClient) Create ¶
func (c *TradeConditionClient) Create() *TradeConditionCreate
Create returns a builder for creating a TradeCondition entity.
func (*TradeConditionClient) CreateBulk ¶
func (c *TradeConditionClient) CreateBulk(builders ...*TradeConditionCreate) *TradeConditionCreateBulk
CreateBulk returns a builder for creating a bulk of TradeCondition entities.
func (*TradeConditionClient) Delete ¶
func (c *TradeConditionClient) Delete() *TradeConditionDelete
Delete returns a delete builder for TradeCondition.
func (*TradeConditionClient) DeleteOne ¶
func (c *TradeConditionClient) DeleteOne(tc *TradeCondition) *TradeConditionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TradeConditionClient) DeleteOneID ¶
func (c *TradeConditionClient) DeleteOneID(id int) *TradeConditionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TradeConditionClient) Get ¶
func (c *TradeConditionClient) Get(ctx context.Context, id int) (*TradeCondition, error)
Get returns a TradeCondition entity by its id.
func (*TradeConditionClient) GetX ¶
func (c *TradeConditionClient) GetX(ctx context.Context, id int) *TradeCondition
GetX is like Get, but panics if an error occurs.
func (*TradeConditionClient) Hooks ¶
func (c *TradeConditionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TradeConditionClient) Intercept ¶
func (c *TradeConditionClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tradecondition.Intercept(f(g(h())))`.
func (*TradeConditionClient) Interceptors ¶
func (c *TradeConditionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TradeConditionClient) Query ¶
func (c *TradeConditionClient) Query() *TradeConditionQuery
Query returns a query builder for TradeCondition.
func (*TradeConditionClient) QueryRecord ¶
func (c *TradeConditionClient) QueryRecord(tc *TradeCondition) *TradeRecordQuery
QueryRecord queries the record edge of a TradeCondition.
func (*TradeConditionClient) Update ¶
func (c *TradeConditionClient) Update() *TradeConditionUpdate
Update returns an update builder for TradeCondition.
func (*TradeConditionClient) UpdateOne ¶
func (c *TradeConditionClient) UpdateOne(tc *TradeCondition) *TradeConditionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TradeConditionClient) UpdateOneID ¶
func (c *TradeConditionClient) UpdateOneID(id int) *TradeConditionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TradeConditionClient) Use ¶
func (c *TradeConditionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tradecondition.Hooks(f(g(h())))`.
type TradeConditionCreate ¶
type TradeConditionCreate struct {
// contains filtered or unexported fields
}
TradeConditionCreate is the builder for creating a TradeCondition entity.
func (*TradeConditionCreate) AddRecord ¶
func (tcc *TradeConditionCreate) AddRecord(t ...*TradeRecord) *TradeConditionCreate
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeConditionCreate) AddRecordIDs ¶
func (tcc *TradeConditionCreate) AddRecordIDs(ids ...int) *TradeConditionCreate
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeConditionCreate) Exec ¶
func (tcc *TradeConditionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeConditionCreate) ExecX ¶
func (tcc *TradeConditionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeConditionCreate) Mutation ¶
func (tcc *TradeConditionCreate) Mutation() *TradeConditionMutation
Mutation returns the TradeConditionMutation object of the builder.
func (*TradeConditionCreate) Save ¶
func (tcc *TradeConditionCreate) Save(ctx context.Context) (*TradeCondition, error)
Save creates the TradeCondition in the database.
func (*TradeConditionCreate) SaveX ¶
func (tcc *TradeConditionCreate) SaveX(ctx context.Context) *TradeCondition
SaveX calls Save and panics if Save returns an error.
func (*TradeConditionCreate) SetCondition ¶
func (tcc *TradeConditionCreate) SetCondition(s string) *TradeConditionCreate
SetCondition sets the "condition" field.
type TradeConditionCreateBulk ¶
type TradeConditionCreateBulk struct {
// contains filtered or unexported fields
}
TradeConditionCreateBulk is the builder for creating many TradeCondition entities in bulk.
func (*TradeConditionCreateBulk) Exec ¶
func (tccb *TradeConditionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeConditionCreateBulk) ExecX ¶
func (tccb *TradeConditionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeConditionCreateBulk) Save ¶
func (tccb *TradeConditionCreateBulk) Save(ctx context.Context) ([]*TradeCondition, error)
Save creates the TradeCondition entities in the database.
func (*TradeConditionCreateBulk) SaveX ¶
func (tccb *TradeConditionCreateBulk) SaveX(ctx context.Context) []*TradeCondition
SaveX is like Save, but panics if an error occurs.
type TradeConditionDelete ¶
type TradeConditionDelete struct {
// contains filtered or unexported fields
}
TradeConditionDelete is the builder for deleting a TradeCondition entity.
func (*TradeConditionDelete) Exec ¶
func (tcd *TradeConditionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TradeConditionDelete) ExecX ¶
func (tcd *TradeConditionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TradeConditionDelete) Where ¶
func (tcd *TradeConditionDelete) Where(ps ...predicate.TradeCondition) *TradeConditionDelete
Where appends a list predicates to the TradeConditionDelete builder.
type TradeConditionDeleteOne ¶
type TradeConditionDeleteOne struct {
// contains filtered or unexported fields
}
TradeConditionDeleteOne is the builder for deleting a single TradeCondition entity.
func (*TradeConditionDeleteOne) Exec ¶
func (tcdo *TradeConditionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TradeConditionDeleteOne) ExecX ¶
func (tcdo *TradeConditionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TradeConditionEdges ¶
type TradeConditionEdges struct { // Record holds the value of the record edge. Record []*TradeRecord `json:"record,omitempty"` // contains filtered or unexported fields }
TradeConditionEdges holds the relations/edges for other nodes in the graph.
func (TradeConditionEdges) RecordOrErr ¶
func (e TradeConditionEdges) RecordOrErr() ([]*TradeRecord, error)
RecordOrErr returns the Record value or an error if the edge was not loaded in eager-loading.
type TradeConditionGroupBy ¶
type TradeConditionGroupBy struct {
// contains filtered or unexported fields
}
TradeConditionGroupBy is the group-by builder for TradeCondition entities.
func (*TradeConditionGroupBy) Aggregate ¶
func (tcgb *TradeConditionGroupBy) Aggregate(fns ...AggregateFunc) *TradeConditionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TradeConditionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TradeConditionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeConditionGroupBy) Scan ¶
func (tcgb *TradeConditionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeConditionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeConditionMutation ¶
type TradeConditionMutation struct {
// contains filtered or unexported fields
}
TradeConditionMutation represents an operation that mutates the TradeCondition nodes in the graph.
func (*TradeConditionMutation) AddField ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) AddRecordIDs ¶
func (m *TradeConditionMutation) AddRecordIDs(ids ...int)
AddRecordIDs adds the "record" edge to the TradeRecord entity by ids.
func (*TradeConditionMutation) AddedEdges ¶
func (m *TradeConditionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TradeConditionMutation) AddedField ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) AddedFields ¶
func (m *TradeConditionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TradeConditionMutation) AddedIDs ¶
func (m *TradeConditionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TradeConditionMutation) ClearEdge ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) ClearField ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) ClearRecord ¶
func (m *TradeConditionMutation) ClearRecord()
ClearRecord clears the "record" edge to the TradeRecord entity.
func (*TradeConditionMutation) ClearedEdges ¶
func (m *TradeConditionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TradeConditionMutation) ClearedFields ¶
func (m *TradeConditionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TradeConditionMutation) Client ¶
func (m TradeConditionMutation) 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 (*TradeConditionMutation) Condition ¶
func (m *TradeConditionMutation) Condition() (r string, exists bool)
Condition returns the value of the "condition" field in the mutation.
func (*TradeConditionMutation) EdgeCleared ¶
func (m *TradeConditionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TradeConditionMutation) Field ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) FieldCleared ¶
func (m *TradeConditionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TradeConditionMutation) Fields ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) ID ¶
func (m *TradeConditionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TradeConditionMutation) IDs ¶
func (m *TradeConditionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TradeConditionMutation) OldCondition ¶
func (m *TradeConditionMutation) OldCondition(ctx context.Context) (v string, err error)
OldCondition returns the old "condition" field's value of the TradeCondition entity. If the TradeCondition 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 (*TradeConditionMutation) 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 (*TradeConditionMutation) Op ¶
func (m *TradeConditionMutation) Op() Op
Op returns the operation name.
func (*TradeConditionMutation) RecordCleared ¶
func (m *TradeConditionMutation) RecordCleared() bool
RecordCleared reports if the "record" edge to the TradeRecord entity was cleared.
func (*TradeConditionMutation) RecordIDs ¶
func (m *TradeConditionMutation) RecordIDs() (ids []int)
RecordIDs returns the "record" edge IDs in the mutation.
func (*TradeConditionMutation) RemoveRecordIDs ¶
func (m *TradeConditionMutation) RemoveRecordIDs(ids ...int)
RemoveRecordIDs removes the "record" edge to the TradeRecord entity by IDs.
func (*TradeConditionMutation) RemovedEdges ¶
func (m *TradeConditionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TradeConditionMutation) RemovedIDs ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) RemovedRecordIDs ¶
func (m *TradeConditionMutation) RemovedRecordIDs() (ids []int)
RemovedRecord returns the removed IDs of the "record" edge to the TradeRecord entity.
func (*TradeConditionMutation) ResetCondition ¶
func (m *TradeConditionMutation) ResetCondition()
ResetCondition resets all changes to the "condition" field.
func (*TradeConditionMutation) ResetEdge ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) ResetField ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) ResetRecord ¶
func (m *TradeConditionMutation) ResetRecord()
ResetRecord resets all changes to the "record" edge.
func (*TradeConditionMutation) SetCondition ¶
func (m *TradeConditionMutation) SetCondition(s string)
SetCondition sets the "condition" field.
func (*TradeConditionMutation) SetField ¶
func (m *TradeConditionMutation) 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 (*TradeConditionMutation) SetOp ¶
func (m *TradeConditionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (TradeConditionMutation) Tx ¶
func (m TradeConditionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TradeConditionMutation) Type ¶
func (m *TradeConditionMutation) Type() string
Type returns the node type of this mutation (TradeCondition).
func (*TradeConditionMutation) Where ¶
func (m *TradeConditionMutation) Where(ps ...predicate.TradeCondition)
Where appends a list predicates to the TradeConditionMutation builder.
func (*TradeConditionMutation) WhereP ¶
func (m *TradeConditionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TradeConditionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TradeConditionQuery ¶
type TradeConditionQuery struct {
// contains filtered or unexported fields
}
TradeConditionQuery is the builder for querying TradeCondition entities.
func (*TradeConditionQuery) Aggregate ¶
func (tcq *TradeConditionQuery) Aggregate(fns ...AggregateFunc) *TradeConditionSelect
Aggregate returns a TradeConditionSelect configured with the given aggregations.
func (*TradeConditionQuery) All ¶
func (tcq *TradeConditionQuery) All(ctx context.Context) ([]*TradeCondition, error)
All executes the query and returns a list of TradeConditions.
func (*TradeConditionQuery) AllX ¶
func (tcq *TradeConditionQuery) AllX(ctx context.Context) []*TradeCondition
AllX is like All, but panics if an error occurs.
func (*TradeConditionQuery) Clone ¶
func (tcq *TradeConditionQuery) Clone() *TradeConditionQuery
Clone returns a duplicate of the TradeConditionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TradeConditionQuery) Count ¶
func (tcq *TradeConditionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TradeConditionQuery) CountX ¶
func (tcq *TradeConditionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TradeConditionQuery) Exist ¶
func (tcq *TradeConditionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TradeConditionQuery) ExistX ¶
func (tcq *TradeConditionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TradeConditionQuery) First ¶
func (tcq *TradeConditionQuery) First(ctx context.Context) (*TradeCondition, error)
First returns the first TradeCondition entity from the query. Returns a *NotFoundError when no TradeCondition was found.
func (*TradeConditionQuery) FirstID ¶
func (tcq *TradeConditionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TradeCondition ID from the query. Returns a *NotFoundError when no TradeCondition ID was found.
func (*TradeConditionQuery) FirstIDX ¶
func (tcq *TradeConditionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TradeConditionQuery) FirstX ¶
func (tcq *TradeConditionQuery) FirstX(ctx context.Context) *TradeCondition
FirstX is like First, but panics if an error occurs.
func (*TradeConditionQuery) GroupBy ¶
func (tcq *TradeConditionQuery) GroupBy(field string, fields ...string) *TradeConditionGroupBy
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 { Condition string `json:"condition,omitempty"` Count int `json:"count,omitempty"` } client.TradeCondition.Query(). GroupBy(tradecondition.FieldCondition). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TradeConditionQuery) IDs ¶
func (tcq *TradeConditionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TradeCondition IDs.
func (*TradeConditionQuery) IDsX ¶
func (tcq *TradeConditionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TradeConditionQuery) Limit ¶
func (tcq *TradeConditionQuery) Limit(limit int) *TradeConditionQuery
Limit the number of records to be returned by this query.
func (*TradeConditionQuery) Offset ¶
func (tcq *TradeConditionQuery) Offset(offset int) *TradeConditionQuery
Offset to start from.
func (*TradeConditionQuery) Only ¶
func (tcq *TradeConditionQuery) Only(ctx context.Context) (*TradeCondition, error)
Only returns a single TradeCondition entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TradeCondition entity is found. Returns a *NotFoundError when no TradeCondition entities are found.
func (*TradeConditionQuery) OnlyID ¶
func (tcq *TradeConditionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TradeCondition ID in the query. Returns a *NotSingularError when more than one TradeCondition ID is found. Returns a *NotFoundError when no entities are found.
func (*TradeConditionQuery) OnlyIDX ¶
func (tcq *TradeConditionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TradeConditionQuery) OnlyX ¶
func (tcq *TradeConditionQuery) OnlyX(ctx context.Context) *TradeCondition
OnlyX is like Only, but panics if an error occurs.
func (*TradeConditionQuery) Order ¶
func (tcq *TradeConditionQuery) Order(o ...OrderFunc) *TradeConditionQuery
Order specifies how the records should be ordered.
func (*TradeConditionQuery) QueryRecord ¶
func (tcq *TradeConditionQuery) QueryRecord() *TradeRecordQuery
QueryRecord chains the current query on the "record" edge.
func (*TradeConditionQuery) Select ¶
func (tcq *TradeConditionQuery) Select(fields ...string) *TradeConditionSelect
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 { Condition string `json:"condition,omitempty"` } client.TradeCondition.Query(). Select(tradecondition.FieldCondition). Scan(ctx, &v)
func (*TradeConditionQuery) Unique ¶
func (tcq *TradeConditionQuery) Unique(unique bool) *TradeConditionQuery
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 (*TradeConditionQuery) Where ¶
func (tcq *TradeConditionQuery) Where(ps ...predicate.TradeCondition) *TradeConditionQuery
Where adds a new predicate for the TradeConditionQuery builder.
func (*TradeConditionQuery) WithRecord ¶
func (tcq *TradeConditionQuery) WithRecord(opts ...func(*TradeRecordQuery)) *TradeConditionQuery
WithRecord tells the query-builder to eager-load the nodes that are connected to the "record" edge. The optional arguments are used to configure the query builder of the edge.
type TradeConditionSelect ¶
type TradeConditionSelect struct { *TradeConditionQuery // contains filtered or unexported fields }
TradeConditionSelect is the builder for selecting fields of TradeCondition entities.
func (*TradeConditionSelect) Aggregate ¶
func (tcs *TradeConditionSelect) Aggregate(fns ...AggregateFunc) *TradeConditionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TradeConditionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeConditionSelect) Scan ¶
func (tcs *TradeConditionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeConditionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeConditionUpdate ¶
type TradeConditionUpdate struct {
// contains filtered or unexported fields
}
TradeConditionUpdate is the builder for updating TradeCondition entities.
func (*TradeConditionUpdate) AddRecord ¶
func (tcu *TradeConditionUpdate) AddRecord(t ...*TradeRecord) *TradeConditionUpdate
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeConditionUpdate) AddRecordIDs ¶
func (tcu *TradeConditionUpdate) AddRecordIDs(ids ...int) *TradeConditionUpdate
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeConditionUpdate) ClearRecord ¶
func (tcu *TradeConditionUpdate) ClearRecord() *TradeConditionUpdate
ClearRecord clears all "record" edges to the TradeRecord entity.
func (*TradeConditionUpdate) Exec ¶
func (tcu *TradeConditionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeConditionUpdate) ExecX ¶
func (tcu *TradeConditionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeConditionUpdate) Mutation ¶
func (tcu *TradeConditionUpdate) Mutation() *TradeConditionMutation
Mutation returns the TradeConditionMutation object of the builder.
func (*TradeConditionUpdate) RemoveRecord ¶
func (tcu *TradeConditionUpdate) RemoveRecord(t ...*TradeRecord) *TradeConditionUpdate
RemoveRecord removes "record" edges to TradeRecord entities.
func (*TradeConditionUpdate) RemoveRecordIDs ¶
func (tcu *TradeConditionUpdate) RemoveRecordIDs(ids ...int) *TradeConditionUpdate
RemoveRecordIDs removes the "record" edge to TradeRecord entities by IDs.
func (*TradeConditionUpdate) Save ¶
func (tcu *TradeConditionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TradeConditionUpdate) SaveX ¶
func (tcu *TradeConditionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TradeConditionUpdate) SetCondition ¶
func (tcu *TradeConditionUpdate) SetCondition(s string) *TradeConditionUpdate
SetCondition sets the "condition" field.
func (*TradeConditionUpdate) Where ¶
func (tcu *TradeConditionUpdate) Where(ps ...predicate.TradeCondition) *TradeConditionUpdate
Where appends a list predicates to the TradeConditionUpdate builder.
type TradeConditionUpdateOne ¶
type TradeConditionUpdateOne struct {
// contains filtered or unexported fields
}
TradeConditionUpdateOne is the builder for updating a single TradeCondition entity.
func (*TradeConditionUpdateOne) AddRecord ¶
func (tcuo *TradeConditionUpdateOne) AddRecord(t ...*TradeRecord) *TradeConditionUpdateOne
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeConditionUpdateOne) AddRecordIDs ¶
func (tcuo *TradeConditionUpdateOne) AddRecordIDs(ids ...int) *TradeConditionUpdateOne
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeConditionUpdateOne) ClearRecord ¶
func (tcuo *TradeConditionUpdateOne) ClearRecord() *TradeConditionUpdateOne
ClearRecord clears all "record" edges to the TradeRecord entity.
func (*TradeConditionUpdateOne) Exec ¶
func (tcuo *TradeConditionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TradeConditionUpdateOne) ExecX ¶
func (tcuo *TradeConditionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeConditionUpdateOne) Mutation ¶
func (tcuo *TradeConditionUpdateOne) Mutation() *TradeConditionMutation
Mutation returns the TradeConditionMutation object of the builder.
func (*TradeConditionUpdateOne) RemoveRecord ¶
func (tcuo *TradeConditionUpdateOne) RemoveRecord(t ...*TradeRecord) *TradeConditionUpdateOne
RemoveRecord removes "record" edges to TradeRecord entities.
func (*TradeConditionUpdateOne) RemoveRecordIDs ¶
func (tcuo *TradeConditionUpdateOne) RemoveRecordIDs(ids ...int) *TradeConditionUpdateOne
RemoveRecordIDs removes the "record" edge to TradeRecord entities by IDs.
func (*TradeConditionUpdateOne) Save ¶
func (tcuo *TradeConditionUpdateOne) Save(ctx context.Context) (*TradeCondition, error)
Save executes the query and returns the updated TradeCondition entity.
func (*TradeConditionUpdateOne) SaveX ¶
func (tcuo *TradeConditionUpdateOne) SaveX(ctx context.Context) *TradeCondition
SaveX is like Save, but panics if an error occurs.
func (*TradeConditionUpdateOne) Select ¶
func (tcuo *TradeConditionUpdateOne) Select(field string, fields ...string) *TradeConditionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TradeConditionUpdateOne) SetCondition ¶
func (tcuo *TradeConditionUpdateOne) SetCondition(s string) *TradeConditionUpdateOne
SetCondition sets the "condition" field.
type TradeConditions ¶
type TradeConditions []*TradeCondition
TradeConditions is a parsable slice of TradeCondition.
type TradeCorrection ¶
type TradeCorrection struct { // ID of the ent. ID int `json:"id,omitempty"` // Correction holds the value of the "correction" field. Correction string `json:"correction,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TradeCorrectionQuery when eager-loading is set. Edges TradeCorrectionEdges `json:"edges"` // contains filtered or unexported fields }
TradeCorrection is the model entity for the TradeCorrection schema.
func (*TradeCorrection) QueryRecord ¶
func (tc *TradeCorrection) QueryRecord() *TradeRecordQuery
QueryRecord queries the "record" edge of the TradeCorrection entity.
func (*TradeCorrection) String ¶
func (tc *TradeCorrection) String() string
String implements the fmt.Stringer.
func (*TradeCorrection) Unwrap ¶
func (tc *TradeCorrection) Unwrap() *TradeCorrection
Unwrap unwraps the TradeCorrection 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 (*TradeCorrection) Update ¶
func (tc *TradeCorrection) Update() *TradeCorrectionUpdateOne
Update returns a builder for updating this TradeCorrection. Note that you need to call TradeCorrection.Unwrap() before calling this method if this TradeCorrection was returned from a transaction, and the transaction was committed or rolled back.
type TradeCorrectionClient ¶
type TradeCorrectionClient struct {
// contains filtered or unexported fields
}
TradeCorrectionClient is a client for the TradeCorrection schema.
func NewTradeCorrectionClient ¶
func NewTradeCorrectionClient(c config) *TradeCorrectionClient
NewTradeCorrectionClient returns a client for the TradeCorrection from the given config.
func (*TradeCorrectionClient) Create ¶
func (c *TradeCorrectionClient) Create() *TradeCorrectionCreate
Create returns a builder for creating a TradeCorrection entity.
func (*TradeCorrectionClient) CreateBulk ¶
func (c *TradeCorrectionClient) CreateBulk(builders ...*TradeCorrectionCreate) *TradeCorrectionCreateBulk
CreateBulk returns a builder for creating a bulk of TradeCorrection entities.
func (*TradeCorrectionClient) Delete ¶
func (c *TradeCorrectionClient) Delete() *TradeCorrectionDelete
Delete returns a delete builder for TradeCorrection.
func (*TradeCorrectionClient) DeleteOne ¶
func (c *TradeCorrectionClient) DeleteOne(tc *TradeCorrection) *TradeCorrectionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TradeCorrectionClient) DeleteOneID ¶
func (c *TradeCorrectionClient) DeleteOneID(id int) *TradeCorrectionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TradeCorrectionClient) Get ¶
func (c *TradeCorrectionClient) Get(ctx context.Context, id int) (*TradeCorrection, error)
Get returns a TradeCorrection entity by its id.
func (*TradeCorrectionClient) GetX ¶
func (c *TradeCorrectionClient) GetX(ctx context.Context, id int) *TradeCorrection
GetX is like Get, but panics if an error occurs.
func (*TradeCorrectionClient) Hooks ¶
func (c *TradeCorrectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TradeCorrectionClient) Intercept ¶
func (c *TradeCorrectionClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tradecorrection.Intercept(f(g(h())))`.
func (*TradeCorrectionClient) Interceptors ¶
func (c *TradeCorrectionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TradeCorrectionClient) Query ¶
func (c *TradeCorrectionClient) Query() *TradeCorrectionQuery
Query returns a query builder for TradeCorrection.
func (*TradeCorrectionClient) QueryRecord ¶
func (c *TradeCorrectionClient) QueryRecord(tc *TradeCorrection) *TradeRecordQuery
QueryRecord queries the record edge of a TradeCorrection.
func (*TradeCorrectionClient) Update ¶
func (c *TradeCorrectionClient) Update() *TradeCorrectionUpdate
Update returns an update builder for TradeCorrection.
func (*TradeCorrectionClient) UpdateOne ¶
func (c *TradeCorrectionClient) UpdateOne(tc *TradeCorrection) *TradeCorrectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TradeCorrectionClient) UpdateOneID ¶
func (c *TradeCorrectionClient) UpdateOneID(id int) *TradeCorrectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TradeCorrectionClient) Use ¶
func (c *TradeCorrectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tradecorrection.Hooks(f(g(h())))`.
type TradeCorrectionCreate ¶
type TradeCorrectionCreate struct {
// contains filtered or unexported fields
}
TradeCorrectionCreate is the builder for creating a TradeCorrection entity.
func (*TradeCorrectionCreate) AddRecord ¶
func (tcc *TradeCorrectionCreate) AddRecord(t ...*TradeRecord) *TradeCorrectionCreate
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeCorrectionCreate) AddRecordIDs ¶
func (tcc *TradeCorrectionCreate) AddRecordIDs(ids ...int) *TradeCorrectionCreate
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeCorrectionCreate) Exec ¶
func (tcc *TradeCorrectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeCorrectionCreate) ExecX ¶
func (tcc *TradeCorrectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeCorrectionCreate) Mutation ¶
func (tcc *TradeCorrectionCreate) Mutation() *TradeCorrectionMutation
Mutation returns the TradeCorrectionMutation object of the builder.
func (*TradeCorrectionCreate) Save ¶
func (tcc *TradeCorrectionCreate) Save(ctx context.Context) (*TradeCorrection, error)
Save creates the TradeCorrection in the database.
func (*TradeCorrectionCreate) SaveX ¶
func (tcc *TradeCorrectionCreate) SaveX(ctx context.Context) *TradeCorrection
SaveX calls Save and panics if Save returns an error.
func (*TradeCorrectionCreate) SetCorrection ¶
func (tcc *TradeCorrectionCreate) SetCorrection(s string) *TradeCorrectionCreate
SetCorrection sets the "correction" field.
type TradeCorrectionCreateBulk ¶
type TradeCorrectionCreateBulk struct {
// contains filtered or unexported fields
}
TradeCorrectionCreateBulk is the builder for creating many TradeCorrection entities in bulk.
func (*TradeCorrectionCreateBulk) Exec ¶
func (tccb *TradeCorrectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeCorrectionCreateBulk) ExecX ¶
func (tccb *TradeCorrectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeCorrectionCreateBulk) Save ¶
func (tccb *TradeCorrectionCreateBulk) Save(ctx context.Context) ([]*TradeCorrection, error)
Save creates the TradeCorrection entities in the database.
func (*TradeCorrectionCreateBulk) SaveX ¶
func (tccb *TradeCorrectionCreateBulk) SaveX(ctx context.Context) []*TradeCorrection
SaveX is like Save, but panics if an error occurs.
type TradeCorrectionDelete ¶
type TradeCorrectionDelete struct {
// contains filtered or unexported fields
}
TradeCorrectionDelete is the builder for deleting a TradeCorrection entity.
func (*TradeCorrectionDelete) Exec ¶
func (tcd *TradeCorrectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TradeCorrectionDelete) ExecX ¶
func (tcd *TradeCorrectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TradeCorrectionDelete) Where ¶
func (tcd *TradeCorrectionDelete) Where(ps ...predicate.TradeCorrection) *TradeCorrectionDelete
Where appends a list predicates to the TradeCorrectionDelete builder.
type TradeCorrectionDeleteOne ¶
type TradeCorrectionDeleteOne struct {
// contains filtered or unexported fields
}
TradeCorrectionDeleteOne is the builder for deleting a single TradeCorrection entity.
func (*TradeCorrectionDeleteOne) Exec ¶
func (tcdo *TradeCorrectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TradeCorrectionDeleteOne) ExecX ¶
func (tcdo *TradeCorrectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TradeCorrectionEdges ¶
type TradeCorrectionEdges struct { // Record holds the value of the record edge. Record []*TradeRecord `json:"record,omitempty"` // contains filtered or unexported fields }
TradeCorrectionEdges holds the relations/edges for other nodes in the graph.
func (TradeCorrectionEdges) RecordOrErr ¶
func (e TradeCorrectionEdges) RecordOrErr() ([]*TradeRecord, error)
RecordOrErr returns the Record value or an error if the edge was not loaded in eager-loading.
type TradeCorrectionGroupBy ¶
type TradeCorrectionGroupBy struct {
// contains filtered or unexported fields
}
TradeCorrectionGroupBy is the group-by builder for TradeCorrection entities.
func (*TradeCorrectionGroupBy) Aggregate ¶
func (tcgb *TradeCorrectionGroupBy) Aggregate(fns ...AggregateFunc) *TradeCorrectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TradeCorrectionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TradeCorrectionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionGroupBy) Scan ¶
func (tcgb *TradeCorrectionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeCorrectionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeCorrectionMutation ¶
type TradeCorrectionMutation struct {
// contains filtered or unexported fields
}
TradeCorrectionMutation represents an operation that mutates the TradeCorrection nodes in the graph.
func (*TradeCorrectionMutation) AddField ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) AddRecordIDs ¶
func (m *TradeCorrectionMutation) AddRecordIDs(ids ...int)
AddRecordIDs adds the "record" edge to the TradeRecord entity by ids.
func (*TradeCorrectionMutation) AddedEdges ¶
func (m *TradeCorrectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TradeCorrectionMutation) AddedField ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) AddedFields ¶
func (m *TradeCorrectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TradeCorrectionMutation) AddedIDs ¶
func (m *TradeCorrectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TradeCorrectionMutation) ClearEdge ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) ClearField ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) ClearRecord ¶
func (m *TradeCorrectionMutation) ClearRecord()
ClearRecord clears the "record" edge to the TradeRecord entity.
func (*TradeCorrectionMutation) ClearedEdges ¶
func (m *TradeCorrectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TradeCorrectionMutation) ClearedFields ¶
func (m *TradeCorrectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TradeCorrectionMutation) Client ¶
func (m TradeCorrectionMutation) 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 (*TradeCorrectionMutation) Correction ¶
func (m *TradeCorrectionMutation) Correction() (r string, exists bool)
Correction returns the value of the "correction" field in the mutation.
func (*TradeCorrectionMutation) EdgeCleared ¶
func (m *TradeCorrectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TradeCorrectionMutation) Field ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) FieldCleared ¶
func (m *TradeCorrectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TradeCorrectionMutation) Fields ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) ID ¶
func (m *TradeCorrectionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TradeCorrectionMutation) IDs ¶
func (m *TradeCorrectionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TradeCorrectionMutation) OldCorrection ¶
func (m *TradeCorrectionMutation) OldCorrection(ctx context.Context) (v string, err error)
OldCorrection returns the old "correction" field's value of the TradeCorrection entity. If the TradeCorrection 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 (*TradeCorrectionMutation) 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 (*TradeCorrectionMutation) Op ¶
func (m *TradeCorrectionMutation) Op() Op
Op returns the operation name.
func (*TradeCorrectionMutation) RecordCleared ¶
func (m *TradeCorrectionMutation) RecordCleared() bool
RecordCleared reports if the "record" edge to the TradeRecord entity was cleared.
func (*TradeCorrectionMutation) RecordIDs ¶
func (m *TradeCorrectionMutation) RecordIDs() (ids []int)
RecordIDs returns the "record" edge IDs in the mutation.
func (*TradeCorrectionMutation) RemoveRecordIDs ¶
func (m *TradeCorrectionMutation) RemoveRecordIDs(ids ...int)
RemoveRecordIDs removes the "record" edge to the TradeRecord entity by IDs.
func (*TradeCorrectionMutation) RemovedEdges ¶
func (m *TradeCorrectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TradeCorrectionMutation) RemovedIDs ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) RemovedRecordIDs ¶
func (m *TradeCorrectionMutation) RemovedRecordIDs() (ids []int)
RemovedRecord returns the removed IDs of the "record" edge to the TradeRecord entity.
func (*TradeCorrectionMutation) ResetCorrection ¶
func (m *TradeCorrectionMutation) ResetCorrection()
ResetCorrection resets all changes to the "correction" field.
func (*TradeCorrectionMutation) ResetEdge ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) ResetField ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) ResetRecord ¶
func (m *TradeCorrectionMutation) ResetRecord()
ResetRecord resets all changes to the "record" edge.
func (*TradeCorrectionMutation) SetCorrection ¶
func (m *TradeCorrectionMutation) SetCorrection(s string)
SetCorrection sets the "correction" field.
func (*TradeCorrectionMutation) SetField ¶
func (m *TradeCorrectionMutation) 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 (*TradeCorrectionMutation) SetOp ¶
func (m *TradeCorrectionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (TradeCorrectionMutation) Tx ¶
func (m TradeCorrectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TradeCorrectionMutation) Type ¶
func (m *TradeCorrectionMutation) Type() string
Type returns the node type of this mutation (TradeCorrection).
func (*TradeCorrectionMutation) Where ¶
func (m *TradeCorrectionMutation) Where(ps ...predicate.TradeCorrection)
Where appends a list predicates to the TradeCorrectionMutation builder.
func (*TradeCorrectionMutation) WhereP ¶
func (m *TradeCorrectionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TradeCorrectionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TradeCorrectionQuery ¶
type TradeCorrectionQuery struct {
// contains filtered or unexported fields
}
TradeCorrectionQuery is the builder for querying TradeCorrection entities.
func (*TradeCorrectionQuery) Aggregate ¶
func (tcq *TradeCorrectionQuery) Aggregate(fns ...AggregateFunc) *TradeCorrectionSelect
Aggregate returns a TradeCorrectionSelect configured with the given aggregations.
func (*TradeCorrectionQuery) All ¶
func (tcq *TradeCorrectionQuery) All(ctx context.Context) ([]*TradeCorrection, error)
All executes the query and returns a list of TradeCorrections.
func (*TradeCorrectionQuery) AllX ¶
func (tcq *TradeCorrectionQuery) AllX(ctx context.Context) []*TradeCorrection
AllX is like All, but panics if an error occurs.
func (*TradeCorrectionQuery) Clone ¶
func (tcq *TradeCorrectionQuery) Clone() *TradeCorrectionQuery
Clone returns a duplicate of the TradeCorrectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TradeCorrectionQuery) Count ¶
func (tcq *TradeCorrectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TradeCorrectionQuery) CountX ¶
func (tcq *TradeCorrectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TradeCorrectionQuery) Exist ¶
func (tcq *TradeCorrectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TradeCorrectionQuery) ExistX ¶
func (tcq *TradeCorrectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TradeCorrectionQuery) First ¶
func (tcq *TradeCorrectionQuery) First(ctx context.Context) (*TradeCorrection, error)
First returns the first TradeCorrection entity from the query. Returns a *NotFoundError when no TradeCorrection was found.
func (*TradeCorrectionQuery) FirstID ¶
func (tcq *TradeCorrectionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TradeCorrection ID from the query. Returns a *NotFoundError when no TradeCorrection ID was found.
func (*TradeCorrectionQuery) FirstIDX ¶
func (tcq *TradeCorrectionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TradeCorrectionQuery) FirstX ¶
func (tcq *TradeCorrectionQuery) FirstX(ctx context.Context) *TradeCorrection
FirstX is like First, but panics if an error occurs.
func (*TradeCorrectionQuery) GroupBy ¶
func (tcq *TradeCorrectionQuery) GroupBy(field string, fields ...string) *TradeCorrectionGroupBy
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 { Correction string `json:"correction,omitempty"` Count int `json:"count,omitempty"` } client.TradeCorrection.Query(). GroupBy(tradecorrection.FieldCorrection). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TradeCorrectionQuery) IDs ¶
func (tcq *TradeCorrectionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TradeCorrection IDs.
func (*TradeCorrectionQuery) IDsX ¶
func (tcq *TradeCorrectionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TradeCorrectionQuery) Limit ¶
func (tcq *TradeCorrectionQuery) Limit(limit int) *TradeCorrectionQuery
Limit the number of records to be returned by this query.
func (*TradeCorrectionQuery) Offset ¶
func (tcq *TradeCorrectionQuery) Offset(offset int) *TradeCorrectionQuery
Offset to start from.
func (*TradeCorrectionQuery) Only ¶
func (tcq *TradeCorrectionQuery) Only(ctx context.Context) (*TradeCorrection, error)
Only returns a single TradeCorrection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TradeCorrection entity is found. Returns a *NotFoundError when no TradeCorrection entities are found.
func (*TradeCorrectionQuery) OnlyID ¶
func (tcq *TradeCorrectionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TradeCorrection ID in the query. Returns a *NotSingularError when more than one TradeCorrection ID is found. Returns a *NotFoundError when no entities are found.
func (*TradeCorrectionQuery) OnlyIDX ¶
func (tcq *TradeCorrectionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TradeCorrectionQuery) OnlyX ¶
func (tcq *TradeCorrectionQuery) OnlyX(ctx context.Context) *TradeCorrection
OnlyX is like Only, but panics if an error occurs.
func (*TradeCorrectionQuery) Order ¶
func (tcq *TradeCorrectionQuery) Order(o ...OrderFunc) *TradeCorrectionQuery
Order specifies how the records should be ordered.
func (*TradeCorrectionQuery) QueryRecord ¶
func (tcq *TradeCorrectionQuery) QueryRecord() *TradeRecordQuery
QueryRecord chains the current query on the "record" edge.
func (*TradeCorrectionQuery) Select ¶
func (tcq *TradeCorrectionQuery) Select(fields ...string) *TradeCorrectionSelect
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 { Correction string `json:"correction,omitempty"` } client.TradeCorrection.Query(). Select(tradecorrection.FieldCorrection). Scan(ctx, &v)
func (*TradeCorrectionQuery) Unique ¶
func (tcq *TradeCorrectionQuery) Unique(unique bool) *TradeCorrectionQuery
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 (*TradeCorrectionQuery) Where ¶
func (tcq *TradeCorrectionQuery) Where(ps ...predicate.TradeCorrection) *TradeCorrectionQuery
Where adds a new predicate for the TradeCorrectionQuery builder.
func (*TradeCorrectionQuery) WithRecord ¶
func (tcq *TradeCorrectionQuery) WithRecord(opts ...func(*TradeRecordQuery)) *TradeCorrectionQuery
WithRecord tells the query-builder to eager-load the nodes that are connected to the "record" edge. The optional arguments are used to configure the query builder of the edge.
type TradeCorrectionSelect ¶
type TradeCorrectionSelect struct { *TradeCorrectionQuery // contains filtered or unexported fields }
TradeCorrectionSelect is the builder for selecting fields of TradeCorrection entities.
func (*TradeCorrectionSelect) Aggregate ¶
func (tcs *TradeCorrectionSelect) Aggregate(fns ...AggregateFunc) *TradeCorrectionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TradeCorrectionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TradeCorrectionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeCorrectionSelect) Scan ¶
func (tcs *TradeCorrectionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeCorrectionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeCorrectionUpdate ¶
type TradeCorrectionUpdate struct {
// contains filtered or unexported fields
}
TradeCorrectionUpdate is the builder for updating TradeCorrection entities.
func (*TradeCorrectionUpdate) AddRecord ¶
func (tcu *TradeCorrectionUpdate) AddRecord(t ...*TradeRecord) *TradeCorrectionUpdate
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeCorrectionUpdate) AddRecordIDs ¶
func (tcu *TradeCorrectionUpdate) AddRecordIDs(ids ...int) *TradeCorrectionUpdate
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeCorrectionUpdate) ClearRecord ¶
func (tcu *TradeCorrectionUpdate) ClearRecord() *TradeCorrectionUpdate
ClearRecord clears all "record" edges to the TradeRecord entity.
func (*TradeCorrectionUpdate) Exec ¶
func (tcu *TradeCorrectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeCorrectionUpdate) ExecX ¶
func (tcu *TradeCorrectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeCorrectionUpdate) Mutation ¶
func (tcu *TradeCorrectionUpdate) Mutation() *TradeCorrectionMutation
Mutation returns the TradeCorrectionMutation object of the builder.
func (*TradeCorrectionUpdate) RemoveRecord ¶
func (tcu *TradeCorrectionUpdate) RemoveRecord(t ...*TradeRecord) *TradeCorrectionUpdate
RemoveRecord removes "record" edges to TradeRecord entities.
func (*TradeCorrectionUpdate) RemoveRecordIDs ¶
func (tcu *TradeCorrectionUpdate) RemoveRecordIDs(ids ...int) *TradeCorrectionUpdate
RemoveRecordIDs removes the "record" edge to TradeRecord entities by IDs.
func (*TradeCorrectionUpdate) Save ¶
func (tcu *TradeCorrectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TradeCorrectionUpdate) SaveX ¶
func (tcu *TradeCorrectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TradeCorrectionUpdate) SetCorrection ¶
func (tcu *TradeCorrectionUpdate) SetCorrection(s string) *TradeCorrectionUpdate
SetCorrection sets the "correction" field.
func (*TradeCorrectionUpdate) Where ¶
func (tcu *TradeCorrectionUpdate) Where(ps ...predicate.TradeCorrection) *TradeCorrectionUpdate
Where appends a list predicates to the TradeCorrectionUpdate builder.
type TradeCorrectionUpdateOne ¶
type TradeCorrectionUpdateOne struct {
// contains filtered or unexported fields
}
TradeCorrectionUpdateOne is the builder for updating a single TradeCorrection entity.
func (*TradeCorrectionUpdateOne) AddRecord ¶
func (tcuo *TradeCorrectionUpdateOne) AddRecord(t ...*TradeRecord) *TradeCorrectionUpdateOne
AddRecord adds the "record" edges to the TradeRecord entity.
func (*TradeCorrectionUpdateOne) AddRecordIDs ¶
func (tcuo *TradeCorrectionUpdateOne) AddRecordIDs(ids ...int) *TradeCorrectionUpdateOne
AddRecordIDs adds the "record" edge to the TradeRecord entity by IDs.
func (*TradeCorrectionUpdateOne) ClearRecord ¶
func (tcuo *TradeCorrectionUpdateOne) ClearRecord() *TradeCorrectionUpdateOne
ClearRecord clears all "record" edges to the TradeRecord entity.
func (*TradeCorrectionUpdateOne) Exec ¶
func (tcuo *TradeCorrectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TradeCorrectionUpdateOne) ExecX ¶
func (tcuo *TradeCorrectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeCorrectionUpdateOne) Mutation ¶
func (tcuo *TradeCorrectionUpdateOne) Mutation() *TradeCorrectionMutation
Mutation returns the TradeCorrectionMutation object of the builder.
func (*TradeCorrectionUpdateOne) RemoveRecord ¶
func (tcuo *TradeCorrectionUpdateOne) RemoveRecord(t ...*TradeRecord) *TradeCorrectionUpdateOne
RemoveRecord removes "record" edges to TradeRecord entities.
func (*TradeCorrectionUpdateOne) RemoveRecordIDs ¶
func (tcuo *TradeCorrectionUpdateOne) RemoveRecordIDs(ids ...int) *TradeCorrectionUpdateOne
RemoveRecordIDs removes the "record" edge to TradeRecord entities by IDs.
func (*TradeCorrectionUpdateOne) Save ¶
func (tcuo *TradeCorrectionUpdateOne) Save(ctx context.Context) (*TradeCorrection, error)
Save executes the query and returns the updated TradeCorrection entity.
func (*TradeCorrectionUpdateOne) SaveX ¶
func (tcuo *TradeCorrectionUpdateOne) SaveX(ctx context.Context) *TradeCorrection
SaveX is like Save, but panics if an error occurs.
func (*TradeCorrectionUpdateOne) Select ¶
func (tcuo *TradeCorrectionUpdateOne) Select(field string, fields ...string) *TradeCorrectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TradeCorrectionUpdateOne) SetCorrection ¶
func (tcuo *TradeCorrectionUpdateOne) SetCorrection(s string) *TradeCorrectionUpdateOne
SetCorrection sets the "correction" field.
type TradeCorrections ¶
type TradeCorrections []*TradeCorrection
TradeCorrections is a parsable slice of TradeCorrection.
type TradeRecord ¶
type TradeRecord struct { // ID of the ent. ID int `json:"id,omitempty"` // Price holds the value of the "price" field. Price float64 `json:"price,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // Volume holds the value of the "volume" field. Volume int32 `json:"volume,omitempty"` // TimeRangeID holds the value of the "time_range_id" field. TimeRangeID int `json:"time_range_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TradeRecordQuery when eager-loading is set. Edges TradeRecordEdges `json:"edges"` // contains filtered or unexported fields }
TradeRecord is the model entity for the TradeRecord schema.
func (*TradeRecord) QueryConditions ¶
func (tr *TradeRecord) QueryConditions() *TradeConditionQuery
QueryConditions queries the "conditions" edge of the TradeRecord entity.
func (*TradeRecord) QueryCorrection ¶
func (tr *TradeRecord) QueryCorrection() *TradeCorrectionQuery
QueryCorrection queries the "correction" edge of the TradeRecord entity.
func (*TradeRecord) QueryExchange ¶
func (tr *TradeRecord) QueryExchange() *ExchangeQuery
QueryExchange queries the "exchange" edge of the TradeRecord entity.
func (*TradeRecord) QueryTimeRange ¶
func (tr *TradeRecord) QueryTimeRange() *TradeTimeRangeQuery
QueryTimeRange queries the "time_range" edge of the TradeRecord entity.
func (*TradeRecord) String ¶
func (tr *TradeRecord) String() string
String implements the fmt.Stringer.
func (*TradeRecord) Unwrap ¶
func (tr *TradeRecord) Unwrap() *TradeRecord
Unwrap unwraps the TradeRecord 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 (*TradeRecord) Update ¶
func (tr *TradeRecord) Update() *TradeRecordUpdateOne
Update returns a builder for updating this TradeRecord. Note that you need to call TradeRecord.Unwrap() before calling this method if this TradeRecord was returned from a transaction, and the transaction was committed or rolled back.
type TradeRecordClient ¶
type TradeRecordClient struct {
// contains filtered or unexported fields
}
TradeRecordClient is a client for the TradeRecord schema.
func NewTradeRecordClient ¶
func NewTradeRecordClient(c config) *TradeRecordClient
NewTradeRecordClient returns a client for the TradeRecord from the given config.
func (*TradeRecordClient) Create ¶
func (c *TradeRecordClient) Create() *TradeRecordCreate
Create returns a builder for creating a TradeRecord entity.
func (*TradeRecordClient) CreateBulk ¶
func (c *TradeRecordClient) CreateBulk(builders ...*TradeRecordCreate) *TradeRecordCreateBulk
CreateBulk returns a builder for creating a bulk of TradeRecord entities.
func (*TradeRecordClient) Delete ¶
func (c *TradeRecordClient) Delete() *TradeRecordDelete
Delete returns a delete builder for TradeRecord.
func (*TradeRecordClient) DeleteOne ¶
func (c *TradeRecordClient) DeleteOne(tr *TradeRecord) *TradeRecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TradeRecordClient) DeleteOneID ¶
func (c *TradeRecordClient) DeleteOneID(id int) *TradeRecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TradeRecordClient) Get ¶
func (c *TradeRecordClient) Get(ctx context.Context, id int) (*TradeRecord, error)
Get returns a TradeRecord entity by its id.
func (*TradeRecordClient) GetX ¶
func (c *TradeRecordClient) GetX(ctx context.Context, id int) *TradeRecord
GetX is like Get, but panics if an error occurs.
func (*TradeRecordClient) Hooks ¶
func (c *TradeRecordClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TradeRecordClient) Intercept ¶
func (c *TradeRecordClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `traderecord.Intercept(f(g(h())))`.
func (*TradeRecordClient) Interceptors ¶
func (c *TradeRecordClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TradeRecordClient) Query ¶
func (c *TradeRecordClient) Query() *TradeRecordQuery
Query returns a query builder for TradeRecord.
func (*TradeRecordClient) QueryConditions ¶
func (c *TradeRecordClient) QueryConditions(tr *TradeRecord) *TradeConditionQuery
QueryConditions queries the conditions edge of a TradeRecord.
func (*TradeRecordClient) QueryCorrection ¶
func (c *TradeRecordClient) QueryCorrection(tr *TradeRecord) *TradeCorrectionQuery
QueryCorrection queries the correction edge of a TradeRecord.
func (*TradeRecordClient) QueryExchange ¶
func (c *TradeRecordClient) QueryExchange(tr *TradeRecord) *ExchangeQuery
QueryExchange queries the exchange edge of a TradeRecord.
func (*TradeRecordClient) QueryTimeRange ¶
func (c *TradeRecordClient) QueryTimeRange(tr *TradeRecord) *TradeTimeRangeQuery
QueryTimeRange queries the time_range edge of a TradeRecord.
func (*TradeRecordClient) Update ¶
func (c *TradeRecordClient) Update() *TradeRecordUpdate
Update returns an update builder for TradeRecord.
func (*TradeRecordClient) UpdateOne ¶
func (c *TradeRecordClient) UpdateOne(tr *TradeRecord) *TradeRecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TradeRecordClient) UpdateOneID ¶
func (c *TradeRecordClient) UpdateOneID(id int) *TradeRecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TradeRecordClient) Use ¶
func (c *TradeRecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `traderecord.Hooks(f(g(h())))`.
type TradeRecordCreate ¶
type TradeRecordCreate struct {
// contains filtered or unexported fields
}
TradeRecordCreate is the builder for creating a TradeRecord entity.
func (*TradeRecordCreate) AddConditionIDs ¶
func (trc *TradeRecordCreate) AddConditionIDs(ids ...int) *TradeRecordCreate
AddConditionIDs adds the "conditions" edge to the TradeCondition entity by IDs.
func (*TradeRecordCreate) AddConditions ¶
func (trc *TradeRecordCreate) AddConditions(t ...*TradeCondition) *TradeRecordCreate
AddConditions adds the "conditions" edges to the TradeCondition entity.
func (*TradeRecordCreate) AddCorrection ¶
func (trc *TradeRecordCreate) AddCorrection(t ...*TradeCorrection) *TradeRecordCreate
AddCorrection adds the "correction" edges to the TradeCorrection entity.
func (*TradeRecordCreate) AddCorrectionIDs ¶
func (trc *TradeRecordCreate) AddCorrectionIDs(ids ...int) *TradeRecordCreate
AddCorrectionIDs adds the "correction" edge to the TradeCorrection entity by IDs.
func (*TradeRecordCreate) AddExchange ¶
func (trc *TradeRecordCreate) AddExchange(e ...*Exchange) *TradeRecordCreate
AddExchange adds the "exchange" edges to the Exchange entity.
func (*TradeRecordCreate) AddExchangeIDs ¶
func (trc *TradeRecordCreate) AddExchangeIDs(ids ...int) *TradeRecordCreate
AddExchangeIDs adds the "exchange" edge to the Exchange entity by IDs.
func (*TradeRecordCreate) Exec ¶
func (trc *TradeRecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeRecordCreate) ExecX ¶
func (trc *TradeRecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeRecordCreate) Mutation ¶
func (trc *TradeRecordCreate) Mutation() *TradeRecordMutation
Mutation returns the TradeRecordMutation object of the builder.
func (*TradeRecordCreate) Save ¶
func (trc *TradeRecordCreate) Save(ctx context.Context) (*TradeRecord, error)
Save creates the TradeRecord in the database.
func (*TradeRecordCreate) SaveX ¶
func (trc *TradeRecordCreate) SaveX(ctx context.Context) *TradeRecord
SaveX calls Save and panics if Save returns an error.
func (*TradeRecordCreate) SetPrice ¶
func (trc *TradeRecordCreate) SetPrice(f float64) *TradeRecordCreate
SetPrice sets the "price" field.
func (*TradeRecordCreate) SetTimeRange ¶
func (trc *TradeRecordCreate) SetTimeRange(t *TradeTimeRange) *TradeRecordCreate
SetTimeRange sets the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordCreate) SetTimeRangeID ¶
func (trc *TradeRecordCreate) SetTimeRangeID(i int) *TradeRecordCreate
SetTimeRangeID sets the "time_range_id" field.
func (*TradeRecordCreate) SetTimestamp ¶
func (trc *TradeRecordCreate) SetTimestamp(t time.Time) *TradeRecordCreate
SetTimestamp sets the "timestamp" field.
func (*TradeRecordCreate) SetVolume ¶
func (trc *TradeRecordCreate) SetVolume(i int32) *TradeRecordCreate
SetVolume sets the "volume" field.
type TradeRecordCreateBulk ¶
type TradeRecordCreateBulk struct {
// contains filtered or unexported fields
}
TradeRecordCreateBulk is the builder for creating many TradeRecord entities in bulk.
func (*TradeRecordCreateBulk) Exec ¶
func (trcb *TradeRecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeRecordCreateBulk) ExecX ¶
func (trcb *TradeRecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeRecordCreateBulk) Save ¶
func (trcb *TradeRecordCreateBulk) Save(ctx context.Context) ([]*TradeRecord, error)
Save creates the TradeRecord entities in the database.
func (*TradeRecordCreateBulk) SaveX ¶
func (trcb *TradeRecordCreateBulk) SaveX(ctx context.Context) []*TradeRecord
SaveX is like Save, but panics if an error occurs.
type TradeRecordDelete ¶
type TradeRecordDelete struct {
// contains filtered or unexported fields
}
TradeRecordDelete is the builder for deleting a TradeRecord entity.
func (*TradeRecordDelete) Exec ¶
func (trd *TradeRecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TradeRecordDelete) ExecX ¶
func (trd *TradeRecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TradeRecordDelete) Where ¶
func (trd *TradeRecordDelete) Where(ps ...predicate.TradeRecord) *TradeRecordDelete
Where appends a list predicates to the TradeRecordDelete builder.
type TradeRecordDeleteOne ¶
type TradeRecordDeleteOne struct {
// contains filtered or unexported fields
}
TradeRecordDeleteOne is the builder for deleting a single TradeRecord entity.
func (*TradeRecordDeleteOne) Exec ¶
func (trdo *TradeRecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TradeRecordDeleteOne) ExecX ¶
func (trdo *TradeRecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TradeRecordEdges ¶
type TradeRecordEdges struct { // TimeRange holds the value of the time_range edge. TimeRange *TradeTimeRange `json:"time_range,omitempty"` // Conditions holds the value of the conditions edge. Conditions []*TradeCondition `json:"conditions,omitempty"` // Correction holds the value of the correction edge. Correction []*TradeCorrection `json:"correction,omitempty"` // Exchange holds the value of the exchange edge. Exchange []*Exchange `json:"exchange,omitempty"` // contains filtered or unexported fields }
TradeRecordEdges holds the relations/edges for other nodes in the graph.
func (TradeRecordEdges) ConditionsOrErr ¶
func (e TradeRecordEdges) ConditionsOrErr() ([]*TradeCondition, error)
ConditionsOrErr returns the Conditions value or an error if the edge was not loaded in eager-loading.
func (TradeRecordEdges) CorrectionOrErr ¶
func (e TradeRecordEdges) CorrectionOrErr() ([]*TradeCorrection, error)
CorrectionOrErr returns the Correction value or an error if the edge was not loaded in eager-loading.
func (TradeRecordEdges) ExchangeOrErr ¶
func (e TradeRecordEdges) ExchangeOrErr() ([]*Exchange, error)
ExchangeOrErr returns the Exchange value or an error if the edge was not loaded in eager-loading.
func (TradeRecordEdges) TimeRangeOrErr ¶
func (e TradeRecordEdges) TimeRangeOrErr() (*TradeTimeRange, error)
TimeRangeOrErr returns the TimeRange value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TradeRecordGroupBy ¶
type TradeRecordGroupBy struct {
// contains filtered or unexported fields
}
TradeRecordGroupBy is the group-by builder for TradeRecord entities.
func (*TradeRecordGroupBy) Aggregate ¶
func (trgb *TradeRecordGroupBy) Aggregate(fns ...AggregateFunc) *TradeRecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TradeRecordGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeRecordGroupBy) Scan ¶
func (trgb *TradeRecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeRecordGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeRecordMutation ¶
type TradeRecordMutation struct {
// contains filtered or unexported fields
}
TradeRecordMutation represents an operation that mutates the TradeRecord nodes in the graph.
func (*TradeRecordMutation) AddConditionIDs ¶
func (m *TradeRecordMutation) AddConditionIDs(ids ...int)
AddConditionIDs adds the "conditions" edge to the TradeCondition entity by ids.
func (*TradeRecordMutation) AddCorrectionIDs ¶
func (m *TradeRecordMutation) AddCorrectionIDs(ids ...int)
AddCorrectionIDs adds the "correction" edge to the TradeCorrection entity by ids.
func (*TradeRecordMutation) AddExchangeIDs ¶
func (m *TradeRecordMutation) AddExchangeIDs(ids ...int)
AddExchangeIDs adds the "exchange" edge to the Exchange entity by ids.
func (*TradeRecordMutation) AddField ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) AddPrice ¶
func (m *TradeRecordMutation) AddPrice(f float64)
AddPrice adds f to the "price" field.
func (*TradeRecordMutation) AddVolume ¶
func (m *TradeRecordMutation) AddVolume(i int32)
AddVolume adds i to the "volume" field.
func (*TradeRecordMutation) AddedEdges ¶
func (m *TradeRecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TradeRecordMutation) AddedField ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) AddedFields ¶
func (m *TradeRecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TradeRecordMutation) AddedIDs ¶
func (m *TradeRecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TradeRecordMutation) AddedPrice ¶
func (m *TradeRecordMutation) AddedPrice() (r float64, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*TradeRecordMutation) AddedVolume ¶
func (m *TradeRecordMutation) AddedVolume() (r int32, exists bool)
AddedVolume returns the value that was added to the "volume" field in this mutation.
func (*TradeRecordMutation) ClearConditions ¶
func (m *TradeRecordMutation) ClearConditions()
ClearConditions clears the "conditions" edge to the TradeCondition entity.
func (*TradeRecordMutation) ClearCorrection ¶
func (m *TradeRecordMutation) ClearCorrection()
ClearCorrection clears the "correction" edge to the TradeCorrection entity.
func (*TradeRecordMutation) ClearEdge ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ClearExchange ¶
func (m *TradeRecordMutation) ClearExchange()
ClearExchange clears the "exchange" edge to the Exchange entity.
func (*TradeRecordMutation) ClearField ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ClearTimeRange ¶
func (m *TradeRecordMutation) ClearTimeRange()
ClearTimeRange clears the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordMutation) ClearedEdges ¶
func (m *TradeRecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TradeRecordMutation) ClearedFields ¶
func (m *TradeRecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TradeRecordMutation) Client ¶
func (m TradeRecordMutation) 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 (*TradeRecordMutation) ConditionsCleared ¶
func (m *TradeRecordMutation) ConditionsCleared() bool
ConditionsCleared reports if the "conditions" edge to the TradeCondition entity was cleared.
func (*TradeRecordMutation) ConditionsIDs ¶
func (m *TradeRecordMutation) ConditionsIDs() (ids []int)
ConditionsIDs returns the "conditions" edge IDs in the mutation.
func (*TradeRecordMutation) CorrectionCleared ¶
func (m *TradeRecordMutation) CorrectionCleared() bool
CorrectionCleared reports if the "correction" edge to the TradeCorrection entity was cleared.
func (*TradeRecordMutation) CorrectionIDs ¶
func (m *TradeRecordMutation) CorrectionIDs() (ids []int)
CorrectionIDs returns the "correction" edge IDs in the mutation.
func (*TradeRecordMutation) EdgeCleared ¶
func (m *TradeRecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TradeRecordMutation) ExchangeCleared ¶
func (m *TradeRecordMutation) ExchangeCleared() bool
ExchangeCleared reports if the "exchange" edge to the Exchange entity was cleared.
func (*TradeRecordMutation) ExchangeIDs ¶
func (m *TradeRecordMutation) ExchangeIDs() (ids []int)
ExchangeIDs returns the "exchange" edge IDs in the mutation.
func (*TradeRecordMutation) Field ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) FieldCleared ¶
func (m *TradeRecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TradeRecordMutation) Fields ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ID ¶
func (m *TradeRecordMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TradeRecordMutation) IDs ¶
func (m *TradeRecordMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TradeRecordMutation) 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 (*TradeRecordMutation) OldPrice ¶
func (m *TradeRecordMutation) OldPrice(ctx context.Context) (v float64, err error)
OldPrice returns the old "price" field's value of the TradeRecord entity. If the TradeRecord 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 (*TradeRecordMutation) OldTimeRangeID ¶
func (m *TradeRecordMutation) OldTimeRangeID(ctx context.Context) (v int, err error)
OldTimeRangeID returns the old "time_range_id" field's value of the TradeRecord entity. If the TradeRecord 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 (*TradeRecordMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the TradeRecord entity. If the TradeRecord 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 (*TradeRecordMutation) OldVolume ¶
func (m *TradeRecordMutation) OldVolume(ctx context.Context) (v int32, err error)
OldVolume returns the old "volume" field's value of the TradeRecord entity. If the TradeRecord 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 (*TradeRecordMutation) Op ¶
func (m *TradeRecordMutation) Op() Op
Op returns the operation name.
func (*TradeRecordMutation) Price ¶
func (m *TradeRecordMutation) Price() (r float64, exists bool)
Price returns the value of the "price" field in the mutation.
func (*TradeRecordMutation) RemoveConditionIDs ¶
func (m *TradeRecordMutation) RemoveConditionIDs(ids ...int)
RemoveConditionIDs removes the "conditions" edge to the TradeCondition entity by IDs.
func (*TradeRecordMutation) RemoveCorrectionIDs ¶
func (m *TradeRecordMutation) RemoveCorrectionIDs(ids ...int)
RemoveCorrectionIDs removes the "correction" edge to the TradeCorrection entity by IDs.
func (*TradeRecordMutation) RemoveExchangeIDs ¶
func (m *TradeRecordMutation) RemoveExchangeIDs(ids ...int)
RemoveExchangeIDs removes the "exchange" edge to the Exchange entity by IDs.
func (*TradeRecordMutation) RemovedConditionsIDs ¶
func (m *TradeRecordMutation) RemovedConditionsIDs() (ids []int)
RemovedConditions returns the removed IDs of the "conditions" edge to the TradeCondition entity.
func (*TradeRecordMutation) RemovedCorrectionIDs ¶
func (m *TradeRecordMutation) RemovedCorrectionIDs() (ids []int)
RemovedCorrection returns the removed IDs of the "correction" edge to the TradeCorrection entity.
func (*TradeRecordMutation) RemovedEdges ¶
func (m *TradeRecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TradeRecordMutation) RemovedExchangeIDs ¶
func (m *TradeRecordMutation) RemovedExchangeIDs() (ids []int)
RemovedExchange returns the removed IDs of the "exchange" edge to the Exchange entity.
func (*TradeRecordMutation) RemovedIDs ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ResetConditions ¶
func (m *TradeRecordMutation) ResetConditions()
ResetConditions resets all changes to the "conditions" edge.
func (*TradeRecordMutation) ResetCorrection ¶
func (m *TradeRecordMutation) ResetCorrection()
ResetCorrection resets all changes to the "correction" edge.
func (*TradeRecordMutation) ResetEdge ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ResetExchange ¶
func (m *TradeRecordMutation) ResetExchange()
ResetExchange resets all changes to the "exchange" edge.
func (*TradeRecordMutation) ResetField ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) ResetPrice ¶
func (m *TradeRecordMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*TradeRecordMutation) ResetTimeRange ¶
func (m *TradeRecordMutation) ResetTimeRange()
ResetTimeRange resets all changes to the "time_range" edge.
func (*TradeRecordMutation) ResetTimeRangeID ¶
func (m *TradeRecordMutation) ResetTimeRangeID()
ResetTimeRangeID resets all changes to the "time_range_id" field.
func (*TradeRecordMutation) ResetTimestamp ¶
func (m *TradeRecordMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*TradeRecordMutation) ResetVolume ¶
func (m *TradeRecordMutation) ResetVolume()
ResetVolume resets all changes to the "volume" field.
func (*TradeRecordMutation) SetField ¶
func (m *TradeRecordMutation) 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 (*TradeRecordMutation) SetOp ¶
func (m *TradeRecordMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TradeRecordMutation) SetPrice ¶
func (m *TradeRecordMutation) SetPrice(f float64)
SetPrice sets the "price" field.
func (*TradeRecordMutation) SetTimeRangeID ¶
func (m *TradeRecordMutation) SetTimeRangeID(i int)
SetTimeRangeID sets the "time_range_id" field.
func (*TradeRecordMutation) SetTimestamp ¶
func (m *TradeRecordMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*TradeRecordMutation) SetVolume ¶
func (m *TradeRecordMutation) SetVolume(i int32)
SetVolume sets the "volume" field.
func (*TradeRecordMutation) TimeRangeCleared ¶
func (m *TradeRecordMutation) TimeRangeCleared() bool
TimeRangeCleared reports if the "time_range" edge to the TradeTimeRange entity was cleared.
func (*TradeRecordMutation) TimeRangeID ¶
func (m *TradeRecordMutation) TimeRangeID() (r int, exists bool)
TimeRangeID returns the value of the "time_range_id" field in the mutation.
func (*TradeRecordMutation) TimeRangeIDs ¶
func (m *TradeRecordMutation) TimeRangeIDs() (ids []int)
TimeRangeIDs returns the "time_range" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TimeRangeID instead. It exists only for internal usage by the builders.
func (*TradeRecordMutation) Timestamp ¶
func (m *TradeRecordMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (TradeRecordMutation) Tx ¶
func (m TradeRecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TradeRecordMutation) Type ¶
func (m *TradeRecordMutation) Type() string
Type returns the node type of this mutation (TradeRecord).
func (*TradeRecordMutation) Volume ¶
func (m *TradeRecordMutation) Volume() (r int32, exists bool)
Volume returns the value of the "volume" field in the mutation.
func (*TradeRecordMutation) Where ¶
func (m *TradeRecordMutation) Where(ps ...predicate.TradeRecord)
Where appends a list predicates to the TradeRecordMutation builder.
func (*TradeRecordMutation) WhereP ¶
func (m *TradeRecordMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TradeRecordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TradeRecordQuery ¶
type TradeRecordQuery struct {
// contains filtered or unexported fields
}
TradeRecordQuery is the builder for querying TradeRecord entities.
func (*TradeRecordQuery) Aggregate ¶
func (trq *TradeRecordQuery) Aggregate(fns ...AggregateFunc) *TradeRecordSelect
Aggregate returns a TradeRecordSelect configured with the given aggregations.
func (*TradeRecordQuery) All ¶
func (trq *TradeRecordQuery) All(ctx context.Context) ([]*TradeRecord, error)
All executes the query and returns a list of TradeRecords.
func (*TradeRecordQuery) AllX ¶
func (trq *TradeRecordQuery) AllX(ctx context.Context) []*TradeRecord
AllX is like All, but panics if an error occurs.
func (*TradeRecordQuery) Clone ¶
func (trq *TradeRecordQuery) Clone() *TradeRecordQuery
Clone returns a duplicate of the TradeRecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TradeRecordQuery) Count ¶
func (trq *TradeRecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TradeRecordQuery) CountX ¶
func (trq *TradeRecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TradeRecordQuery) Exist ¶
func (trq *TradeRecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TradeRecordQuery) ExistX ¶
func (trq *TradeRecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TradeRecordQuery) First ¶
func (trq *TradeRecordQuery) First(ctx context.Context) (*TradeRecord, error)
First returns the first TradeRecord entity from the query. Returns a *NotFoundError when no TradeRecord was found.
func (*TradeRecordQuery) FirstID ¶
func (trq *TradeRecordQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TradeRecord ID from the query. Returns a *NotFoundError when no TradeRecord ID was found.
func (*TradeRecordQuery) FirstIDX ¶
func (trq *TradeRecordQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TradeRecordQuery) FirstX ¶
func (trq *TradeRecordQuery) FirstX(ctx context.Context) *TradeRecord
FirstX is like First, but panics if an error occurs.
func (*TradeRecordQuery) GroupBy ¶
func (trq *TradeRecordQuery) GroupBy(field string, fields ...string) *TradeRecordGroupBy
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 { Price float64 `json:"price,omitempty"` Count int `json:"count,omitempty"` } client.TradeRecord.Query(). GroupBy(traderecord.FieldPrice). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TradeRecordQuery) IDs ¶
func (trq *TradeRecordQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TradeRecord IDs.
func (*TradeRecordQuery) IDsX ¶
func (trq *TradeRecordQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TradeRecordQuery) Limit ¶
func (trq *TradeRecordQuery) Limit(limit int) *TradeRecordQuery
Limit the number of records to be returned by this query.
func (*TradeRecordQuery) Offset ¶
func (trq *TradeRecordQuery) Offset(offset int) *TradeRecordQuery
Offset to start from.
func (*TradeRecordQuery) Only ¶
func (trq *TradeRecordQuery) Only(ctx context.Context) (*TradeRecord, error)
Only returns a single TradeRecord entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TradeRecord entity is found. Returns a *NotFoundError when no TradeRecord entities are found.
func (*TradeRecordQuery) OnlyID ¶
func (trq *TradeRecordQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TradeRecord ID in the query. Returns a *NotSingularError when more than one TradeRecord ID is found. Returns a *NotFoundError when no entities are found.
func (*TradeRecordQuery) OnlyIDX ¶
func (trq *TradeRecordQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TradeRecordQuery) OnlyX ¶
func (trq *TradeRecordQuery) OnlyX(ctx context.Context) *TradeRecord
OnlyX is like Only, but panics if an error occurs.
func (*TradeRecordQuery) Order ¶
func (trq *TradeRecordQuery) Order(o ...OrderFunc) *TradeRecordQuery
Order specifies how the records should be ordered.
func (*TradeRecordQuery) QueryConditions ¶
func (trq *TradeRecordQuery) QueryConditions() *TradeConditionQuery
QueryConditions chains the current query on the "conditions" edge.
func (*TradeRecordQuery) QueryCorrection ¶
func (trq *TradeRecordQuery) QueryCorrection() *TradeCorrectionQuery
QueryCorrection chains the current query on the "correction" edge.
func (*TradeRecordQuery) QueryExchange ¶
func (trq *TradeRecordQuery) QueryExchange() *ExchangeQuery
QueryExchange chains the current query on the "exchange" edge.
func (*TradeRecordQuery) QueryTimeRange ¶
func (trq *TradeRecordQuery) QueryTimeRange() *TradeTimeRangeQuery
QueryTimeRange chains the current query on the "time_range" edge.
func (*TradeRecordQuery) Select ¶
func (trq *TradeRecordQuery) Select(fields ...string) *TradeRecordSelect
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 { Price float64 `json:"price,omitempty"` } client.TradeRecord.Query(). Select(traderecord.FieldPrice). Scan(ctx, &v)
func (*TradeRecordQuery) Unique ¶
func (trq *TradeRecordQuery) Unique(unique bool) *TradeRecordQuery
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 (*TradeRecordQuery) Where ¶
func (trq *TradeRecordQuery) Where(ps ...predicate.TradeRecord) *TradeRecordQuery
Where adds a new predicate for the TradeRecordQuery builder.
func (*TradeRecordQuery) WithConditions ¶
func (trq *TradeRecordQuery) WithConditions(opts ...func(*TradeConditionQuery)) *TradeRecordQuery
WithConditions tells the query-builder to eager-load the nodes that are connected to the "conditions" edge. The optional arguments are used to configure the query builder of the edge.
func (*TradeRecordQuery) WithCorrection ¶
func (trq *TradeRecordQuery) WithCorrection(opts ...func(*TradeCorrectionQuery)) *TradeRecordQuery
WithCorrection tells the query-builder to eager-load the nodes that are connected to the "correction" edge. The optional arguments are used to configure the query builder of the edge.
func (*TradeRecordQuery) WithExchange ¶
func (trq *TradeRecordQuery) WithExchange(opts ...func(*ExchangeQuery)) *TradeRecordQuery
WithExchange tells the query-builder to eager-load the nodes that are connected to the "exchange" edge. The optional arguments are used to configure the query builder of the edge.
func (*TradeRecordQuery) WithTimeRange ¶
func (trq *TradeRecordQuery) WithTimeRange(opts ...func(*TradeTimeRangeQuery)) *TradeRecordQuery
WithTimeRange tells the query-builder to eager-load the nodes that are connected to the "time_range" edge. The optional arguments are used to configure the query builder of the edge.
type TradeRecordSelect ¶
type TradeRecordSelect struct { *TradeRecordQuery // contains filtered or unexported fields }
TradeRecordSelect is the builder for selecting fields of TradeRecord entities.
func (*TradeRecordSelect) Aggregate ¶
func (trs *TradeRecordSelect) Aggregate(fns ...AggregateFunc) *TradeRecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TradeRecordSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeRecordSelect) Scan ¶
func (trs *TradeRecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeRecordSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeRecordUpdate ¶
type TradeRecordUpdate struct {
// contains filtered or unexported fields
}
TradeRecordUpdate is the builder for updating TradeRecord entities.
func (*TradeRecordUpdate) AddConditionIDs ¶
func (tru *TradeRecordUpdate) AddConditionIDs(ids ...int) *TradeRecordUpdate
AddConditionIDs adds the "conditions" edge to the TradeCondition entity by IDs.
func (*TradeRecordUpdate) AddConditions ¶
func (tru *TradeRecordUpdate) AddConditions(t ...*TradeCondition) *TradeRecordUpdate
AddConditions adds the "conditions" edges to the TradeCondition entity.
func (*TradeRecordUpdate) AddCorrection ¶
func (tru *TradeRecordUpdate) AddCorrection(t ...*TradeCorrection) *TradeRecordUpdate
AddCorrection adds the "correction" edges to the TradeCorrection entity.
func (*TradeRecordUpdate) AddCorrectionIDs ¶
func (tru *TradeRecordUpdate) AddCorrectionIDs(ids ...int) *TradeRecordUpdate
AddCorrectionIDs adds the "correction" edge to the TradeCorrection entity by IDs.
func (*TradeRecordUpdate) AddExchange ¶
func (tru *TradeRecordUpdate) AddExchange(e ...*Exchange) *TradeRecordUpdate
AddExchange adds the "exchange" edges to the Exchange entity.
func (*TradeRecordUpdate) AddExchangeIDs ¶
func (tru *TradeRecordUpdate) AddExchangeIDs(ids ...int) *TradeRecordUpdate
AddExchangeIDs adds the "exchange" edge to the Exchange entity by IDs.
func (*TradeRecordUpdate) AddPrice ¶
func (tru *TradeRecordUpdate) AddPrice(f float64) *TradeRecordUpdate
AddPrice adds f to the "price" field.
func (*TradeRecordUpdate) AddVolume ¶
func (tru *TradeRecordUpdate) AddVolume(i int32) *TradeRecordUpdate
AddVolume adds i to the "volume" field.
func (*TradeRecordUpdate) ClearConditions ¶
func (tru *TradeRecordUpdate) ClearConditions() *TradeRecordUpdate
ClearConditions clears all "conditions" edges to the TradeCondition entity.
func (*TradeRecordUpdate) ClearCorrection ¶
func (tru *TradeRecordUpdate) ClearCorrection() *TradeRecordUpdate
ClearCorrection clears all "correction" edges to the TradeCorrection entity.
func (*TradeRecordUpdate) ClearExchange ¶
func (tru *TradeRecordUpdate) ClearExchange() *TradeRecordUpdate
ClearExchange clears all "exchange" edges to the Exchange entity.
func (*TradeRecordUpdate) ClearTimeRange ¶
func (tru *TradeRecordUpdate) ClearTimeRange() *TradeRecordUpdate
ClearTimeRange clears the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordUpdate) Exec ¶
func (tru *TradeRecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeRecordUpdate) ExecX ¶
func (tru *TradeRecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeRecordUpdate) Mutation ¶
func (tru *TradeRecordUpdate) Mutation() *TradeRecordMutation
Mutation returns the TradeRecordMutation object of the builder.
func (*TradeRecordUpdate) RemoveConditionIDs ¶
func (tru *TradeRecordUpdate) RemoveConditionIDs(ids ...int) *TradeRecordUpdate
RemoveConditionIDs removes the "conditions" edge to TradeCondition entities by IDs.
func (*TradeRecordUpdate) RemoveConditions ¶
func (tru *TradeRecordUpdate) RemoveConditions(t ...*TradeCondition) *TradeRecordUpdate
RemoveConditions removes "conditions" edges to TradeCondition entities.
func (*TradeRecordUpdate) RemoveCorrection ¶
func (tru *TradeRecordUpdate) RemoveCorrection(t ...*TradeCorrection) *TradeRecordUpdate
RemoveCorrection removes "correction" edges to TradeCorrection entities.
func (*TradeRecordUpdate) RemoveCorrectionIDs ¶
func (tru *TradeRecordUpdate) RemoveCorrectionIDs(ids ...int) *TradeRecordUpdate
RemoveCorrectionIDs removes the "correction" edge to TradeCorrection entities by IDs.
func (*TradeRecordUpdate) RemoveExchange ¶
func (tru *TradeRecordUpdate) RemoveExchange(e ...*Exchange) *TradeRecordUpdate
RemoveExchange removes "exchange" edges to Exchange entities.
func (*TradeRecordUpdate) RemoveExchangeIDs ¶
func (tru *TradeRecordUpdate) RemoveExchangeIDs(ids ...int) *TradeRecordUpdate
RemoveExchangeIDs removes the "exchange" edge to Exchange entities by IDs.
func (*TradeRecordUpdate) Save ¶
func (tru *TradeRecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TradeRecordUpdate) SaveX ¶
func (tru *TradeRecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TradeRecordUpdate) SetPrice ¶
func (tru *TradeRecordUpdate) SetPrice(f float64) *TradeRecordUpdate
SetPrice sets the "price" field.
func (*TradeRecordUpdate) SetTimeRange ¶
func (tru *TradeRecordUpdate) SetTimeRange(t *TradeTimeRange) *TradeRecordUpdate
SetTimeRange sets the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordUpdate) SetTimeRangeID ¶
func (tru *TradeRecordUpdate) SetTimeRangeID(i int) *TradeRecordUpdate
SetTimeRangeID sets the "time_range_id" field.
func (*TradeRecordUpdate) SetTimestamp ¶
func (tru *TradeRecordUpdate) SetTimestamp(t time.Time) *TradeRecordUpdate
SetTimestamp sets the "timestamp" field.
func (*TradeRecordUpdate) SetVolume ¶
func (tru *TradeRecordUpdate) SetVolume(i int32) *TradeRecordUpdate
SetVolume sets the "volume" field.
func (*TradeRecordUpdate) Where ¶
func (tru *TradeRecordUpdate) Where(ps ...predicate.TradeRecord) *TradeRecordUpdate
Where appends a list predicates to the TradeRecordUpdate builder.
type TradeRecordUpdateOne ¶
type TradeRecordUpdateOne struct {
// contains filtered or unexported fields
}
TradeRecordUpdateOne is the builder for updating a single TradeRecord entity.
func (*TradeRecordUpdateOne) AddConditionIDs ¶
func (truo *TradeRecordUpdateOne) AddConditionIDs(ids ...int) *TradeRecordUpdateOne
AddConditionIDs adds the "conditions" edge to the TradeCondition entity by IDs.
func (*TradeRecordUpdateOne) AddConditions ¶
func (truo *TradeRecordUpdateOne) AddConditions(t ...*TradeCondition) *TradeRecordUpdateOne
AddConditions adds the "conditions" edges to the TradeCondition entity.
func (*TradeRecordUpdateOne) AddCorrection ¶
func (truo *TradeRecordUpdateOne) AddCorrection(t ...*TradeCorrection) *TradeRecordUpdateOne
AddCorrection adds the "correction" edges to the TradeCorrection entity.
func (*TradeRecordUpdateOne) AddCorrectionIDs ¶
func (truo *TradeRecordUpdateOne) AddCorrectionIDs(ids ...int) *TradeRecordUpdateOne
AddCorrectionIDs adds the "correction" edge to the TradeCorrection entity by IDs.
func (*TradeRecordUpdateOne) AddExchange ¶
func (truo *TradeRecordUpdateOne) AddExchange(e ...*Exchange) *TradeRecordUpdateOne
AddExchange adds the "exchange" edges to the Exchange entity.
func (*TradeRecordUpdateOne) AddExchangeIDs ¶
func (truo *TradeRecordUpdateOne) AddExchangeIDs(ids ...int) *TradeRecordUpdateOne
AddExchangeIDs adds the "exchange" edge to the Exchange entity by IDs.
func (*TradeRecordUpdateOne) AddPrice ¶
func (truo *TradeRecordUpdateOne) AddPrice(f float64) *TradeRecordUpdateOne
AddPrice adds f to the "price" field.
func (*TradeRecordUpdateOne) AddVolume ¶
func (truo *TradeRecordUpdateOne) AddVolume(i int32) *TradeRecordUpdateOne
AddVolume adds i to the "volume" field.
func (*TradeRecordUpdateOne) ClearConditions ¶
func (truo *TradeRecordUpdateOne) ClearConditions() *TradeRecordUpdateOne
ClearConditions clears all "conditions" edges to the TradeCondition entity.
func (*TradeRecordUpdateOne) ClearCorrection ¶
func (truo *TradeRecordUpdateOne) ClearCorrection() *TradeRecordUpdateOne
ClearCorrection clears all "correction" edges to the TradeCorrection entity.
func (*TradeRecordUpdateOne) ClearExchange ¶
func (truo *TradeRecordUpdateOne) ClearExchange() *TradeRecordUpdateOne
ClearExchange clears all "exchange" edges to the Exchange entity.
func (*TradeRecordUpdateOne) ClearTimeRange ¶
func (truo *TradeRecordUpdateOne) ClearTimeRange() *TradeRecordUpdateOne
ClearTimeRange clears the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordUpdateOne) Exec ¶
func (truo *TradeRecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TradeRecordUpdateOne) ExecX ¶
func (truo *TradeRecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeRecordUpdateOne) Mutation ¶
func (truo *TradeRecordUpdateOne) Mutation() *TradeRecordMutation
Mutation returns the TradeRecordMutation object of the builder.
func (*TradeRecordUpdateOne) RemoveConditionIDs ¶
func (truo *TradeRecordUpdateOne) RemoveConditionIDs(ids ...int) *TradeRecordUpdateOne
RemoveConditionIDs removes the "conditions" edge to TradeCondition entities by IDs.
func (*TradeRecordUpdateOne) RemoveConditions ¶
func (truo *TradeRecordUpdateOne) RemoveConditions(t ...*TradeCondition) *TradeRecordUpdateOne
RemoveConditions removes "conditions" edges to TradeCondition entities.
func (*TradeRecordUpdateOne) RemoveCorrection ¶
func (truo *TradeRecordUpdateOne) RemoveCorrection(t ...*TradeCorrection) *TradeRecordUpdateOne
RemoveCorrection removes "correction" edges to TradeCorrection entities.
func (*TradeRecordUpdateOne) RemoveCorrectionIDs ¶
func (truo *TradeRecordUpdateOne) RemoveCorrectionIDs(ids ...int) *TradeRecordUpdateOne
RemoveCorrectionIDs removes the "correction" edge to TradeCorrection entities by IDs.
func (*TradeRecordUpdateOne) RemoveExchange ¶
func (truo *TradeRecordUpdateOne) RemoveExchange(e ...*Exchange) *TradeRecordUpdateOne
RemoveExchange removes "exchange" edges to Exchange entities.
func (*TradeRecordUpdateOne) RemoveExchangeIDs ¶
func (truo *TradeRecordUpdateOne) RemoveExchangeIDs(ids ...int) *TradeRecordUpdateOne
RemoveExchangeIDs removes the "exchange" edge to Exchange entities by IDs.
func (*TradeRecordUpdateOne) Save ¶
func (truo *TradeRecordUpdateOne) Save(ctx context.Context) (*TradeRecord, error)
Save executes the query and returns the updated TradeRecord entity.
func (*TradeRecordUpdateOne) SaveX ¶
func (truo *TradeRecordUpdateOne) SaveX(ctx context.Context) *TradeRecord
SaveX is like Save, but panics if an error occurs.
func (*TradeRecordUpdateOne) Select ¶
func (truo *TradeRecordUpdateOne) Select(field string, fields ...string) *TradeRecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TradeRecordUpdateOne) SetPrice ¶
func (truo *TradeRecordUpdateOne) SetPrice(f float64) *TradeRecordUpdateOne
SetPrice sets the "price" field.
func (*TradeRecordUpdateOne) SetTimeRange ¶
func (truo *TradeRecordUpdateOne) SetTimeRange(t *TradeTimeRange) *TradeRecordUpdateOne
SetTimeRange sets the "time_range" edge to the TradeTimeRange entity.
func (*TradeRecordUpdateOne) SetTimeRangeID ¶
func (truo *TradeRecordUpdateOne) SetTimeRangeID(i int) *TradeRecordUpdateOne
SetTimeRangeID sets the "time_range_id" field.
func (*TradeRecordUpdateOne) SetTimestamp ¶
func (truo *TradeRecordUpdateOne) SetTimestamp(t time.Time) *TradeRecordUpdateOne
SetTimestamp sets the "timestamp" field.
func (*TradeRecordUpdateOne) SetVolume ¶
func (truo *TradeRecordUpdateOne) SetVolume(i int32) *TradeRecordUpdateOne
SetVolume sets the "volume" field.
type TradeRecords ¶
type TradeRecords []*TradeRecord
TradeRecords is a parsable slice of TradeRecord.
type TradeTimeRange ¶
type TradeTimeRange struct { // ID of the ent. ID int `json:"id,omitempty"` // Start holds the value of the "start" field. Start time.Time `json:"start,omitempty"` // End holds the value of the "end" field. End time.Time `json:"end,omitempty"` // IntervalID holds the value of the "interval_id" field. IntervalID int `json:"interval_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TradeTimeRangeQuery when eager-loading is set. Edges TradeTimeRangeEdges `json:"edges"` // contains filtered or unexported fields }
TradeTimeRange is the model entity for the TradeTimeRange schema.
func (*TradeTimeRange) QueryInterval ¶
func (ttr *TradeTimeRange) QueryInterval() *IntervalQuery
QueryInterval queries the "interval" edge of the TradeTimeRange entity.
func (*TradeTimeRange) QueryRecords ¶
func (ttr *TradeTimeRange) QueryRecords() *TradeRecordQuery
QueryRecords queries the "records" edge of the TradeTimeRange entity.
func (*TradeTimeRange) String ¶
func (ttr *TradeTimeRange) String() string
String implements the fmt.Stringer.
func (*TradeTimeRange) Unwrap ¶
func (ttr *TradeTimeRange) Unwrap() *TradeTimeRange
Unwrap unwraps the TradeTimeRange 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 (*TradeTimeRange) Update ¶
func (ttr *TradeTimeRange) Update() *TradeTimeRangeUpdateOne
Update returns a builder for updating this TradeTimeRange. Note that you need to call TradeTimeRange.Unwrap() before calling this method if this TradeTimeRange was returned from a transaction, and the transaction was committed or rolled back.
type TradeTimeRangeClient ¶
type TradeTimeRangeClient struct {
// contains filtered or unexported fields
}
TradeTimeRangeClient is a client for the TradeTimeRange schema.
func NewTradeTimeRangeClient ¶
func NewTradeTimeRangeClient(c config) *TradeTimeRangeClient
NewTradeTimeRangeClient returns a client for the TradeTimeRange from the given config.
func (*TradeTimeRangeClient) Create ¶
func (c *TradeTimeRangeClient) Create() *TradeTimeRangeCreate
Create returns a builder for creating a TradeTimeRange entity.
func (*TradeTimeRangeClient) CreateBulk ¶
func (c *TradeTimeRangeClient) CreateBulk(builders ...*TradeTimeRangeCreate) *TradeTimeRangeCreateBulk
CreateBulk returns a builder for creating a bulk of TradeTimeRange entities.
func (*TradeTimeRangeClient) Delete ¶
func (c *TradeTimeRangeClient) Delete() *TradeTimeRangeDelete
Delete returns a delete builder for TradeTimeRange.
func (*TradeTimeRangeClient) DeleteOne ¶
func (c *TradeTimeRangeClient) DeleteOne(ttr *TradeTimeRange) *TradeTimeRangeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TradeTimeRangeClient) DeleteOneID ¶
func (c *TradeTimeRangeClient) DeleteOneID(id int) *TradeTimeRangeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TradeTimeRangeClient) Get ¶
func (c *TradeTimeRangeClient) Get(ctx context.Context, id int) (*TradeTimeRange, error)
Get returns a TradeTimeRange entity by its id.
func (*TradeTimeRangeClient) GetX ¶
func (c *TradeTimeRangeClient) GetX(ctx context.Context, id int) *TradeTimeRange
GetX is like Get, but panics if an error occurs.
func (*TradeTimeRangeClient) Hooks ¶
func (c *TradeTimeRangeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TradeTimeRangeClient) Intercept ¶
func (c *TradeTimeRangeClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tradetimerange.Intercept(f(g(h())))`.
func (*TradeTimeRangeClient) Interceptors ¶
func (c *TradeTimeRangeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TradeTimeRangeClient) Query ¶
func (c *TradeTimeRangeClient) Query() *TradeTimeRangeQuery
Query returns a query builder for TradeTimeRange.
func (*TradeTimeRangeClient) QueryInterval ¶
func (c *TradeTimeRangeClient) QueryInterval(ttr *TradeTimeRange) *IntervalQuery
QueryInterval queries the interval edge of a TradeTimeRange.
func (*TradeTimeRangeClient) QueryRecords ¶
func (c *TradeTimeRangeClient) QueryRecords(ttr *TradeTimeRange) *TradeRecordQuery
QueryRecords queries the records edge of a TradeTimeRange.
func (*TradeTimeRangeClient) Update ¶
func (c *TradeTimeRangeClient) Update() *TradeTimeRangeUpdate
Update returns an update builder for TradeTimeRange.
func (*TradeTimeRangeClient) UpdateOne ¶
func (c *TradeTimeRangeClient) UpdateOne(ttr *TradeTimeRange) *TradeTimeRangeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TradeTimeRangeClient) UpdateOneID ¶
func (c *TradeTimeRangeClient) UpdateOneID(id int) *TradeTimeRangeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TradeTimeRangeClient) Use ¶
func (c *TradeTimeRangeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tradetimerange.Hooks(f(g(h())))`.
type TradeTimeRangeCreate ¶
type TradeTimeRangeCreate struct {
// contains filtered or unexported fields
}
TradeTimeRangeCreate is the builder for creating a TradeTimeRange entity.
func (*TradeTimeRangeCreate) AddRecordIDs ¶
func (ttrc *TradeTimeRangeCreate) AddRecordIDs(ids ...int) *TradeTimeRangeCreate
AddRecordIDs adds the "records" edge to the TradeRecord entity by IDs.
func (*TradeTimeRangeCreate) AddRecords ¶
func (ttrc *TradeTimeRangeCreate) AddRecords(t ...*TradeRecord) *TradeTimeRangeCreate
AddRecords adds the "records" edges to the TradeRecord entity.
func (*TradeTimeRangeCreate) Exec ¶
func (ttrc *TradeTimeRangeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeTimeRangeCreate) ExecX ¶
func (ttrc *TradeTimeRangeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeTimeRangeCreate) Mutation ¶
func (ttrc *TradeTimeRangeCreate) Mutation() *TradeTimeRangeMutation
Mutation returns the TradeTimeRangeMutation object of the builder.
func (*TradeTimeRangeCreate) Save ¶
func (ttrc *TradeTimeRangeCreate) Save(ctx context.Context) (*TradeTimeRange, error)
Save creates the TradeTimeRange in the database.
func (*TradeTimeRangeCreate) SaveX ¶
func (ttrc *TradeTimeRangeCreate) SaveX(ctx context.Context) *TradeTimeRange
SaveX calls Save and panics if Save returns an error.
func (*TradeTimeRangeCreate) SetEnd ¶
func (ttrc *TradeTimeRangeCreate) SetEnd(t time.Time) *TradeTimeRangeCreate
SetEnd sets the "end" field.
func (*TradeTimeRangeCreate) SetInterval ¶
func (ttrc *TradeTimeRangeCreate) SetInterval(i *Interval) *TradeTimeRangeCreate
SetInterval sets the "interval" edge to the Interval entity.
func (*TradeTimeRangeCreate) SetIntervalID ¶
func (ttrc *TradeTimeRangeCreate) SetIntervalID(i int) *TradeTimeRangeCreate
SetIntervalID sets the "interval_id" field.
func (*TradeTimeRangeCreate) SetStart ¶
func (ttrc *TradeTimeRangeCreate) SetStart(t time.Time) *TradeTimeRangeCreate
SetStart sets the "start" field.
type TradeTimeRangeCreateBulk ¶
type TradeTimeRangeCreateBulk struct {
// contains filtered or unexported fields
}
TradeTimeRangeCreateBulk is the builder for creating many TradeTimeRange entities in bulk.
func (*TradeTimeRangeCreateBulk) Exec ¶
func (ttrcb *TradeTimeRangeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeTimeRangeCreateBulk) ExecX ¶
func (ttrcb *TradeTimeRangeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeTimeRangeCreateBulk) Save ¶
func (ttrcb *TradeTimeRangeCreateBulk) Save(ctx context.Context) ([]*TradeTimeRange, error)
Save creates the TradeTimeRange entities in the database.
func (*TradeTimeRangeCreateBulk) SaveX ¶
func (ttrcb *TradeTimeRangeCreateBulk) SaveX(ctx context.Context) []*TradeTimeRange
SaveX is like Save, but panics if an error occurs.
type TradeTimeRangeDelete ¶
type TradeTimeRangeDelete struct {
// contains filtered or unexported fields
}
TradeTimeRangeDelete is the builder for deleting a TradeTimeRange entity.
func (*TradeTimeRangeDelete) Exec ¶
func (ttrd *TradeTimeRangeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TradeTimeRangeDelete) ExecX ¶
func (ttrd *TradeTimeRangeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TradeTimeRangeDelete) Where ¶
func (ttrd *TradeTimeRangeDelete) Where(ps ...predicate.TradeTimeRange) *TradeTimeRangeDelete
Where appends a list predicates to the TradeTimeRangeDelete builder.
type TradeTimeRangeDeleteOne ¶
type TradeTimeRangeDeleteOne struct {
// contains filtered or unexported fields
}
TradeTimeRangeDeleteOne is the builder for deleting a single TradeTimeRange entity.
func (*TradeTimeRangeDeleteOne) Exec ¶
func (ttrdo *TradeTimeRangeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TradeTimeRangeDeleteOne) ExecX ¶
func (ttrdo *TradeTimeRangeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TradeTimeRangeEdges ¶
type TradeTimeRangeEdges struct { // Interval holds the value of the interval edge. Interval *Interval `json:"interval,omitempty"` // Records holds the value of the records edge. Records []*TradeRecord `json:"records,omitempty"` // contains filtered or unexported fields }
TradeTimeRangeEdges holds the relations/edges for other nodes in the graph.
func (TradeTimeRangeEdges) IntervalOrErr ¶
func (e TradeTimeRangeEdges) IntervalOrErr() (*Interval, error)
IntervalOrErr returns the Interval value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TradeTimeRangeEdges) RecordsOrErr ¶
func (e TradeTimeRangeEdges) RecordsOrErr() ([]*TradeRecord, error)
RecordsOrErr returns the Records value or an error if the edge was not loaded in eager-loading.
type TradeTimeRangeGroupBy ¶
type TradeTimeRangeGroupBy struct {
// contains filtered or unexported fields
}
TradeTimeRangeGroupBy is the group-by builder for TradeTimeRange entities.
func (*TradeTimeRangeGroupBy) Aggregate ¶
func (ttrgb *TradeTimeRangeGroupBy) Aggregate(fns ...AggregateFunc) *TradeTimeRangeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TradeTimeRangeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TradeTimeRangeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeGroupBy) Scan ¶
func (ttrgb *TradeTimeRangeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeTimeRangeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeTimeRangeMutation ¶
type TradeTimeRangeMutation struct {
// contains filtered or unexported fields
}
TradeTimeRangeMutation represents an operation that mutates the TradeTimeRange nodes in the graph.
func (*TradeTimeRangeMutation) AddField ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) AddRecordIDs ¶
func (m *TradeTimeRangeMutation) AddRecordIDs(ids ...int)
AddRecordIDs adds the "records" edge to the TradeRecord entity by ids.
func (*TradeTimeRangeMutation) AddedEdges ¶
func (m *TradeTimeRangeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TradeTimeRangeMutation) AddedField ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) AddedFields ¶
func (m *TradeTimeRangeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TradeTimeRangeMutation) AddedIDs ¶
func (m *TradeTimeRangeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TradeTimeRangeMutation) ClearEdge ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) ClearField ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) ClearInterval ¶
func (m *TradeTimeRangeMutation) ClearInterval()
ClearInterval clears the "interval" edge to the Interval entity.
func (*TradeTimeRangeMutation) ClearRecords ¶
func (m *TradeTimeRangeMutation) ClearRecords()
ClearRecords clears the "records" edge to the TradeRecord entity.
func (*TradeTimeRangeMutation) ClearedEdges ¶
func (m *TradeTimeRangeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TradeTimeRangeMutation) ClearedFields ¶
func (m *TradeTimeRangeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TradeTimeRangeMutation) Client ¶
func (m TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) EdgeCleared ¶
func (m *TradeTimeRangeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TradeTimeRangeMutation) End ¶
func (m *TradeTimeRangeMutation) End() (r time.Time, exists bool)
End returns the value of the "end" field in the mutation.
func (*TradeTimeRangeMutation) Field ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) FieldCleared ¶
func (m *TradeTimeRangeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TradeTimeRangeMutation) Fields ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) ID ¶
func (m *TradeTimeRangeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TradeTimeRangeMutation) IDs ¶
func (m *TradeTimeRangeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TradeTimeRangeMutation) IntervalCleared ¶
func (m *TradeTimeRangeMutation) IntervalCleared() bool
IntervalCleared reports if the "interval" edge to the Interval entity was cleared.
func (*TradeTimeRangeMutation) IntervalID ¶
func (m *TradeTimeRangeMutation) IntervalID() (r int, exists bool)
IntervalID returns the value of the "interval_id" field in the mutation.
func (*TradeTimeRangeMutation) IntervalIDs ¶
func (m *TradeTimeRangeMutation) IntervalIDs() (ids []int)
IntervalIDs returns the "interval" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IntervalID instead. It exists only for internal usage by the builders.
func (*TradeTimeRangeMutation) OldEnd ¶
OldEnd returns the old "end" field's value of the TradeTimeRange entity. If the TradeTimeRange 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 (*TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) OldIntervalID ¶
func (m *TradeTimeRangeMutation) OldIntervalID(ctx context.Context) (v int, err error)
OldIntervalID returns the old "interval_id" field's value of the TradeTimeRange entity. If the TradeTimeRange 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 (*TradeTimeRangeMutation) OldStart ¶
OldStart returns the old "start" field's value of the TradeTimeRange entity. If the TradeTimeRange 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 (*TradeTimeRangeMutation) Op ¶
func (m *TradeTimeRangeMutation) Op() Op
Op returns the operation name.
func (*TradeTimeRangeMutation) RecordsCleared ¶
func (m *TradeTimeRangeMutation) RecordsCleared() bool
RecordsCleared reports if the "records" edge to the TradeRecord entity was cleared.
func (*TradeTimeRangeMutation) RecordsIDs ¶
func (m *TradeTimeRangeMutation) RecordsIDs() (ids []int)
RecordsIDs returns the "records" edge IDs in the mutation.
func (*TradeTimeRangeMutation) RemoveRecordIDs ¶
func (m *TradeTimeRangeMutation) RemoveRecordIDs(ids ...int)
RemoveRecordIDs removes the "records" edge to the TradeRecord entity by IDs.
func (*TradeTimeRangeMutation) RemovedEdges ¶
func (m *TradeTimeRangeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TradeTimeRangeMutation) RemovedIDs ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) RemovedRecordsIDs ¶
func (m *TradeTimeRangeMutation) RemovedRecordsIDs() (ids []int)
RemovedRecords returns the removed IDs of the "records" edge to the TradeRecord entity.
func (*TradeTimeRangeMutation) ResetEdge ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) ResetEnd ¶
func (m *TradeTimeRangeMutation) ResetEnd()
ResetEnd resets all changes to the "end" field.
func (*TradeTimeRangeMutation) ResetField ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) ResetInterval ¶
func (m *TradeTimeRangeMutation) ResetInterval()
ResetInterval resets all changes to the "interval" edge.
func (*TradeTimeRangeMutation) ResetIntervalID ¶
func (m *TradeTimeRangeMutation) ResetIntervalID()
ResetIntervalID resets all changes to the "interval_id" field.
func (*TradeTimeRangeMutation) ResetRecords ¶
func (m *TradeTimeRangeMutation) ResetRecords()
ResetRecords resets all changes to the "records" edge.
func (*TradeTimeRangeMutation) ResetStart ¶
func (m *TradeTimeRangeMutation) ResetStart()
ResetStart resets all changes to the "start" field.
func (*TradeTimeRangeMutation) SetEnd ¶
func (m *TradeTimeRangeMutation) SetEnd(t time.Time)
SetEnd sets the "end" field.
func (*TradeTimeRangeMutation) SetField ¶
func (m *TradeTimeRangeMutation) 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 (*TradeTimeRangeMutation) SetIntervalID ¶
func (m *TradeTimeRangeMutation) SetIntervalID(i int)
SetIntervalID sets the "interval_id" field.
func (*TradeTimeRangeMutation) SetOp ¶
func (m *TradeTimeRangeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TradeTimeRangeMutation) SetStart ¶
func (m *TradeTimeRangeMutation) SetStart(t time.Time)
SetStart sets the "start" field.
func (*TradeTimeRangeMutation) Start ¶
func (m *TradeTimeRangeMutation) Start() (r time.Time, exists bool)
Start returns the value of the "start" field in the mutation.
func (TradeTimeRangeMutation) Tx ¶
func (m TradeTimeRangeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TradeTimeRangeMutation) Type ¶
func (m *TradeTimeRangeMutation) Type() string
Type returns the node type of this mutation (TradeTimeRange).
func (*TradeTimeRangeMutation) Where ¶
func (m *TradeTimeRangeMutation) Where(ps ...predicate.TradeTimeRange)
Where appends a list predicates to the TradeTimeRangeMutation builder.
func (*TradeTimeRangeMutation) WhereP ¶
func (m *TradeTimeRangeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TradeTimeRangeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TradeTimeRangeQuery ¶
type TradeTimeRangeQuery struct {
// contains filtered or unexported fields
}
TradeTimeRangeQuery is the builder for querying TradeTimeRange entities.
func (*TradeTimeRangeQuery) Aggregate ¶
func (ttrq *TradeTimeRangeQuery) Aggregate(fns ...AggregateFunc) *TradeTimeRangeSelect
Aggregate returns a TradeTimeRangeSelect configured with the given aggregations.
func (*TradeTimeRangeQuery) All ¶
func (ttrq *TradeTimeRangeQuery) All(ctx context.Context) ([]*TradeTimeRange, error)
All executes the query and returns a list of TradeTimeRanges.
func (*TradeTimeRangeQuery) AllX ¶
func (ttrq *TradeTimeRangeQuery) AllX(ctx context.Context) []*TradeTimeRange
AllX is like All, but panics if an error occurs.
func (*TradeTimeRangeQuery) Clone ¶
func (ttrq *TradeTimeRangeQuery) Clone() *TradeTimeRangeQuery
Clone returns a duplicate of the TradeTimeRangeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TradeTimeRangeQuery) Count ¶
func (ttrq *TradeTimeRangeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TradeTimeRangeQuery) CountX ¶
func (ttrq *TradeTimeRangeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TradeTimeRangeQuery) Exist ¶
func (ttrq *TradeTimeRangeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TradeTimeRangeQuery) ExistX ¶
func (ttrq *TradeTimeRangeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TradeTimeRangeQuery) First ¶
func (ttrq *TradeTimeRangeQuery) First(ctx context.Context) (*TradeTimeRange, error)
First returns the first TradeTimeRange entity from the query. Returns a *NotFoundError when no TradeTimeRange was found.
func (*TradeTimeRangeQuery) FirstID ¶
func (ttrq *TradeTimeRangeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TradeTimeRange ID from the query. Returns a *NotFoundError when no TradeTimeRange ID was found.
func (*TradeTimeRangeQuery) FirstIDX ¶
func (ttrq *TradeTimeRangeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TradeTimeRangeQuery) FirstX ¶
func (ttrq *TradeTimeRangeQuery) FirstX(ctx context.Context) *TradeTimeRange
FirstX is like First, but panics if an error occurs.
func (*TradeTimeRangeQuery) GroupBy ¶
func (ttrq *TradeTimeRangeQuery) GroupBy(field string, fields ...string) *TradeTimeRangeGroupBy
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 { Start time.Time `json:"start,omitempty"` Count int `json:"count,omitempty"` } client.TradeTimeRange.Query(). GroupBy(tradetimerange.FieldStart). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TradeTimeRangeQuery) IDs ¶
func (ttrq *TradeTimeRangeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TradeTimeRange IDs.
func (*TradeTimeRangeQuery) IDsX ¶
func (ttrq *TradeTimeRangeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TradeTimeRangeQuery) Limit ¶
func (ttrq *TradeTimeRangeQuery) Limit(limit int) *TradeTimeRangeQuery
Limit the number of records to be returned by this query.
func (*TradeTimeRangeQuery) Offset ¶
func (ttrq *TradeTimeRangeQuery) Offset(offset int) *TradeTimeRangeQuery
Offset to start from.
func (*TradeTimeRangeQuery) Only ¶
func (ttrq *TradeTimeRangeQuery) Only(ctx context.Context) (*TradeTimeRange, error)
Only returns a single TradeTimeRange entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TradeTimeRange entity is found. Returns a *NotFoundError when no TradeTimeRange entities are found.
func (*TradeTimeRangeQuery) OnlyID ¶
func (ttrq *TradeTimeRangeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TradeTimeRange ID in the query. Returns a *NotSingularError when more than one TradeTimeRange ID is found. Returns a *NotFoundError when no entities are found.
func (*TradeTimeRangeQuery) OnlyIDX ¶
func (ttrq *TradeTimeRangeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TradeTimeRangeQuery) OnlyX ¶
func (ttrq *TradeTimeRangeQuery) OnlyX(ctx context.Context) *TradeTimeRange
OnlyX is like Only, but panics if an error occurs.
func (*TradeTimeRangeQuery) Order ¶
func (ttrq *TradeTimeRangeQuery) Order(o ...OrderFunc) *TradeTimeRangeQuery
Order specifies how the records should be ordered.
func (*TradeTimeRangeQuery) QueryInterval ¶
func (ttrq *TradeTimeRangeQuery) QueryInterval() *IntervalQuery
QueryInterval chains the current query on the "interval" edge.
func (*TradeTimeRangeQuery) QueryRecords ¶
func (ttrq *TradeTimeRangeQuery) QueryRecords() *TradeRecordQuery
QueryRecords chains the current query on the "records" edge.
func (*TradeTimeRangeQuery) Select ¶
func (ttrq *TradeTimeRangeQuery) Select(fields ...string) *TradeTimeRangeSelect
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 { Start time.Time `json:"start,omitempty"` } client.TradeTimeRange.Query(). Select(tradetimerange.FieldStart). Scan(ctx, &v)
func (*TradeTimeRangeQuery) Unique ¶
func (ttrq *TradeTimeRangeQuery) Unique(unique bool) *TradeTimeRangeQuery
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 (*TradeTimeRangeQuery) Where ¶
func (ttrq *TradeTimeRangeQuery) Where(ps ...predicate.TradeTimeRange) *TradeTimeRangeQuery
Where adds a new predicate for the TradeTimeRangeQuery builder.
func (*TradeTimeRangeQuery) WithInterval ¶
func (ttrq *TradeTimeRangeQuery) WithInterval(opts ...func(*IntervalQuery)) *TradeTimeRangeQuery
WithInterval tells the query-builder to eager-load the nodes that are connected to the "interval" edge. The optional arguments are used to configure the query builder of the edge.
func (*TradeTimeRangeQuery) WithRecords ¶
func (ttrq *TradeTimeRangeQuery) WithRecords(opts ...func(*TradeRecordQuery)) *TradeTimeRangeQuery
WithRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge. The optional arguments are used to configure the query builder of the edge.
type TradeTimeRangeSelect ¶
type TradeTimeRangeSelect struct { *TradeTimeRangeQuery // contains filtered or unexported fields }
TradeTimeRangeSelect is the builder for selecting fields of TradeTimeRange entities.
func (*TradeTimeRangeSelect) Aggregate ¶
func (ttrs *TradeTimeRangeSelect) Aggregate(fns ...AggregateFunc) *TradeTimeRangeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TradeTimeRangeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TradeTimeRangeSelect) Scan ¶
func (ttrs *TradeTimeRangeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TradeTimeRangeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TradeTimeRangeUpdate ¶
type TradeTimeRangeUpdate struct {
// contains filtered or unexported fields
}
TradeTimeRangeUpdate is the builder for updating TradeTimeRange entities.
func (*TradeTimeRangeUpdate) AddRecordIDs ¶
func (ttru *TradeTimeRangeUpdate) AddRecordIDs(ids ...int) *TradeTimeRangeUpdate
AddRecordIDs adds the "records" edge to the TradeRecord entity by IDs.
func (*TradeTimeRangeUpdate) AddRecords ¶
func (ttru *TradeTimeRangeUpdate) AddRecords(t ...*TradeRecord) *TradeTimeRangeUpdate
AddRecords adds the "records" edges to the TradeRecord entity.
func (*TradeTimeRangeUpdate) ClearInterval ¶
func (ttru *TradeTimeRangeUpdate) ClearInterval() *TradeTimeRangeUpdate
ClearInterval clears the "interval" edge to the Interval entity.
func (*TradeTimeRangeUpdate) ClearRecords ¶
func (ttru *TradeTimeRangeUpdate) ClearRecords() *TradeTimeRangeUpdate
ClearRecords clears all "records" edges to the TradeRecord entity.
func (*TradeTimeRangeUpdate) Exec ¶
func (ttru *TradeTimeRangeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TradeTimeRangeUpdate) ExecX ¶
func (ttru *TradeTimeRangeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeTimeRangeUpdate) Mutation ¶
func (ttru *TradeTimeRangeUpdate) Mutation() *TradeTimeRangeMutation
Mutation returns the TradeTimeRangeMutation object of the builder.
func (*TradeTimeRangeUpdate) RemoveRecordIDs ¶
func (ttru *TradeTimeRangeUpdate) RemoveRecordIDs(ids ...int) *TradeTimeRangeUpdate
RemoveRecordIDs removes the "records" edge to TradeRecord entities by IDs.
func (*TradeTimeRangeUpdate) RemoveRecords ¶
func (ttru *TradeTimeRangeUpdate) RemoveRecords(t ...*TradeRecord) *TradeTimeRangeUpdate
RemoveRecords removes "records" edges to TradeRecord entities.
func (*TradeTimeRangeUpdate) Save ¶
func (ttru *TradeTimeRangeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TradeTimeRangeUpdate) SaveX ¶
func (ttru *TradeTimeRangeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TradeTimeRangeUpdate) SetEnd ¶
func (ttru *TradeTimeRangeUpdate) SetEnd(t time.Time) *TradeTimeRangeUpdate
SetEnd sets the "end" field.
func (*TradeTimeRangeUpdate) SetInterval ¶
func (ttru *TradeTimeRangeUpdate) SetInterval(i *Interval) *TradeTimeRangeUpdate
SetInterval sets the "interval" edge to the Interval entity.
func (*TradeTimeRangeUpdate) SetIntervalID ¶
func (ttru *TradeTimeRangeUpdate) SetIntervalID(i int) *TradeTimeRangeUpdate
SetIntervalID sets the "interval_id" field.
func (*TradeTimeRangeUpdate) SetStart ¶
func (ttru *TradeTimeRangeUpdate) SetStart(t time.Time) *TradeTimeRangeUpdate
SetStart sets the "start" field.
func (*TradeTimeRangeUpdate) Where ¶
func (ttru *TradeTimeRangeUpdate) Where(ps ...predicate.TradeTimeRange) *TradeTimeRangeUpdate
Where appends a list predicates to the TradeTimeRangeUpdate builder.
type TradeTimeRangeUpdateOne ¶
type TradeTimeRangeUpdateOne struct {
// contains filtered or unexported fields
}
TradeTimeRangeUpdateOne is the builder for updating a single TradeTimeRange entity.
func (*TradeTimeRangeUpdateOne) AddRecordIDs ¶
func (ttruo *TradeTimeRangeUpdateOne) AddRecordIDs(ids ...int) *TradeTimeRangeUpdateOne
AddRecordIDs adds the "records" edge to the TradeRecord entity by IDs.
func (*TradeTimeRangeUpdateOne) AddRecords ¶
func (ttruo *TradeTimeRangeUpdateOne) AddRecords(t ...*TradeRecord) *TradeTimeRangeUpdateOne
AddRecords adds the "records" edges to the TradeRecord entity.
func (*TradeTimeRangeUpdateOne) ClearInterval ¶
func (ttruo *TradeTimeRangeUpdateOne) ClearInterval() *TradeTimeRangeUpdateOne
ClearInterval clears the "interval" edge to the Interval entity.
func (*TradeTimeRangeUpdateOne) ClearRecords ¶
func (ttruo *TradeTimeRangeUpdateOne) ClearRecords() *TradeTimeRangeUpdateOne
ClearRecords clears all "records" edges to the TradeRecord entity.
func (*TradeTimeRangeUpdateOne) Exec ¶
func (ttruo *TradeTimeRangeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TradeTimeRangeUpdateOne) ExecX ¶
func (ttruo *TradeTimeRangeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TradeTimeRangeUpdateOne) Mutation ¶
func (ttruo *TradeTimeRangeUpdateOne) Mutation() *TradeTimeRangeMutation
Mutation returns the TradeTimeRangeMutation object of the builder.
func (*TradeTimeRangeUpdateOne) RemoveRecordIDs ¶
func (ttruo *TradeTimeRangeUpdateOne) RemoveRecordIDs(ids ...int) *TradeTimeRangeUpdateOne
RemoveRecordIDs removes the "records" edge to TradeRecord entities by IDs.
func (*TradeTimeRangeUpdateOne) RemoveRecords ¶
func (ttruo *TradeTimeRangeUpdateOne) RemoveRecords(t ...*TradeRecord) *TradeTimeRangeUpdateOne
RemoveRecords removes "records" edges to TradeRecord entities.
func (*TradeTimeRangeUpdateOne) Save ¶
func (ttruo *TradeTimeRangeUpdateOne) Save(ctx context.Context) (*TradeTimeRange, error)
Save executes the query and returns the updated TradeTimeRange entity.
func (*TradeTimeRangeUpdateOne) SaveX ¶
func (ttruo *TradeTimeRangeUpdateOne) SaveX(ctx context.Context) *TradeTimeRange
SaveX is like Save, but panics if an error occurs.
func (*TradeTimeRangeUpdateOne) Select ¶
func (ttruo *TradeTimeRangeUpdateOne) Select(field string, fields ...string) *TradeTimeRangeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TradeTimeRangeUpdateOne) SetEnd ¶
func (ttruo *TradeTimeRangeUpdateOne) SetEnd(t time.Time) *TradeTimeRangeUpdateOne
SetEnd sets the "end" field.
func (*TradeTimeRangeUpdateOne) SetInterval ¶
func (ttruo *TradeTimeRangeUpdateOne) SetInterval(i *Interval) *TradeTimeRangeUpdateOne
SetInterval sets the "interval" edge to the Interval entity.
func (*TradeTimeRangeUpdateOne) SetIntervalID ¶
func (ttruo *TradeTimeRangeUpdateOne) SetIntervalID(i int) *TradeTimeRangeUpdateOne
SetIntervalID sets the "interval_id" field.
func (*TradeTimeRangeUpdateOne) SetStart ¶
func (ttruo *TradeTimeRangeUpdateOne) SetStart(t time.Time) *TradeTimeRangeUpdateOne
SetStart sets the "start" field.
type TradeTimeRanges ¶
type TradeTimeRanges []*TradeTimeRange
TradeTimeRanges is a parsable slice of TradeTimeRange.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // BarGroup is the client for interacting with the BarGroup builders. BarGroup *BarGroupClient // BarRecord is the client for interacting with the BarRecord builders. BarRecord *BarRecordClient // BarTimeRange is the client for interacting with the BarTimeRange builders. BarTimeRange *BarTimeRangeClient // DataSource is the client for interacting with the DataSource builders. DataSource *DataSourceClient // Dividend is the client for interacting with the Dividend builders. Dividend *DividendClient // Entity is the client for interacting with the Entity builders. Entity *EntityClient // Exchange is the client for interacting with the Exchange builders. Exchange *ExchangeClient // Financial is the client for interacting with the Financial builders. Financial *FinancialClient // Interval is the client for interacting with the Interval builders. Interval *IntervalClient // MarketHours is the client for interacting with the MarketHours builders. MarketHours *MarketHoursClient // MarketInfo is the client for interacting with the MarketInfo builders. MarketInfo *MarketInfoClient // Split is the client for interacting with the Split builders. Split *SplitClient // TradeCondition is the client for interacting with the TradeCondition builders. TradeCondition *TradeConditionClient // TradeCorrection is the client for interacting with the TradeCorrection builders. TradeCorrection *TradeCorrectionClient // TradeRecord is the client for interacting with the TradeRecord builders. TradeRecord *TradeRecordClient // TradeTimeRange is the client for interacting with the TradeTimeRange builders. TradeTimeRange *TradeTimeRangeClient // 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.
Source Files ¶
- bargroup.go
- bargroup_create.go
- bargroup_delete.go
- bargroup_query.go
- bargroup_update.go
- barrecord.go
- barrecord_create.go
- barrecord_delete.go
- barrecord_query.go
- barrecord_update.go
- bartimerange.go
- bartimerange_create.go
- bartimerange_delete.go
- bartimerange_query.go
- bartimerange_update.go
- client.go
- config.go
- context.go
- datasource.go
- datasource_create.go
- datasource_delete.go
- datasource_query.go
- datasource_update.go
- dividend.go
- dividend_create.go
- dividend_delete.go
- dividend_query.go
- dividend_update.go
- ent.go
- entity.go
- entity_create.go
- entity_delete.go
- entity_query.go
- entity_update.go
- exchange.go
- exchange_create.go
- exchange_delete.go
- exchange_query.go
- exchange_update.go
- financial.go
- financial_create.go
- financial_delete.go
- financial_query.go
- financial_update.go
- generate.go
- interval.go
- interval_create.go
- interval_delete.go
- interval_query.go
- interval_update.go
- markethours.go
- markethours_create.go
- markethours_delete.go
- markethours_query.go
- markethours_update.go
- marketinfo.go
- marketinfo_create.go
- marketinfo_delete.go
- marketinfo_query.go
- marketinfo_update.go
- mutation.go
- runtime.go
- split.go
- split_create.go
- split_delete.go
- split_query.go
- split_update.go
- tradecondition.go
- tradecondition_create.go
- tradecondition_delete.go
- tradecondition_query.go
- tradecondition_update.go
- tradecorrection.go
- tradecorrection_create.go
- tradecorrection_delete.go
- tradecorrection_query.go
- tradecorrection_update.go
- traderecord.go
- traderecord_create.go
- traderecord_delete.go
- traderecord_query.go
- traderecord_update.go
- tradetimerange.go
- tradetimerange_create.go
- tradetimerange_delete.go
- tradetimerange_query.go
- tradetimerange_update.go
- tx.go
Directories ¶
Path | Synopsis |
---|---|
Code generated by ogen, DO NOT EDIT.
|
Code generated by ogen, DO NOT EDIT. |