Documentation ¶
Index ¶
- type EmitOperator
- type FilterOperator
- type GroupAggregateOperator
- type ProjectOperator
- type RowMask
- func (m *RowMask) Get(column string) (v types.Value, err error)
- func (m *RowMask) GetByField(field string) (v types.Value, err error)
- func (m *RowMask) Iterate(fn func(field string, value types.Value) error) error
- func (m *RowMask) Key() *tree.Key
- func (d *RowMask) MarshalJSON() ([]byte, error)
- func (m *RowMask) Object() types.Object
- func (m *RowMask) String() string
- func (m *RowMask) TableName() string
- type SkipOperator
- type TakeOperator
- type TempTreeSortOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmitOperator ¶
type EmitOperator struct { stream.BaseOperator Exprs []expr.Expr }
func Emit ¶
func Emit(exprs ...expr.Expr) *EmitOperator
Emit creates an operator that iterates over the given expressions. Each expression must evaluate to an object.
func (*EmitOperator) Iterate ¶
func (op *EmitOperator) Iterate(in *environment.Environment, fn func(out *environment.Environment) error) error
func (*EmitOperator) String ¶
func (op *EmitOperator) String() string
type FilterOperator ¶
type FilterOperator struct { stream.BaseOperator Expr expr.Expr }
A FilterOperator filters values based on a given expression.
func Filter ¶
func Filter(e expr.Expr) *FilterOperator
Filter evaluates e for each incoming value and filters any value whose result is not truthy.
func (*FilterOperator) Iterate ¶
func (op *FilterOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error
Iterate implements the Operator interface.
func (*FilterOperator) String ¶
func (op *FilterOperator) String() string
type GroupAggregateOperator ¶
type GroupAggregateOperator struct { stream.BaseOperator Builders []expr.AggregatorBuilder E expr.Expr }
func GroupAggregate ¶
func GroupAggregate(groupBy expr.Expr, builders ...expr.AggregatorBuilder) *GroupAggregateOperator
GroupAggregate consumes the incoming stream and outputs one value per group. It assumes the stream is sorted by groupBy.
func (*GroupAggregateOperator) Iterate ¶
func (op *GroupAggregateOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error
func (*GroupAggregateOperator) String ¶
func (op *GroupAggregateOperator) String() string
type ProjectOperator ¶
type ProjectOperator struct { stream.BaseOperator Exprs []expr.Expr }
A ProjectOperator applies an expression on each value of the stream and returns a new value.
func (*ProjectOperator) Iterate ¶
func (op *ProjectOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error
Iterate implements the Operator interface.
func (*ProjectOperator) String ¶
func (op *ProjectOperator) String() string
type RowMask ¶
type RowMask struct { Env *environment.Environment Exprs []expr.Expr // contains filtered or unexported fields }
func (*RowMask) MarshalJSON ¶
type SkipOperator ¶
type SkipOperator struct { stream.BaseOperator E expr.Expr }
A SkipOperator skips the n first values of the stream.
func (*SkipOperator) Iterate ¶
func (op *SkipOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error
Iterate implements the Operator interface.
func (*SkipOperator) String ¶
func (op *SkipOperator) String() string
type TakeOperator ¶
type TakeOperator struct { stream.BaseOperator E expr.Expr }
A TakeOperator closes the stream after a certain number of values.
func Take ¶
func Take(e expr.Expr) *TakeOperator
Take closes the stream after n values have passed through the operator.
func (*TakeOperator) Iterate ¶
func (op *TakeOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error
Iterate implements the Operator interface.
func (*TakeOperator) String ¶
func (op *TakeOperator) String() string
type TempTreeSortOperator ¶
type TempTreeSortOperator struct { stream.BaseOperator Expr expr.Expr Desc bool }
A TempTreeSortOperator consumes every value of the stream and outputs them in order.
func TempTreeSort ¶
func TempTreeSort(e expr.Expr) *TempTreeSortOperator
TempTreeSort consumes every value of the stream, sorts them by the given expr and outputs them in order. It creates a temporary index and uses it to sort the stream.
func TempTreeSortReverse ¶
func TempTreeSortReverse(e expr.Expr) *TempTreeSortOperator
TempTreeSortReverse does the same as TempTreeSort but in descending order.
func (*TempTreeSortOperator) Iterate ¶
func (op *TempTreeSortOperator) Iterate(in *environment.Environment, fn func(out *environment.Environment) error) error
func (*TempTreeSortOperator) String ¶
func (op *TempTreeSortOperator) String() string