Documentation ¶
Index ¶
- Variables
- func NewAvgBuffer(child sql.Expression) *avgBuffer
- func NewCountBuffer(child sql.Expression) *countBuffer
- func NewCountDistinctBuffer(child sql.Expression) *countDistinctBuffer
- func NewEmptyGroupConcat() sql.Expression
- func NewFirstBuffer(child sql.Expression) *firstBuffer
- func NewJSONObjectAgg(key, value sql.Expression) sql.Expression
- func NewJsonArrayBuffer(child sql.Expression) *jsonArrayBuffer
- func NewLastBuffer(child sql.Expression) *lastBuffer
- func NewMaxBuffer(child sql.Expression) *maxBuffer
- func NewMinBuffer(child sql.Expression) *minBuffer
- func NewRangeCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRangeUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewRowsUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
- func NewSumBuffer(child sql.Expression) *sumBuffer
- type Aggregation
- type Avg
- func (a *Avg) Children() []sql.Expression
- func (a Avg) Description() string
- func (a *Avg) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Avg) FunctionName() string
- func (a *Avg) IsNullable() bool
- func (a *Avg) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Avg) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Avg) Resolved() bool
- func (a *Avg) String() string
- func (a *Avg) Type() sql.Type
- func (a *Avg) Window() *sql.WindowDefinition
- func (a *Avg) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Avg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type AvgAgg
- func (a *AvgAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *AvgAgg) DefaultFramer() sql.WindowFramer
- func (a *AvgAgg) Dispose()
- func (a *AvgAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *AvgAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *AvgAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type Count
- func (a *Count) Children() []sql.Expression
- func (a Count) Description() string
- func (a *Count) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Count) FunctionName() string
- func (a *Count) IsNullable() bool
- func (a *Count) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Count) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Count) Resolved() bool
- func (a *Count) String() string
- func (a *Count) Type() sql.Type
- func (a *Count) Window() *sql.WindowDefinition
- func (a *Count) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Count) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type CountAgg
- func (a *CountAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *CountAgg) DefaultFramer() sql.WindowFramer
- func (a *CountAgg) Dispose()
- func (a *CountAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *CountAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *CountAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type CountDistinct
- func (a *CountDistinct) Children() []sql.Expression
- func (a CountDistinct) Description() string
- func (a *CountDistinct) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a CountDistinct) FunctionName() string
- func (a *CountDistinct) IsNullable() bool
- func (a *CountDistinct) NewBuffer() (sql.AggregationBuffer, error)
- func (a *CountDistinct) NewWindowFunction() (sql.WindowFunction, error)
- func (a *CountDistinct) Resolved() bool
- func (a *CountDistinct) String() string
- func (a *CountDistinct) Type() sql.Type
- func (a *CountDistinct) Window() *sql.WindowDefinition
- func (a *CountDistinct) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *CountDistinct) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type First
- func (a *First) Children() []sql.Expression
- func (a First) Description() string
- func (a *First) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a First) FunctionName() string
- func (a *First) IsNullable() bool
- func (a *First) NewBuffer() (sql.AggregationBuffer, error)
- func (a *First) NewWindowFunction() (sql.WindowFunction, error)
- func (a *First) Resolved() bool
- func (a *First) String() string
- func (a *First) Type() sql.Type
- func (a *First) Window() *sql.WindowDefinition
- func (a *First) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *First) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type FirstAgg
- func (a *FirstAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *FirstAgg) DefaultFramer() sql.WindowFramer
- func (a *FirstAgg) Dispose()
- func (a *FirstAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *FirstAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *FirstAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type GroupByFramer
- func (f *GroupByFramer) FirstIdx() int
- func (f *GroupByFramer) Interval() (sql.WindowInterval, error)
- func (f *GroupByFramer) LastIdx() int
- func (f *GroupByFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *GroupByFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- func (f *GroupByFramer) SlidingInterval(ctx sql.Context) (sql.WindowInterval, sql.WindowInterval, sql.WindowInterval)
- type GroupConcat
- func (g *GroupConcat) Children() []sql.Expression
- func (g *GroupConcat) Description() string
- func (g *GroupConcat) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (g *GroupConcat) FunctionName() string
- func (g *GroupConcat) IsNullable() bool
- func (g *GroupConcat) NewBuffer() (sql.AggregationBuffer, error)
- func (g *GroupConcat) NewWindowFunction() (sql.WindowFunction, error)
- func (g *GroupConcat) Resolved() bool
- func (g *GroupConcat) String() string
- func (g *GroupConcat) Type() sql.Type
- func (g *GroupConcat) Window() *sql.WindowDefinition
- func (g *GroupConcat) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (g *GroupConcat) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type GroupConcatAgg
- func (a *GroupConcatAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *GroupConcatAgg) DefaultFramer() sql.WindowFramer
- func (a *GroupConcatAgg) Dispose()
- func (a *GroupConcatAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *GroupConcatAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *GroupConcatAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type JSONObjectAgg
- func (j *JSONObjectAgg) Children() []sql.Expression
- func (j *JSONObjectAgg) Description() string
- func (j *JSONObjectAgg) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (j *JSONObjectAgg) FunctionName() string
- func (j *JSONObjectAgg) IsNullable() bool
- func (j *JSONObjectAgg) NewBuffer() (sql.AggregationBuffer, error)
- func (j *JSONObjectAgg) NewWindowFunction() (sql.WindowFunction, error)
- func (j *JSONObjectAgg) Resolved() bool
- func (j *JSONObjectAgg) String() string
- func (j *JSONObjectAgg) Type() sql.Type
- func (j *JSONObjectAgg) Window() *sql.WindowDefinition
- func (j *JSONObjectAgg) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (j *JSONObjectAgg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type JsonArray
- func (a *JsonArray) Children() []sql.Expression
- func (a JsonArray) Description() string
- func (a *JsonArray) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a JsonArray) FunctionName() string
- func (a *JsonArray) IsNullable() bool
- func (a *JsonArray) NewBuffer() (sql.AggregationBuffer, error)
- func (a *JsonArray) NewWindowFunction() (sql.WindowFunction, error)
- func (a *JsonArray) Resolved() bool
- func (a *JsonArray) String() string
- func (a *JsonArray) Type() sql.Type
- func (a *JsonArray) Window() *sql.WindowDefinition
- func (a *JsonArray) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *JsonArray) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type Lag
- func (a *Lag) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *Lag) DefaultFramer() sql.WindowFramer
- func (a *Lag) Dispose()
- func (a *Lag) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *Lag) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *Lag) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type Last
- func (a *Last) Children() []sql.Expression
- func (a Last) Description() string
- func (a *Last) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Last) FunctionName() string
- func (a *Last) IsNullable() bool
- func (a *Last) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Last) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Last) Resolved() bool
- func (a *Last) String() string
- func (a *Last) Type() sql.Type
- func (a *Last) Window() *sql.WindowDefinition
- func (a *Last) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Last) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type LastAgg
- func (a *LastAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *LastAgg) DefaultFramer() sql.WindowFramer
- func (a *LastAgg) Dispose()
- func (a *LastAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *LastAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *LastAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type Lead
- func (a *Lead) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *Lead) DefaultFramer() sql.WindowFramer
- func (a *Lead) Dispose()
- func (a *Lead) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *Lead) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *Lead) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type Max
- func (a *Max) Children() []sql.Expression
- func (a Max) Description() string
- func (a *Max) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Max) FunctionName() string
- func (a *Max) IsNullable() bool
- func (a *Max) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Max) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Max) Resolved() bool
- func (a *Max) String() string
- func (a *Max) Type() sql.Type
- func (a *Max) Window() *sql.WindowDefinition
- func (a *Max) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Max) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type MaxAgg
- func (a *MaxAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *MaxAgg) DefaultFramer() sql.WindowFramer
- func (a *MaxAgg) Dispose()
- func (a *MaxAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *MaxAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *MaxAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type Min
- func (a *Min) Children() []sql.Expression
- func (a Min) Description() string
- func (a *Min) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Min) FunctionName() string
- func (a *Min) IsNullable() bool
- func (a *Min) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Min) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Min) Resolved() bool
- func (a *Min) String() string
- func (a *Min) Type() sql.Type
- func (a *Min) Window() *sql.WindowDefinition
- func (a *Min) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Min) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type MinAgg
- func (a *MinAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *MinAgg) DefaultFramer() sql.WindowFramer
- func (a *MinAgg) Dispose()
- func (a *MinAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *MinAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *MinAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type PartitionFramer
- func (f *PartitionFramer) Close()
- func (f *PartitionFramer) FirstIdx() int
- func (f *PartitionFramer) Interval() (sql.WindowInterval, error)
- func (f *PartitionFramer) LastIdx() int
- func (f *PartitionFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *PartitionFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- func (f *PartitionFramer) SlidingInterval(ctx sql.Context) (sql.WindowInterval, sql.WindowInterval, sql.WindowInterval)
- type PeerGroupFramer
- func (f *PeerGroupFramer) FirstIdx() int
- func (f *PeerGroupFramer) Interval() (sql.WindowInterval, error)
- func (f *PeerGroupFramer) LastIdx() int
- func (f *PeerGroupFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *PeerGroupFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type PercentRank
- func (a *PercentRank) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *PercentRank) DefaultFramer() sql.WindowFramer
- func (a *PercentRank) Dispose()
- func (a *PercentRank) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *PercentRank) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *PercentRank) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type RangeCurrentRowToCurrentRowFramer
- func (f *RangeCurrentRowToCurrentRowFramer) FirstIdx() int
- func (f *RangeCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeCurrentRowToCurrentRowFramer) LastIdx() int
- func (f *RangeCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeCurrentRowToNFollowingFramer
- func (f *RangeCurrentRowToNFollowingFramer) FirstIdx() int
- func (f *RangeCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeCurrentRowToNFollowingFramer) LastIdx() int
- func (f *RangeCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeCurrentRowToNPrecedingFramer
- func (f *RangeCurrentRowToNPrecedingFramer) FirstIdx() int
- func (f *RangeCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeCurrentRowToNPrecedingFramer) LastIdx() int
- func (f *RangeCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeCurrentRowToUnboundedFollowingFramer
- func (f *RangeCurrentRowToUnboundedFollowingFramer) FirstIdx() int
- func (f *RangeCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeCurrentRowToUnboundedFollowingFramer) LastIdx() int
- func (f *RangeCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNFollowingToCurrentRowFramer
- func (f *RangeNFollowingToCurrentRowFramer) FirstIdx() int
- func (f *RangeNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNFollowingToCurrentRowFramer) LastIdx() int
- func (f *RangeNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNFollowingToNFollowingFramer
- func (f *RangeNFollowingToNFollowingFramer) FirstIdx() int
- func (f *RangeNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNFollowingToNFollowingFramer) LastIdx() int
- func (f *RangeNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNFollowingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNFollowingToNPrecedingFramer
- func (f *RangeNFollowingToNPrecedingFramer) FirstIdx() int
- func (f *RangeNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNFollowingToNPrecedingFramer) LastIdx() int
- func (f *RangeNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNFollowingToUnboundedFollowingFramer
- func (f *RangeNFollowingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RangeNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNFollowingToUnboundedFollowingFramer) LastIdx() int
- func (f *RangeNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNPrecedingToCurrentRowFramer
- func (f *RangeNPrecedingToCurrentRowFramer) FirstIdx() int
- func (f *RangeNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNPrecedingToCurrentRowFramer) LastIdx() int
- func (f *RangeNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNPrecedingToNFollowingFramer
- func (f *RangeNPrecedingToNFollowingFramer) FirstIdx() int
- func (f *RangeNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNPrecedingToNFollowingFramer) LastIdx() int
- func (f *RangeNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNPrecedingToNPrecedingFramer
- func (f *RangeNPrecedingToNPrecedingFramer) FirstIdx() int
- func (f *RangeNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNPrecedingToNPrecedingFramer) LastIdx() int
- func (f *RangeNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeNPrecedingToUnboundedFollowingFramer
- func (f *RangeNPrecedingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RangeNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeNPrecedingToUnboundedFollowingFramer) LastIdx() int
- func (f *RangeNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeUnboundedPrecedingToCurrentRowFramer
- func (f *RangeUnboundedPrecedingToCurrentRowFramer) FirstIdx() int
- func (f *RangeUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeUnboundedPrecedingToCurrentRowFramer) LastIdx() int
- func (f *RangeUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeUnboundedPrecedingToNFollowingFramer
- func (f *RangeUnboundedPrecedingToNFollowingFramer) FirstIdx() int
- func (f *RangeUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeUnboundedPrecedingToNFollowingFramer) LastIdx() int
- func (f *RangeUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeUnboundedPrecedingToNPrecedingFramer
- func (f *RangeUnboundedPrecedingToNPrecedingFramer) FirstIdx() int
- func (f *RangeUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeUnboundedPrecedingToNPrecedingFramer) LastIdx() int
- func (f *RangeUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RangeUnboundedPrecedingToUnboundedFollowingFramer
- func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int
- func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
- type RowNumber
- func (a *RowNumber) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
- func (a *RowNumber) DefaultFramer() sql.WindowFramer
- func (a *RowNumber) Dispose()
- func (a *RowNumber) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *RowNumber) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
- func (a *RowNumber) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type RowsCurrentRowToCurrentRowFramer
- func (f *RowsCurrentRowToCurrentRowFramer) FirstIdx() int
- func (f *RowsCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsCurrentRowToCurrentRowFramer) LastIdx() int
- func (f *RowsCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsCurrentRowToNFollowingFramer
- func (f *RowsCurrentRowToNFollowingFramer) FirstIdx() int
- func (f *RowsCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsCurrentRowToNFollowingFramer) LastIdx() int
- func (f *RowsCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsCurrentRowToNPrecedingFramer
- func (f *RowsCurrentRowToNPrecedingFramer) FirstIdx() int
- func (f *RowsCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsCurrentRowToNPrecedingFramer) LastIdx() int
- func (f *RowsCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsCurrentRowToUnboundedFollowingFramer
- func (f *RowsCurrentRowToUnboundedFollowingFramer) FirstIdx() int
- func (f *RowsCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsCurrentRowToUnboundedFollowingFramer) LastIdx() int
- func (f *RowsCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNFollowingToCurrentRowFramer
- func (f *RowsNFollowingToCurrentRowFramer) FirstIdx() int
- func (f *RowsNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNFollowingToCurrentRowFramer) LastIdx() int
- func (f *RowsNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNFollowingToNFollowingFramer
- func (f *RowsNFollowingToNFollowingFramer) FirstIdx() int
- func (f *RowsNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNFollowingToNFollowingFramer) LastIdx() int
- func (f *RowsNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNFollowingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNFollowingToNPrecedingFramer
- func (f *RowsNFollowingToNPrecedingFramer) FirstIdx() int
- func (f *RowsNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNFollowingToNPrecedingFramer) LastIdx() int
- func (f *RowsNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNFollowingToUnboundedFollowingFramer
- func (f *RowsNFollowingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RowsNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNFollowingToUnboundedFollowingFramer) LastIdx() int
- func (f *RowsNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNPrecedingToCurrentRowFramer
- func (f *RowsNPrecedingToCurrentRowFramer) FirstIdx() int
- func (f *RowsNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNPrecedingToCurrentRowFramer) LastIdx() int
- func (f *RowsNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNPrecedingToNFollowingFramer
- func (f *RowsNPrecedingToNFollowingFramer) FirstIdx() int
- func (f *RowsNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNPrecedingToNFollowingFramer) LastIdx() int
- func (f *RowsNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNPrecedingToNPrecedingFramer
- func (f *RowsNPrecedingToNPrecedingFramer) FirstIdx() int
- func (f *RowsNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNPrecedingToNPrecedingFramer) LastIdx() int
- func (f *RowsNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsNPrecedingToUnboundedFollowingFramer
- func (f *RowsNPrecedingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RowsNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsNPrecedingToUnboundedFollowingFramer) LastIdx() int
- func (f *RowsNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsUnboundedPrecedingToCurrentRowFramer
- func (f *RowsUnboundedPrecedingToCurrentRowFramer) FirstIdx() int
- func (f *RowsUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsUnboundedPrecedingToCurrentRowFramer) LastIdx() int
- func (f *RowsUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsUnboundedPrecedingToNFollowingFramer
- func (f *RowsUnboundedPrecedingToNFollowingFramer) FirstIdx() int
- func (f *RowsUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsUnboundedPrecedingToNFollowingFramer) LastIdx() int
- func (f *RowsUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsUnboundedPrecedingToNPrecedingFramer
- func (f *RowsUnboundedPrecedingToNPrecedingFramer) FirstIdx() int
- func (f *RowsUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsUnboundedPrecedingToNPrecedingFramer) LastIdx() int
- func (f *RowsUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type RowsUnboundedPrecedingToUnboundedFollowingFramer
- func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int
- func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
- func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int
- func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
- func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
- type Sum
- func (a *Sum) Children() []sql.Expression
- func (a Sum) Description() string
- func (a *Sum) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (a Sum) FunctionName() string
- func (a *Sum) IsNullable() bool
- func (a *Sum) NewBuffer() (sql.AggregationBuffer, error)
- func (a *Sum) NewWindowFunction() (sql.WindowFunction, error)
- func (a *Sum) Resolved() bool
- func (a *Sum) String() string
- func (a *Sum) Type() sql.Type
- func (a *Sum) Window() *sql.WindowDefinition
- func (a *Sum) WithChildren(children ...sql.Expression) (sql.Expression, error)
- func (a *Sum) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
- type SumAgg
- func (a *SumAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *SumAgg) DefaultFramer() sql.WindowFramer
- func (a *SumAgg) Dispose()
- func (a *SumAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *SumAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *SumAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type WindowIter
- type WindowPartition
- type WindowPartitionIter
- type WindowedJSONArrayAgg
- func (a *WindowedJSONArrayAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *WindowedJSONArrayAgg) DefaultFramer() sql.WindowFramer
- func (a *WindowedJSONArrayAgg) Dispose()
- func (a *WindowedJSONArrayAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *WindowedJSONArrayAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *WindowedJSONArrayAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
- type WindowedJSONObjectAgg
- func (a *WindowedJSONObjectAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
- func (a *WindowedJSONObjectAgg) DefaultFramer() sql.WindowFramer
- func (a *WindowedJSONObjectAgg) Dispose()
- func (a *WindowedJSONObjectAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
- func (a *WindowedJSONObjectAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
- func (a *WindowedJSONObjectAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
Constants ¶
This section is empty.
Variables ¶
var ErrEvalUnsupportedOnAggregation = errors.NewKind("Unimplemented %s.Eval(). The code should have used AggregationBuffer.Eval(ctx).")
var ErrNoPartitions = errors.New("no partitions")
var ErrPartitionNotSet = errors.New("attempted to general a window frame interval before framer partition was set")
var ErrRangeIntervalTypeMismatch = errors.New("range bound type must match the order by expression type")
var ErrRangeInvalidOrderBy = sqlerr.NewKind("a range's order by must be one expression; found: %d")
var ErrUnsupportedJSONFunction = errors.NewKind("unsupported JSON function: %s")
ErrUnsupportedJSONFunction is returned when a unsupported JSON function is called.
var UnaryAggDefs support.GenDefs = []support.AggDef{ { Name: "Avg", Desc: "returns the average value of expr in all rows.", RetType: "sql.Float64", Nullable: true, }, { Name: "Count", Desc: "returns a count of the number of non-NULL values of expr in the rows retrieved by a SELECT statement.", RetType: "sql.Int64", }, { Name: "CountDistinct", Desc: "returns the number of distinct values in a result set.", RetType: "sql.Int64", }, { Name: "First", Desc: "returns the first value in a sequence of elements of an aggregation.", }, { Name: "Last", Desc: "returns the last value in a sequence of elements of an aggregation.", }, { Name: "Max", Desc: "returns the maximum value of expr in all rows.", }, { Name: "Min", Desc: "returns the minimum value of expr in all rows.", }, { Name: "Sum", Desc: "returns the sum of expr in all rows", RetType: "sql.Float64", Nullable: false, }, { Name: "JsonArray", SqlName: "json_arrayagg", Desc: "returns result set as a single JSON array.", RetType: "sql.JSON", }, }
Functions ¶
func NewAvgBuffer ¶ added in v0.12.0
func NewAvgBuffer(child sql.Expression) *avgBuffer
func NewCountBuffer ¶ added in v0.12.0
func NewCountBuffer(child sql.Expression) *countBuffer
func NewCountDistinctBuffer ¶ added in v0.12.0
func NewCountDistinctBuffer(child sql.Expression) *countDistinctBuffer
func NewEmptyGroupConcat ¶ added in v0.10.0
func NewEmptyGroupConcat() sql.Expression
func NewFirstBuffer ¶ added in v0.12.0
func NewFirstBuffer(child sql.Expression) *firstBuffer
func NewJSONObjectAgg ¶ added in v0.9.0
func NewJSONObjectAgg(key, value sql.Expression) sql.Expression
NewJSONObjectAgg creates a new JSONObjectAgg function.
func NewJsonArrayBuffer ¶ added in v0.12.0
func NewJsonArrayBuffer(child sql.Expression) *jsonArrayBuffer
func NewLastBuffer ¶ added in v0.12.0
func NewLastBuffer(child sql.Expression) *lastBuffer
func NewMaxBuffer ¶ added in v0.12.0
func NewMaxBuffer(child sql.Expression) *maxBuffer
func NewMinBuffer ¶ added in v0.12.0
func NewMinBuffer(child sql.Expression) *minBuffer
func NewRangeCurrentRowToCurrentRowFramer ¶ added in v0.12.0
func NewRangeCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeCurrentRowToNFollowingFramer ¶ added in v0.12.0
func NewRangeCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeCurrentRowToNPrecedingFramer ¶ added in v0.12.0
func NewRangeCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeCurrentRowToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRangeCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNFollowingToCurrentRowFramer ¶ added in v0.12.0
func NewRangeNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNFollowingToNFollowingFramer ¶ added in v0.12.0
func NewRangeNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNFollowingToNPrecedingFramer ¶ added in v0.12.0
func NewRangeNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNFollowingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRangeNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNPrecedingToCurrentRowFramer ¶ added in v0.12.0
func NewRangeNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNPrecedingToNFollowingFramer ¶ added in v0.12.0
func NewRangeNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNPrecedingToNPrecedingFramer ¶ added in v0.12.0
func NewRangeNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeNPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRangeNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeUnboundedPrecedingToCurrentRowFramer ¶ added in v0.12.0
func NewRangeUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeUnboundedPrecedingToNFollowingFramer ¶ added in v0.12.0
func NewRangeUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeUnboundedPrecedingToNPrecedingFramer ¶ added in v0.12.0
func NewRangeUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRangeUnboundedPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRangeUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsCurrentRowToCurrentRowFramer ¶ added in v0.12.0
func NewRowsCurrentRowToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsCurrentRowToNFollowingFramer ¶ added in v0.12.0
func NewRowsCurrentRowToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsCurrentRowToNPrecedingFramer ¶ added in v0.12.0
func NewRowsCurrentRowToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsCurrentRowToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRowsCurrentRowToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNFollowingToCurrentRowFramer ¶ added in v0.12.0
func NewRowsNFollowingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNFollowingToNFollowingFramer ¶ added in v0.12.0
func NewRowsNFollowingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNFollowingToNPrecedingFramer ¶ added in v0.12.0
func NewRowsNFollowingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNFollowingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRowsNFollowingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNPrecedingToCurrentRowFramer ¶ added in v0.12.0
func NewRowsNPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNPrecedingToNFollowingFramer ¶ added in v0.12.0
func NewRowsNPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNPrecedingToNPrecedingFramer ¶ added in v0.12.0
func NewRowsNPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsNPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRowsNPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsUnboundedPrecedingToCurrentRowFramer ¶ added in v0.12.0
func NewRowsUnboundedPrecedingToCurrentRowFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsUnboundedPrecedingToNFollowingFramer ¶ added in v0.12.0
func NewRowsUnboundedPrecedingToNFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsUnboundedPrecedingToNPrecedingFramer ¶ added in v0.12.0
func NewRowsUnboundedPrecedingToNPrecedingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewRowsUnboundedPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
func NewRowsUnboundedPrecedingToUnboundedFollowingFramer(frame sql.WindowFrame, window *sql.WindowDefinition) (sql.WindowFramer, error)
func NewSumBuffer ¶ added in v0.12.0
func NewSumBuffer(child sql.Expression) *sumBuffer
Types ¶
type Aggregation ¶ added in v0.12.0
type Aggregation struct {
// contains filtered or unexported fields
}
Aggregation comprises a sql.WindowFunction and a companion sql.WindowFramer. A parent WindowPartitionIter feeds [fn] with intervals from the [framer]. Iteration logic is divided between [fn] and [framer] depending on context. For example, some aggregation functions like PercentRank and CountAgg track peer groups within a partition, more state than the framer provides.
func NewAggregation ¶ added in v0.12.0
func NewAggregation(a sql.WindowFunction, f sql.WindowFramer) *Aggregation
type Avg ¶
type Avg struct {
// contains filtered or unexported fields
}
func NewAvg ¶
func NewAvg(e sql.Expression) *Avg
func (*Avg) Children ¶ added in v0.12.0
func (a *Avg) Children() []sql.Expression
func (Avg) Description ¶ added in v0.12.0
func (a Avg) Description() string
func (Avg) FunctionName ¶
func (a Avg) FunctionName() string
func (*Avg) IsNullable ¶
func (*Avg) NewWindowFunction ¶ added in v0.12.0
func (a *Avg) NewWindowFunction() (sql.WindowFunction, error)
func (*Avg) Window ¶ added in v0.12.0
func (a *Avg) Window() *sql.WindowDefinition
func (*Avg) WithChildren ¶
func (a *Avg) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Avg) WithWindow ¶ added in v0.12.0
func (a *Avg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type AvgAgg ¶ added in v0.12.0
type AvgAgg struct {
// contains filtered or unexported fields
}
func NewAvgAgg ¶ added in v0.12.0
func NewAvgAgg(e sql.Expression) *AvgAgg
func (*AvgAgg) Compute ¶ added in v0.12.0
func (a *AvgAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*AvgAgg) DefaultFramer ¶ added in v0.12.0
func (a *AvgAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*AvgAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *AvgAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*AvgAgg) StartPartition ¶ added in v0.12.0
func (a *AvgAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*AvgAgg) WithWindow ¶ added in v0.12.0
func (a *AvgAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
func NewCount ¶
func NewCount(e sql.Expression) *Count
func (*Count) Children ¶ added in v0.12.0
func (a *Count) Children() []sql.Expression
func (Count) Description ¶ added in v0.12.0
func (a Count) Description() string
func (Count) FunctionName ¶
func (a Count) FunctionName() string
func (*Count) IsNullable ¶
func (*Count) NewWindowFunction ¶ added in v0.12.0
func (a *Count) NewWindowFunction() (sql.WindowFunction, error)
func (*Count) Window ¶ added in v0.12.0
func (a *Count) Window() *sql.WindowDefinition
func (*Count) WithChildren ¶
func (a *Count) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Count) WithWindow ¶ added in v0.12.0
func (a *Count) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type CountAgg ¶ added in v0.12.0
type CountAgg struct {
// contains filtered or unexported fields
}
func NewCountAgg ¶ added in v0.12.0
func NewCountAgg(e sql.Expression) *CountAgg
func NewCountDistinctAgg ¶ added in v0.12.0
func NewCountDistinctAgg(e sql.Expression) *CountAgg
func (*CountAgg) Compute ¶ added in v0.12.0
func (a *CountAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*CountAgg) DefaultFramer ¶ added in v0.12.0
func (a *CountAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*CountAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *CountAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*CountAgg) StartPartition ¶ added in v0.12.0
func (a *CountAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*CountAgg) WithWindow ¶ added in v0.12.0
func (a *CountAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type CountDistinct ¶
type CountDistinct struct {
// contains filtered or unexported fields
}
func NewCountDistinct ¶
func NewCountDistinct(e sql.Expression) *CountDistinct
func (*CountDistinct) Children ¶ added in v0.12.0
func (a *CountDistinct) Children() []sql.Expression
func (CountDistinct) Description ¶ added in v0.12.0
func (a CountDistinct) Description() string
func (CountDistinct) FunctionName ¶ added in v0.11.0
func (a CountDistinct) FunctionName() string
func (*CountDistinct) IsNullable ¶
func (a *CountDistinct) IsNullable() bool
func (*CountDistinct) NewBuffer ¶
func (a *CountDistinct) NewBuffer() (sql.AggregationBuffer, error)
func (*CountDistinct) NewWindowFunction ¶ added in v0.12.0
func (a *CountDistinct) NewWindowFunction() (sql.WindowFunction, error)
func (*CountDistinct) String ¶
func (a *CountDistinct) String() string
func (*CountDistinct) Type ¶
func (a *CountDistinct) Type() sql.Type
func (*CountDistinct) Window ¶ added in v0.12.0
func (a *CountDistinct) Window() *sql.WindowDefinition
func (*CountDistinct) WithChildren ¶
func (a *CountDistinct) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*CountDistinct) WithWindow ¶ added in v0.12.0
func (a *CountDistinct) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type First ¶
type First struct {
// contains filtered or unexported fields
}
func NewFirst ¶
func NewFirst(e sql.Expression) *First
func (*First) Children ¶ added in v0.12.0
func (a *First) Children() []sql.Expression
func (First) Description ¶ added in v0.12.0
func (a First) Description() string
func (First) FunctionName ¶
func (a First) FunctionName() string
func (*First) IsNullable ¶ added in v0.12.0
func (*First) NewWindowFunction ¶ added in v0.12.0
func (a *First) NewWindowFunction() (sql.WindowFunction, error)
func (*First) Window ¶ added in v0.12.0
func (a *First) Window() *sql.WindowDefinition
func (*First) WithChildren ¶
func (a *First) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*First) WithWindow ¶ added in v0.12.0
func (a *First) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type FirstAgg ¶ added in v0.12.0
type FirstAgg struct {
// contains filtered or unexported fields
}
func NewFirstAgg ¶ added in v0.12.0
func NewFirstAgg(e sql.Expression) *FirstAgg
func (*FirstAgg) Compute ¶ added in v0.12.0
func (a *FirstAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*FirstAgg) DefaultFramer ¶ added in v0.12.0
func (a *FirstAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*FirstAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *FirstAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*FirstAgg) StartPartition ¶ added in v0.12.0
func (a *FirstAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*FirstAgg) WithWindow ¶ added in v0.12.0
func (a *FirstAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type GroupByFramer ¶ added in v0.12.0
type GroupByFramer struct {
// contains filtered or unexported fields
}
func NewGroupByFramer ¶ added in v0.12.0
func NewGroupByFramer() *GroupByFramer
func (*GroupByFramer) FirstIdx ¶ added in v0.12.0
func (f *GroupByFramer) FirstIdx() int
func (*GroupByFramer) Interval ¶ added in v0.12.0
func (f *GroupByFramer) Interval() (sql.WindowInterval, error)
func (*GroupByFramer) LastIdx ¶ added in v0.12.0
func (f *GroupByFramer) LastIdx() int
func (*GroupByFramer) NewFramer ¶ added in v0.12.0
func (f *GroupByFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*GroupByFramer) Next ¶ added in v0.12.0
func (f *GroupByFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
func (*GroupByFramer) SlidingInterval ¶ added in v0.12.0
func (f *GroupByFramer) SlidingInterval(ctx sql.Context) (sql.WindowInterval, sql.WindowInterval, sql.WindowInterval)
type GroupConcat ¶ added in v0.10.0
type GroupConcat struct {
// contains filtered or unexported fields
}
func NewGroupConcat ¶ added in v0.10.0
func NewGroupConcat(distinct string, orderBy sql.SortFields, separator string, selectExprs []sql.Expression, maxLen int) (*GroupConcat, error)
func (*GroupConcat) Children ¶ added in v0.10.0
func (g *GroupConcat) Children() []sql.Expression
Children implements the Expression interface.
func (*GroupConcat) Description ¶ added in v0.12.0
func (g *GroupConcat) Description() string
Description implements sql.FunctionExpression
func (*GroupConcat) FunctionName ¶ added in v0.10.0
func (g *GroupConcat) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*GroupConcat) IsNullable ¶ added in v0.10.0
func (g *GroupConcat) IsNullable() bool
IsNullable implements the Expression interface.
func (*GroupConcat) NewBuffer ¶ added in v0.10.0
func (g *GroupConcat) NewBuffer() (sql.AggregationBuffer, error)
NewBuffer creates a new buffer for the aggregation.
func (*GroupConcat) NewWindowFunction ¶ added in v0.12.0
func (g *GroupConcat) NewWindowFunction() (sql.WindowFunction, error)
NewWindowFunctionAggregation implements sql.WindowAdaptableExpression
func (*GroupConcat) Resolved ¶ added in v0.10.0
func (g *GroupConcat) Resolved() bool
Resolved implements the Expression interface.
func (*GroupConcat) String ¶ added in v0.10.0
func (g *GroupConcat) String() string
func (*GroupConcat) Type ¶ added in v0.10.0
func (g *GroupConcat) Type() sql.Type
Type implements the Expression interface. cc: https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_group-concat for explanations on return type.
func (*GroupConcat) Window ¶ added in v0.12.0
func (g *GroupConcat) Window() *sql.WindowDefinition
Window implements sql.Aggregation
func (*GroupConcat) WithChildren ¶ added in v0.10.0
func (g *GroupConcat) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
func (*GroupConcat) WithWindow ¶ added in v0.12.0
func (g *GroupConcat) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
WithWindow implements sql.Aggregation
type GroupConcatAgg ¶ added in v0.12.0
type GroupConcatAgg struct {
// contains filtered or unexported fields
}
func NewGroupConcatAgg ¶ added in v0.12.0
func NewGroupConcatAgg(gc *GroupConcat) *GroupConcatAgg
func (*GroupConcatAgg) Compute ¶ added in v0.12.0
func (a *GroupConcatAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*GroupConcatAgg) DefaultFramer ¶ added in v0.12.0
func (a *GroupConcatAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*GroupConcatAgg) Dispose ¶ added in v0.12.0
func (a *GroupConcatAgg) Dispose()
func (*GroupConcatAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *GroupConcatAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*GroupConcatAgg) StartPartition ¶ added in v0.12.0
func (a *GroupConcatAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*GroupConcatAgg) WithWindow ¶ added in v0.12.0
func (a *GroupConcatAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type JSONObjectAgg ¶ added in v0.9.0
type JSONObjectAgg struct {
// contains filtered or unexported fields
}
JSON_OBJECTAGG(key, value) [over_clause]
JSONObjectAgg Takes two column names or expressions as arguments, the first of these being used as a key and the second as a value, and returns a JSON object containing key-value pairs. Returns NULL if the result contains no rows, or in the event of an error. An error occurs if any key name is NULL or the number of arguments is not equal to 2.
https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_json-objectagg
see also: https://dev.mysql.com/doc/refman/8.0/en/json.html#json-normalization
func (*JSONObjectAgg) Children ¶ added in v0.9.0
func (j *JSONObjectAgg) Children() []sql.Expression
Children implements the Expression interface.
func (*JSONObjectAgg) Description ¶ added in v0.12.0
func (j *JSONObjectAgg) Description() string
Description implements sql.FunctionExpression
func (*JSONObjectAgg) FunctionName ¶ added in v0.9.0
func (j *JSONObjectAgg) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*JSONObjectAgg) IsNullable ¶ added in v0.9.0
func (j *JSONObjectAgg) IsNullable() bool
IsNullable implements the Expression interface.
func (*JSONObjectAgg) NewBuffer ¶ added in v0.9.0
func (j *JSONObjectAgg) NewBuffer() (sql.AggregationBuffer, error)
NewBuffer implements the Aggregation interface.
func (*JSONObjectAgg) NewWindowFunction ¶ added in v0.12.0
func (j *JSONObjectAgg) NewWindowFunction() (sql.WindowFunction, error)
NewWindowFunctionAggregation implements sql.WindowAdaptableExpression
func (*JSONObjectAgg) Resolved ¶ added in v0.9.0
func (j *JSONObjectAgg) Resolved() bool
Resolved implements the Expression interface.
func (*JSONObjectAgg) String ¶ added in v0.9.0
func (j *JSONObjectAgg) String() string
func (*JSONObjectAgg) Type ¶ added in v0.9.0
func (j *JSONObjectAgg) Type() sql.Type
Type implements the Expression interface.
func (*JSONObjectAgg) Window ¶ added in v0.12.0
func (j *JSONObjectAgg) Window() *sql.WindowDefinition
Window implements sql.Aggregation
func (*JSONObjectAgg) WithChildren ¶ added in v0.9.0
func (j *JSONObjectAgg) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
func (*JSONObjectAgg) WithWindow ¶ added in v0.12.0
func (j *JSONObjectAgg) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
WithWindow implements sql.Aggregation
type JsonArray ¶ added in v0.12.0
type JsonArray struct {
// contains filtered or unexported fields
}
func NewJsonArray ¶ added in v0.12.0
func NewJsonArray(e sql.Expression) *JsonArray
func (*JsonArray) Children ¶ added in v0.12.0
func (a *JsonArray) Children() []sql.Expression
func (JsonArray) Description ¶ added in v0.12.0
func (a JsonArray) Description() string
func (JsonArray) FunctionName ¶ added in v0.12.0
func (a JsonArray) FunctionName() string
func (*JsonArray) IsNullable ¶ added in v0.12.0
func (*JsonArray) NewBuffer ¶ added in v0.12.0
func (a *JsonArray) NewBuffer() (sql.AggregationBuffer, error)
func (*JsonArray) NewWindowFunction ¶ added in v0.12.0
func (a *JsonArray) NewWindowFunction() (sql.WindowFunction, error)
func (*JsonArray) Window ¶ added in v0.12.0
func (a *JsonArray) Window() *sql.WindowDefinition
func (*JsonArray) WithChildren ¶ added in v0.12.0
func (a *JsonArray) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*JsonArray) WithWindow ¶ added in v0.12.0
func (a *JsonArray) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type Lag ¶ added in v0.12.0
type Lag struct {
// contains filtered or unexported fields
}
func (*Lag) Compute ¶ added in v0.12.0
func (a *Lag) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*Lag) DefaultFramer ¶ added in v0.12.0
func (a *Lag) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*Lag) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *Lag) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*Lag) StartPartition ¶ added in v0.12.0
func (a *Lag) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*Lag) WithWindow ¶ added in v0.12.0
func (a *Lag) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type Last ¶
type Last struct {
// contains filtered or unexported fields
}
func NewLast ¶
func NewLast(e sql.Expression) *Last
func (*Last) Children ¶ added in v0.12.0
func (a *Last) Children() []sql.Expression
func (Last) Description ¶ added in v0.12.0
func (a Last) Description() string
func (Last) FunctionName ¶
func (a Last) FunctionName() string
func (*Last) IsNullable ¶ added in v0.12.0
func (*Last) NewWindowFunction ¶ added in v0.12.0
func (a *Last) NewWindowFunction() (sql.WindowFunction, error)
func (*Last) Window ¶ added in v0.12.0
func (a *Last) Window() *sql.WindowDefinition
func (*Last) WithChildren ¶
func (a *Last) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Last) WithWindow ¶ added in v0.12.0
func (a *Last) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type LastAgg ¶ added in v0.12.0
type LastAgg struct {
// contains filtered or unexported fields
}
func NewLastAgg ¶ added in v0.12.0
func NewLastAgg(e sql.Expression) *LastAgg
func (*LastAgg) Compute ¶ added in v0.12.0
func (a *LastAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*LastAgg) DefaultFramer ¶ added in v0.12.0
func (a *LastAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*LastAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *LastAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*LastAgg) StartPartition ¶ added in v0.12.0
func (a *LastAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*LastAgg) WithWindow ¶ added in v0.12.0
func (a *LastAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type Lead ¶ added in v0.12.0
type Lead struct {
// contains filtered or unexported fields
}
func (*Lead) Compute ¶ added in v0.12.0
func (a *Lead) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*Lead) DefaultFramer ¶ added in v0.12.0
func (a *Lead) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*Lead) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *Lead) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*Lead) StartPartition ¶ added in v0.12.0
func (a *Lead) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*Lead) WithWindow ¶ added in v0.12.0
func (a *Lead) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type Max ¶
type Max struct {
// contains filtered or unexported fields
}
func NewMax ¶
func NewMax(e sql.Expression) *Max
func (*Max) Children ¶ added in v0.12.0
func (a *Max) Children() []sql.Expression
func (Max) Description ¶ added in v0.12.0
func (a Max) Description() string
func (Max) FunctionName ¶
func (a Max) FunctionName() string
func (*Max) IsNullable ¶
func (*Max) NewWindowFunction ¶ added in v0.12.0
func (a *Max) NewWindowFunction() (sql.WindowFunction, error)
func (*Max) Window ¶ added in v0.12.0
func (a *Max) Window() *sql.WindowDefinition
func (*Max) WithChildren ¶
func (a *Max) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Max) WithWindow ¶ added in v0.12.0
func (a *Max) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type MaxAgg ¶ added in v0.12.0
type MaxAgg struct {
// contains filtered or unexported fields
}
func NewMaxAgg ¶ added in v0.12.0
func NewMaxAgg(e sql.Expression) *MaxAgg
func (*MaxAgg) Compute ¶ added in v0.12.0
func (a *MaxAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*MaxAgg) DefaultFramer ¶ added in v0.12.0
func (a *MaxAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*MaxAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *MaxAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*MaxAgg) StartPartition ¶ added in v0.12.0
func (a *MaxAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*MaxAgg) WithWindow ¶ added in v0.12.0
func (a *MaxAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type Min ¶
type Min struct {
// contains filtered or unexported fields
}
func NewMin ¶
func NewMin(e sql.Expression) *Min
func (*Min) Children ¶ added in v0.12.0
func (a *Min) Children() []sql.Expression
func (Min) Description ¶ added in v0.12.0
func (a Min) Description() string
func (Min) FunctionName ¶
func (a Min) FunctionName() string
func (*Min) IsNullable ¶
func (*Min) NewWindowFunction ¶ added in v0.12.0
func (a *Min) NewWindowFunction() (sql.WindowFunction, error)
func (*Min) Window ¶ added in v0.12.0
func (a *Min) Window() *sql.WindowDefinition
func (*Min) WithChildren ¶
func (a *Min) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Min) WithWindow ¶ added in v0.12.0
func (a *Min) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type MinAgg ¶ added in v0.12.0
type MinAgg struct {
// contains filtered or unexported fields
}
func NewMinAgg ¶ added in v0.12.0
func NewMinAgg(e sql.Expression) *MinAgg
func (*MinAgg) Compute ¶ added in v0.12.0
func (a *MinAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*MinAgg) DefaultFramer ¶ added in v0.12.0
func (a *MinAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*MinAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *MinAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*MinAgg) StartPartition ¶ added in v0.12.0
func (a *MinAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*MinAgg) WithWindow ¶ added in v0.12.0
func (a *MinAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type PartitionFramer ¶ added in v0.12.0
type PartitionFramer struct {
// contains filtered or unexported fields
}
func NewPartitionFramer ¶ added in v0.12.0
func NewPartitionFramer() *PartitionFramer
func (*PartitionFramer) Close ¶ added in v0.12.0
func (f *PartitionFramer) Close()
func (*PartitionFramer) FirstIdx ¶ added in v0.12.0
func (f *PartitionFramer) FirstIdx() int
func (*PartitionFramer) Interval ¶ added in v0.12.0
func (f *PartitionFramer) Interval() (sql.WindowInterval, error)
func (*PartitionFramer) LastIdx ¶ added in v0.12.0
func (f *PartitionFramer) LastIdx() int
func (*PartitionFramer) NewFramer ¶ added in v0.12.0
func (f *PartitionFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*PartitionFramer) Next ¶ added in v0.12.0
func (f *PartitionFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
func (*PartitionFramer) SlidingInterval ¶ added in v0.12.0
func (f *PartitionFramer) SlidingInterval(ctx sql.Context) (sql.WindowInterval, sql.WindowInterval, sql.WindowInterval)
type PeerGroupFramer ¶ added in v0.12.0
type PeerGroupFramer struct {
// contains filtered or unexported fields
}
func NewPeerGroupFramer ¶ added in v0.12.0
func NewPeerGroupFramer(orderBy []sql.Expression) *PeerGroupFramer
func (*PeerGroupFramer) FirstIdx ¶ added in v0.12.0
func (f *PeerGroupFramer) FirstIdx() int
func (*PeerGroupFramer) Interval ¶ added in v0.12.0
func (f *PeerGroupFramer) Interval() (sql.WindowInterval, error)
func (*PeerGroupFramer) LastIdx ¶ added in v0.12.0
func (f *PeerGroupFramer) LastIdx() int
func (*PeerGroupFramer) NewFramer ¶ added in v0.12.0
func (f *PeerGroupFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*PeerGroupFramer) Next ¶ added in v0.12.0
func (f *PeerGroupFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type PercentRank ¶ added in v0.12.0
type PercentRank struct {
// contains filtered or unexported fields
}
func NewPercentRank ¶ added in v0.12.0
func NewPercentRank(orderBy []sql.Expression) *PercentRank
func (*PercentRank) Compute ¶ added in v0.12.0
func (a *PercentRank) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
Compute returns the number of elements before the current peer group (rank), and returns (rank - 1)/(rows - 1). ex: [1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 6] => every 3 returns float64(4) / float64(9), because there are 4 values less than 3, and there are (10 - 1) total rows in the list.
func (*PercentRank) DefaultFramer ¶ added in v0.12.0
func (a *PercentRank) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*PercentRank) Dispose ¶ added in v0.12.0
func (a *PercentRank) Dispose()
func (*PercentRank) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *PercentRank) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*PercentRank) StartPartition ¶ added in v0.12.0
func (a *PercentRank) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*PercentRank) WithWindow ¶ added in v0.12.0
func (a *PercentRank) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type RangeCurrentRowToCurrentRowFramer ¶ added in v0.12.0
type RangeCurrentRowToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RangeCurrentRowToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToCurrentRowFramer) FirstIdx() int
func (*RangeCurrentRowToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RangeCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RangeCurrentRowToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToCurrentRowFramer) LastIdx() int
func (*RangeCurrentRowToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RangeCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeCurrentRowToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RangeCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeCurrentRowToNFollowingFramer ¶ added in v0.12.0
type RangeCurrentRowToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeCurrentRowToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToNFollowingFramer) FirstIdx() int
func (*RangeCurrentRowToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeCurrentRowToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToNFollowingFramer) LastIdx() int
func (*RangeCurrentRowToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeCurrentRowToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeCurrentRowToNPrecedingFramer ¶ added in v0.12.0
type RangeCurrentRowToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RangeCurrentRowToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToNPrecedingFramer) FirstIdx() int
func (*RangeCurrentRowToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RangeCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RangeCurrentRowToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToNPrecedingFramer) LastIdx() int
func (*RangeCurrentRowToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeCurrentRowToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RangeCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeCurrentRowToUnboundedFollowingFramer ¶ added in v0.12.0
type RangeCurrentRowToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeCurrentRowToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToUnboundedFollowingFramer) FirstIdx() int
func (*RangeCurrentRowToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeCurrentRowToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeCurrentRowToUnboundedFollowingFramer) LastIdx() int
func (*RangeCurrentRowToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeCurrentRowToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNFollowingToCurrentRowFramer ¶ added in v0.12.0
type RangeNFollowingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RangeNFollowingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNFollowingToCurrentRowFramer) FirstIdx() int
func (*RangeNFollowingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RangeNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RangeNFollowingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNFollowingToCurrentRowFramer) LastIdx() int
func (*RangeNFollowingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNFollowingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RangeNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNFollowingToNFollowingFramer ¶ added in v0.12.0
type RangeNFollowingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNFollowingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNFollowingToNFollowingFramer) FirstIdx() int
func (*RangeNFollowingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNFollowingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNFollowingToNFollowingFramer) LastIdx() int
func (*RangeNFollowingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNFollowingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeNFollowingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNFollowingToNPrecedingFramer ¶ added in v0.12.0
type RangeNFollowingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNFollowingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNFollowingToNPrecedingFramer) FirstIdx() int
func (*RangeNFollowingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RangeNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNFollowingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNFollowingToNPrecedingFramer) LastIdx() int
func (*RangeNFollowingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNFollowingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RangeNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNFollowingToUnboundedFollowingFramer ¶ added in v0.12.0
type RangeNFollowingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNFollowingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNFollowingToUnboundedFollowingFramer) FirstIdx() int
func (*RangeNFollowingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNFollowingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNFollowingToUnboundedFollowingFramer) LastIdx() int
func (*RangeNFollowingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNFollowingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNPrecedingToCurrentRowFramer ¶ added in v0.12.0
type RangeNPrecedingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RangeNPrecedingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToCurrentRowFramer) FirstIdx() int
func (*RangeNPrecedingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RangeNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RangeNPrecedingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToCurrentRowFramer) LastIdx() int
func (*RangeNPrecedingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNPrecedingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RangeNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNPrecedingToNFollowingFramer ¶ added in v0.12.0
type RangeNPrecedingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNPrecedingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToNFollowingFramer) FirstIdx() int
func (*RangeNPrecedingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNPrecedingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToNFollowingFramer) LastIdx() int
func (*RangeNPrecedingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNPrecedingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNPrecedingToNPrecedingFramer ¶ added in v0.12.0
type RangeNPrecedingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNPrecedingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToNPrecedingFramer) FirstIdx() int
func (*RangeNPrecedingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RangeNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNPrecedingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToNPrecedingFramer) LastIdx() int
func (*RangeNPrecedingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNPrecedingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RangeNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeNPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
type RangeNPrecedingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeNPrecedingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToUnboundedFollowingFramer) FirstIdx() int
func (*RangeNPrecedingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeNPrecedingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeNPrecedingToUnboundedFollowingFramer) LastIdx() int
func (*RangeNPrecedingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeNPrecedingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeUnboundedPrecedingToCurrentRowFramer ¶ added in v0.12.0
type RangeUnboundedPrecedingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RangeUnboundedPrecedingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToCurrentRowFramer) FirstIdx() int
func (*RangeUnboundedPrecedingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RangeUnboundedPrecedingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToCurrentRowFramer) LastIdx() int
func (*RangeUnboundedPrecedingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeUnboundedPrecedingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeUnboundedPrecedingToNFollowingFramer ¶ added in v0.12.0
type RangeUnboundedPrecedingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeUnboundedPrecedingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNFollowingFramer) FirstIdx() int
func (*RangeUnboundedPrecedingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeUnboundedPrecedingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNFollowingFramer) LastIdx() int
func (*RangeUnboundedPrecedingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeUnboundedPrecedingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeUnboundedPrecedingToNPrecedingFramer ¶ added in v0.12.0
type RangeUnboundedPrecedingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RangeUnboundedPrecedingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNPrecedingFramer) FirstIdx() int
func (*RangeUnboundedPrecedingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RangeUnboundedPrecedingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNPrecedingFramer) LastIdx() int
func (*RangeUnboundedPrecedingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeUnboundedPrecedingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RangeUnboundedPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
type RangeUnboundedPrecedingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int
func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int
func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RangeUnboundedPrecedingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RangeUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buf sql.WindowBuffer) (sql.WindowInterval, error)
type RowNumber ¶ added in v0.12.0
type RowNumber struct {
// contains filtered or unexported fields
}
func NewRowNumber ¶ added in v0.12.0
func NewRowNumber() *RowNumber
func (*RowNumber) Compute ¶ added in v0.12.0
func (a *RowNumber) Compute(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) interface{}
func (*RowNumber) DefaultFramer ¶ added in v0.12.0
func (a *RowNumber) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewPartitionFramer
func (*RowNumber) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *RowNumber) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*RowNumber) StartPartition ¶ added in v0.12.0
func (a *RowNumber) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buffer sql.WindowBuffer) error
func (*RowNumber) WithWindow ¶ added in v0.12.0
func (a *RowNumber) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type RowsCurrentRowToCurrentRowFramer ¶ added in v0.12.0
type RowsCurrentRowToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RowsCurrentRowToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToCurrentRowFramer) FirstIdx() int
func (*RowsCurrentRowToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RowsCurrentRowToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RowsCurrentRowToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToCurrentRowFramer) LastIdx() int
func (*RowsCurrentRowToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RowsCurrentRowToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsCurrentRowToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RowsCurrentRowToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsCurrentRowToNFollowingFramer ¶ added in v0.12.0
type RowsCurrentRowToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsCurrentRowToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToNFollowingFramer) FirstIdx() int
func (*RowsCurrentRowToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsCurrentRowToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsCurrentRowToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToNFollowingFramer) LastIdx() int
func (*RowsCurrentRowToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsCurrentRowToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsCurrentRowToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsCurrentRowToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsCurrentRowToNPrecedingFramer ¶ added in v0.12.0
type RowsCurrentRowToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RowsCurrentRowToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToNPrecedingFramer) FirstIdx() int
func (*RowsCurrentRowToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RowsCurrentRowToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RowsCurrentRowToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToNPrecedingFramer) LastIdx() int
func (*RowsCurrentRowToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsCurrentRowToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsCurrentRowToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RowsCurrentRowToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsCurrentRowToUnboundedFollowingFramer ¶ added in v0.12.0
type RowsCurrentRowToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsCurrentRowToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToUnboundedFollowingFramer) FirstIdx() int
func (*RowsCurrentRowToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsCurrentRowToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsCurrentRowToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsCurrentRowToUnboundedFollowingFramer) LastIdx() int
func (*RowsCurrentRowToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsCurrentRowToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsCurrentRowToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsCurrentRowToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNFollowingToCurrentRowFramer ¶ added in v0.12.0
type RowsNFollowingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RowsNFollowingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNFollowingToCurrentRowFramer) FirstIdx() int
func (*RowsNFollowingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RowsNFollowingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RowsNFollowingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNFollowingToCurrentRowFramer) LastIdx() int
func (*RowsNFollowingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNFollowingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNFollowingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RowsNFollowingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNFollowingToNFollowingFramer ¶ added in v0.12.0
type RowsNFollowingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNFollowingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNFollowingToNFollowingFramer) FirstIdx() int
func (*RowsNFollowingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsNFollowingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNFollowingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNFollowingToNFollowingFramer) LastIdx() int
func (*RowsNFollowingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNFollowingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNFollowingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsNFollowingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNFollowingToNPrecedingFramer ¶ added in v0.12.0
type RowsNFollowingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNFollowingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNFollowingToNPrecedingFramer) FirstIdx() int
func (*RowsNFollowingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RowsNFollowingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNFollowingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNFollowingToNPrecedingFramer) LastIdx() int
func (*RowsNFollowingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNFollowingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNFollowingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RowsNFollowingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNFollowingToUnboundedFollowingFramer ¶ added in v0.12.0
type RowsNFollowingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNFollowingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNFollowingToUnboundedFollowingFramer) FirstIdx() int
func (*RowsNFollowingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsNFollowingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNFollowingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNFollowingToUnboundedFollowingFramer) LastIdx() int
func (*RowsNFollowingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNFollowingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNFollowingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsNFollowingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNPrecedingToCurrentRowFramer ¶ added in v0.12.0
type RowsNPrecedingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func (*RowsNPrecedingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToCurrentRowFramer) FirstIdx() int
func (*RowsNPrecedingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RowsNPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RowsNPrecedingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToCurrentRowFramer) LastIdx() int
func (*RowsNPrecedingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNPrecedingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RowsNPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNPrecedingToNFollowingFramer ¶ added in v0.12.0
type RowsNPrecedingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNPrecedingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToNFollowingFramer) FirstIdx() int
func (*RowsNPrecedingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsNPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNPrecedingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToNFollowingFramer) LastIdx() int
func (*RowsNPrecedingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNPrecedingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsNPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNPrecedingToNPrecedingFramer ¶ added in v0.12.0
type RowsNPrecedingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNPrecedingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToNPrecedingFramer) FirstIdx() int
func (*RowsNPrecedingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RowsNPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNPrecedingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToNPrecedingFramer) LastIdx() int
func (*RowsNPrecedingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNPrecedingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RowsNPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsNPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
type RowsNPrecedingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsNPrecedingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToUnboundedFollowingFramer) FirstIdx() int
func (*RowsNPrecedingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsNPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsNPrecedingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsNPrecedingToUnboundedFollowingFramer) LastIdx() int
func (*RowsNPrecedingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsNPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsNPrecedingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsNPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsUnboundedPrecedingToCurrentRowFramer ¶ added in v0.12.0
type RowsUnboundedPrecedingToCurrentRowFramer struct {
// contains filtered or unexported fields
}
func NewUnboundedPrecedingToCurrentRowFramer ¶ added in v0.12.0
func NewUnboundedPrecedingToCurrentRowFramer() *RowsUnboundedPrecedingToCurrentRowFramer
NewUnboundedPrecedingToCurrentRowFramer generates sql.WindowInterval from the first row in a partition to the current row.
Ex: partition = [0, 1, 2, 3, 4, 5] => frames: {0,0}, {0,1}, {0,2}, {0,3}, {0,4}, {0,5} rows: [0], [0,1], [0,1,2], [1,2,3,4], [1,2,3,4], [1,2,3,4,5]
func (*RowsUnboundedPrecedingToCurrentRowFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToCurrentRowFramer) FirstIdx() int
func (*RowsUnboundedPrecedingToCurrentRowFramer) Interval ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToCurrentRowFramer) Interval() (sql.WindowInterval, error)
func (*RowsUnboundedPrecedingToCurrentRowFramer) LastIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToCurrentRowFramer) LastIdx() int
func (*RowsUnboundedPrecedingToCurrentRowFramer) NewFramer ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToCurrentRowFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsUnboundedPrecedingToCurrentRowFramer) Next ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToCurrentRowFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsUnboundedPrecedingToNFollowingFramer ¶ added in v0.12.0
type RowsUnboundedPrecedingToNFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsUnboundedPrecedingToNFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNFollowingFramer) FirstIdx() int
func (*RowsUnboundedPrecedingToNFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsUnboundedPrecedingToNFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNFollowingFramer) LastIdx() int
func (*RowsUnboundedPrecedingToNFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsUnboundedPrecedingToNFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsUnboundedPrecedingToNPrecedingFramer ¶ added in v0.12.0
type RowsUnboundedPrecedingToNPrecedingFramer struct {
// contains filtered or unexported fields
}
func (*RowsUnboundedPrecedingToNPrecedingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNPrecedingFramer) FirstIdx() int
func (*RowsUnboundedPrecedingToNPrecedingFramer) Interval ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNPrecedingFramer) Interval() (sql.WindowInterval, error)
func (*RowsUnboundedPrecedingToNPrecedingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNPrecedingFramer) LastIdx() int
func (*RowsUnboundedPrecedingToNPrecedingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNPrecedingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsUnboundedPrecedingToNPrecedingFramer) Next ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToNPrecedingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type RowsUnboundedPrecedingToUnboundedFollowingFramer ¶ added in v0.12.0
type RowsUnboundedPrecedingToUnboundedFollowingFramer struct {
// contains filtered or unexported fields
}
func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) FirstIdx() int
func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) Interval ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Interval() (sql.WindowInterval, error)
func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) LastIdx ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) LastIdx() int
func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) NewFramer ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) NewFramer(interval sql.WindowInterval) (sql.WindowFramer, error)
func (*RowsUnboundedPrecedingToUnboundedFollowingFramer) Next ¶ added in v0.12.0
func (f *RowsUnboundedPrecedingToUnboundedFollowingFramer) Next(ctx *sql.Context, buffer sql.WindowBuffer) (sql.WindowInterval, error)
type Sum ¶
type Sum struct {
// contains filtered or unexported fields
}
func NewSum ¶
func NewSum(e sql.Expression) *Sum
func (*Sum) Children ¶ added in v0.12.0
func (a *Sum) Children() []sql.Expression
func (Sum) Description ¶ added in v0.12.0
func (a Sum) Description() string
func (Sum) FunctionName ¶
func (a Sum) FunctionName() string
func (*Sum) IsNullable ¶ added in v0.12.0
func (*Sum) NewWindowFunction ¶ added in v0.12.0
func (a *Sum) NewWindowFunction() (sql.WindowFunction, error)
func (*Sum) Window ¶ added in v0.12.0
func (a *Sum) Window() *sql.WindowDefinition
func (*Sum) WithChildren ¶
func (a *Sum) WithChildren(children ...sql.Expression) (sql.Expression, error)
func (*Sum) WithWindow ¶ added in v0.12.0
func (a *Sum) WithWindow(window *sql.WindowDefinition) (sql.Aggregation, error)
type SumAgg ¶ added in v0.12.0
type SumAgg struct {
// contains filtered or unexported fields
}
func NewSumAgg ¶ added in v0.12.0
func NewSumAgg(e sql.Expression) *SumAgg
func (*SumAgg) Compute ¶ added in v0.12.0
func (a *SumAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*SumAgg) DefaultFramer ¶ added in v0.12.0
func (a *SumAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*SumAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *SumAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*SumAgg) StartPartition ¶ added in v0.12.0
func (a *SumAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*SumAgg) WithWindow ¶ added in v0.12.0
func (a *SumAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type WindowIter ¶ added in v0.12.0
type WindowIter struct {
// contains filtered or unexported fields
}
WindowIter is a wrapper that evaluates a set of WindowPartitionIter.
The current implementation has 3 steps: 1. Materialize iter and duplicate a sql.WindowBuffer for each partition. 2. Collect rows from child partitions. 3. Rearrange partition results into the projected ordering given by [outputOrdinals].
We assume [outputOrdinals] is appropriately sized for [partitionIters].
func NewWindowIter ¶ added in v0.12.0
func NewWindowIter(partitionIters []*WindowPartitionIter, outputOrdinals [][]int, iter sql.RowIter) *WindowIter
func (*WindowIter) Close ¶ added in v0.12.0
func (i *WindowIter) Close(ctx *sql.Context) error
Close implements sql.RowIter
func (*WindowIter) Dispose ¶ added in v0.12.0
func (i *WindowIter) Dispose()
Dispose implements sql.Disposable
type WindowPartition ¶ added in v0.12.0
type WindowPartition struct { PartitionBy []sql.Expression SortBy sql.SortFields Aggs []*Aggregation }
WindowPartition is an Aggregation set with unique partition and sorting keys. There may be several WindowPartitions in one query, but each has unique key set. A WindowPartitionIter is used to evaluate a WindowPartition with a specific sql.RowIter.
func NewWindowPartition ¶ added in v0.12.0
func NewWindowPartition(partitionBy []sql.Expression, sortBy sql.SortFields, aggs []*Aggregation) *WindowPartition
func (*WindowPartition) AddAggregation ¶ added in v0.12.0
func (w *WindowPartition) AddAggregation(agg *Aggregation)
type WindowPartitionIter ¶ added in v0.12.0
type WindowPartitionIter struct {
// contains filtered or unexported fields
}
WindowPartitionIter evaluates a WindowPartition with a sql.RowIter child. A parent WindowIter is expected to maintain the projection ordering for WindowPartition output columns.
WindowPartitionIter will return rows sorted in the same order generated by [child]. This is accomplished privately by appending the sort ordering index to [i.input] rows during materializeInput, and removing after sortAndFilterOutput.
Next currently materializes [i.input] and [i.output] before returning the first result, regardless of Limit or other expressions.
func NewWindowPartitionIter ¶ added in v0.12.0
func NewWindowPartitionIter(windowBlock *WindowPartition) *WindowPartitionIter
func (*WindowPartitionIter) Close ¶ added in v0.12.0
func (i *WindowPartitionIter) Close(ctx *sql.Context) error
func (*WindowPartitionIter) Dispose ¶ added in v0.12.0
func (i *WindowPartitionIter) Dispose()
func (*WindowPartitionIter) WindowBlock ¶ added in v0.12.0
func (i *WindowPartitionIter) WindowBlock() *WindowPartition
type WindowedJSONArrayAgg ¶ added in v0.12.0
type WindowedJSONArrayAgg struct {
// contains filtered or unexported fields
}
func NewJsonArrayAgg ¶ added in v0.12.0
func NewJsonArrayAgg(expr sql.Expression) *WindowedJSONArrayAgg
func (*WindowedJSONArrayAgg) Compute ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*WindowedJSONArrayAgg) DefaultFramer ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*WindowedJSONArrayAgg) Dispose ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) Dispose()
func (*WindowedJSONArrayAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*WindowedJSONArrayAgg) StartPartition ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*WindowedJSONArrayAgg) WithWindow ¶ added in v0.12.0
func (a *WindowedJSONArrayAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)
type WindowedJSONObjectAgg ¶ added in v0.12.0
type WindowedJSONObjectAgg struct {
// contains filtered or unexported fields
}
func NewWindowedJSONObjectAgg ¶ added in v0.12.0
func NewWindowedJSONObjectAgg(j *JSONObjectAgg) *WindowedJSONObjectAgg
func (*WindowedJSONObjectAgg) Compute ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) Compute(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) interface{}
func (*WindowedJSONObjectAgg) DefaultFramer ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) DefaultFramer() sql.WindowFramer
DefaultFramer returns a NewUnboundedPrecedingToCurrentRowFramer
func (*WindowedJSONObjectAgg) Dispose ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) Dispose()
func (*WindowedJSONObjectAgg) NewSlidingFrameInterval ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) NewSlidingFrameInterval(added, dropped sql.WindowInterval)
func (*WindowedJSONObjectAgg) StartPartition ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) StartPartition(ctx *sql.Context, interval sql.WindowInterval, buf sql.WindowBuffer) error
func (*WindowedJSONObjectAgg) WithWindow ¶ added in v0.12.0
func (a *WindowedJSONObjectAgg) WithWindow(w *sql.WindowDefinition) (sql.WindowFunction, error)