Documentation
¶
Index ¶
- Variables
- type Costable
- type DistinctOperator
- func (op *DistinctOperator) GetNext() Operator
- func (op *DistinctOperator) GetPrev() Operator
- func (op *DistinctOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *DistinctOperator) SetNext(o Operator)
- func (op *DistinctOperator) SetPrev(o Operator)
- func (op *DistinctOperator) String() string
- type DocumentsOperator
- func (op *DocumentsOperator) GetNext() Operator
- func (op *DocumentsOperator) GetPrev() Operator
- func (op *DocumentsOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
- func (op *DocumentsOperator) SetNext(o Operator)
- func (op *DocumentsOperator) SetPrev(o Operator)
- func (op *DocumentsOperator) String() string
- type ExprsOperator
- func (op *ExprsOperator) GetNext() Operator
- func (op *ExprsOperator) GetPrev() Operator
- func (op *ExprsOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
- func (op *ExprsOperator) SetNext(o Operator)
- func (op *ExprsOperator) SetPrev(o Operator)
- func (op *ExprsOperator) String() string
- type FilterOperator
- func (op *FilterOperator) GetNext() Operator
- func (op *FilterOperator) GetPrev() Operator
- func (op *FilterOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *FilterOperator) SetNext(o Operator)
- func (op *FilterOperator) SetPrev(o Operator)
- func (op *FilterOperator) String() string
- type GroupByOperator
- func (op *GroupByOperator) GetNext() Operator
- func (op *GroupByOperator) GetPrev() Operator
- func (op *GroupByOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *GroupByOperator) SetNext(o Operator)
- func (op *GroupByOperator) SetPrev(o Operator)
- func (op *GroupByOperator) String() string
- type HashAggregateOperator
- func (op *HashAggregateOperator) GetNext() Operator
- func (op *HashAggregateOperator) GetPrev() Operator
- func (op *HashAggregateOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *HashAggregateOperator) SetNext(o Operator)
- func (op *HashAggregateOperator) SetPrev(o Operator)
- func (op *HashAggregateOperator) String() string
- type IndexRange
- type IndexRanges
- type IndexScanOperator
- func (op *IndexScanOperator) GetNext() Operator
- func (op *IndexScanOperator) GetPrev() Operator
- func (it *IndexScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
- func (op *IndexScanOperator) SetNext(o Operator)
- func (op *IndexScanOperator) SetPrev(o Operator)
- func (it *IndexScanOperator) String() string
- type IterRenameOperator
- func (op *IterRenameOperator) GetNext() Operator
- func (op *IterRenameOperator) GetPrev() Operator
- func (op *IterRenameOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *IterRenameOperator) SetNext(o Operator)
- func (op *IterRenameOperator) SetPrev(o Operator)
- func (op *IterRenameOperator) String() string
- type MapOperator
- func (op *MapOperator) GetNext() Operator
- func (op *MapOperator) GetPrev() Operator
- func (op *MapOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *MapOperator) SetNext(o Operator)
- func (op *MapOperator) SetPrev(o Operator)
- func (op *MapOperator) String() string
- type MaskDocument
- type Operator
- type OperatorFunc
- type PkScanOperator
- func (op *PkScanOperator) GetNext() Operator
- func (op *PkScanOperator) GetPrev() Operator
- func (it *PkScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
- func (op *PkScanOperator) SetNext(o Operator)
- func (op *PkScanOperator) SetPrev(o Operator)
- func (it *PkScanOperator) String() string
- type ProjectOperator
- func (op *ProjectOperator) GetNext() Operator
- func (op *ProjectOperator) GetPrev() Operator
- func (op *ProjectOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *ProjectOperator) SetNext(o Operator)
- func (op *ProjectOperator) SetPrev(o Operator)
- func (op *ProjectOperator) String() string
- type SeqScanOperator
- func (op *SeqScanOperator) GetNext() Operator
- func (op *SeqScanOperator) GetPrev() Operator
- func (it *SeqScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
- func (op *SeqScanOperator) SetNext(o Operator)
- func (op *SeqScanOperator) SetPrev(o Operator)
- func (it *SeqScanOperator) String() string
- type SetOperator
- func (op *SetOperator) GetNext() Operator
- func (op *SetOperator) GetPrev() Operator
- func (op *SetOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *SetOperator) SetNext(o Operator)
- func (op *SetOperator) SetPrev(o Operator)
- func (op *SetOperator) String() string
- type SkipOperator
- func (op *SkipOperator) GetNext() Operator
- func (op *SkipOperator) GetPrev() Operator
- func (op *SkipOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *SkipOperator) SetNext(o Operator)
- func (op *SkipOperator) SetPrev(o Operator)
- func (op *SkipOperator) String() string
- type SortOperator
- func (op *SortOperator) GetNext() Operator
- func (op *SortOperator) GetPrev() Operator
- func (op *SortOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *SortOperator) SetNext(o Operator)
- func (op *SortOperator) SetPrev(o Operator)
- func (op *SortOperator) String() string
- type Stream
- type TableDeleteOperator
- func (op *TableDeleteOperator) GetNext() Operator
- func (op *TableDeleteOperator) GetPrev() Operator
- func (op *TableDeleteOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *TableDeleteOperator) SetNext(o Operator)
- func (op *TableDeleteOperator) SetPrev(o Operator)
- func (op *TableDeleteOperator) String() string
- type TableInsertOperator
- func (op *TableInsertOperator) GetNext() Operator
- func (op *TableInsertOperator) GetPrev() Operator
- func (op *TableInsertOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *TableInsertOperator) SetNext(o Operator)
- func (op *TableInsertOperator) SetPrev(o Operator)
- func (op *TableInsertOperator) String() string
- type TableReplaceOperator
- func (op *TableReplaceOperator) GetNext() Operator
- func (op *TableReplaceOperator) GetPrev() Operator
- func (op *TableReplaceOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *TableReplaceOperator) SetNext(o Operator)
- func (op *TableReplaceOperator) SetPrev(o Operator)
- func (op *TableReplaceOperator) String() string
- type TakeOperator
- func (op *TakeOperator) GetNext() Operator
- func (op *TakeOperator) GetPrev() Operator
- func (op *TakeOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *TakeOperator) SetNext(o Operator)
- func (op *TakeOperator) SetPrev(o Operator)
- func (op *TakeOperator) String() string
- type UnsetOperator
- func (op *UnsetOperator) GetNext() Operator
- func (op *UnsetOperator) GetPrev() Operator
- func (op *UnsetOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
- func (op *UnsetOperator) SetNext(o Operator)
- func (op *UnsetOperator) SetPrev(o Operator)
- func (op *UnsetOperator) String() string
- type ValueBufferEncoder
- type ValueEncoder
- type ValueRange
- type ValueRanges
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidResult = errors.New("expression must evaluate to a document")
ErrInvalidResult is returned when an expression supposed to evaluate to a document returns something else.
var ErrStreamClosed = errors.New("stream closed")
ErrStreamClosed is used to indicate that a stream must be closed.
Functions ¶
This section is empty.
Types ¶
type DistinctOperator ¶
type DistinctOperator struct {
// contains filtered or unexported fields
}
A DistinctOperator filters duplicate documents.
func Distinct ¶
func Distinct() *DistinctOperator
Distinct filters duplicate documents based on one or more expressions.
func (*DistinctOperator) Iterate ¶
func (op *DistinctOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*DistinctOperator) String ¶
func (op *DistinctOperator) String() string
type DocumentsOperator ¶
type DocumentsOperator struct { Docs []document.Document // contains filtered or unexported fields }
func Documents ¶
func Documents(documents ...document.Document) *DocumentsOperator
Documents creates a DocumentsOperator that iterates over the given values.
func (*DocumentsOperator) Iterate ¶
func (op *DocumentsOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
func (*DocumentsOperator) String ¶
func (op *DocumentsOperator) String() string
type ExprsOperator ¶
func Expressions ¶
func Expressions(exprs ...expr.Expr) *ExprsOperator
Expressions creates an operator that iterates over the given expressions. Each expression must evaluate to a document.
func (*ExprsOperator) Iterate ¶
func (op *ExprsOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
func (*ExprsOperator) String ¶
func (op *ExprsOperator) String() string
type FilterOperator ¶
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 *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*FilterOperator) String ¶
func (op *FilterOperator) String() string
type GroupByOperator ¶
A GroupByOperator applies an expression on each value of the stream and stores the result in the _group variable in the output stream.
func GroupBy ¶
func GroupBy(e expr.Expr) *GroupByOperator
GroupBy applies e on each value of the stream and stores the result in the _group variable in the output stream.
func (*GroupByOperator) Iterate ¶
func (op *GroupByOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*GroupByOperator) String ¶
func (op *GroupByOperator) String() string
type HashAggregateOperator ¶
type HashAggregateOperator struct { Builders []expr.AggregatorBuilder // contains filtered or unexported fields }
A HashAggregateOperator consumes the given stream and outputs one value per group. It reads the _group variable from the environment to determine witch group to assign each value. If no _group variable is available, it will assume all values are part of the same group and aggregate them into one value.
func HashAggregate ¶
func HashAggregate(builders ...expr.AggregatorBuilder) *HashAggregateOperator
HashAggregate consumes the incoming stream and outputs one value per group. It reads the _group variable from the environment to determine whitch group to assign each value. If no _group variable is available, it will assume all values are part of the same group and aggregate them into one value. HashAggregate assumes that the stream is not sorted per group and uses a hash map to group aggregates per _group value.
func (*HashAggregateOperator) Iterate ¶
func (op *HashAggregateOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
func (*HashAggregateOperator) String ¶
func (op *HashAggregateOperator) String() string
type IndexRange ¶
type IndexRange struct {
Min, Max *document.ValueBuffer
// Exclude Min and Max from the results.
// By default, min and max are inclusive.
// Exclusive and Exact cannot be set to true at the same time.
Exclusive bool
// Used to match an exact value equal to Min.
// If set to true, Max will be ignored for comparison
// and for determining the global upper bound.
Exact bool
// IndexArity is the underlying index arity, which can be greater
// than the boundaries of this range.
IndexArity int
// contains filtered or unexported fields
}
IndexRange represents a range to select indexed values after or before a given boundary. Because indexes can be composites, IndexRange boundaries are composite as well.
func (*IndexRange) IsEqual ¶
func (r *IndexRange) IsEqual(other *IndexRange) bool
func (*IndexRange) IsInRange ¶
func (r *IndexRange) IsInRange(value []byte) bool
func (*IndexRange) String ¶
func (r *IndexRange) String() string
type IndexRanges ¶
type IndexRanges []IndexRange
func (IndexRanges) Append ¶
func (r IndexRanges) Append(rng IndexRange) IndexRanges
Append rng to r and return the new slice. Duplicate ranges are ignored.
func (IndexRanges) Cost ¶
func (r IndexRanges) Cost() int
Cost is a best effort function to determine the cost of a range lookup.
func (IndexRanges) EncodeBuffer ¶
func (r IndexRanges) EncodeBuffer(encoder ValueBufferEncoder, env *expr.Environment) error
Encode each range using the given value encoder.
func (IndexRanges) String ¶
func (r IndexRanges) String() string
type IndexScanOperator ¶
type IndexScanOperator struct { // IndexName references the index that will be used to perform the scan IndexName string // Ranges defines the boundaries of the scan, each corresponding to one value of the group of values // being indexed in the case of a composite index. Ranges IndexRanges // Reverse indicates the direction used to traverse the index. Reverse bool // contains filtered or unexported fields }
A IndexScanOperator iterates over the documents of an index.
func IndexScan ¶
func IndexScan(name string, ranges ...IndexRange) *IndexScanOperator
IndexScan creates an iterator that iterates over each document of the given table.
func IndexScanReverse ¶
func IndexScanReverse(name string, ranges ...IndexRange) *IndexScanOperator
IndexScanReverse creates an iterator that iterates over each document of the given table in reverse order.
func (*IndexScanOperator) Iterate ¶
func (it *IndexScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
Iterate over the documents of the table. Each document is stored in the environment that is passed to the fn function, using SetCurrentValue.
func (*IndexScanOperator) String ¶
func (it *IndexScanOperator) String() string
type IterRenameOperator ¶
type IterRenameOperator struct { FieldNames []string // contains filtered or unexported fields }
An IterRenameOperator iterates over all fields of the incoming document in order and renames them.
func IterRename ¶
func IterRename(fieldNames ...string) *IterRenameOperator
IterRename iterates over all fields of the incoming document in order and renames them. If the number of fields of the incoming document doesn't match the number of expected fields, it returns an error.
func (*IterRenameOperator) Iterate ¶
func (op *IterRenameOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*IterRenameOperator) String ¶
func (op *IterRenameOperator) String() string
type MapOperator ¶
A MapOperator applies an expression on each value of the stream and returns a new value.
func Map ¶
func Map(e expr.Expr) *MapOperator
Map evaluates e on each value of the stream and outputs the result.
func (*MapOperator) Iterate ¶
func (op *MapOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*MapOperator) String ¶
func (op *MapOperator) String() string
type MaskDocument ¶
type MaskDocument struct { Env *expr.Environment Exprs []expr.Expr }
func (*MaskDocument) GetByField ¶
func (d *MaskDocument) GetByField(field string) (v document.Value, err error)
func (*MaskDocument) MarshalJSON ¶
func (d *MaskDocument) MarshalJSON() ([]byte, error)
func (*MaskDocument) String ¶
func (d *MaskDocument) String() string
type Operator ¶
type Operator interface { Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error SetPrev(prev Operator) SetNext(next Operator) GetNext() Operator GetPrev() Operator String() string }
An Operator is used to modify a stream. It takes an environment containing the current value as well as any other metadata created by other operatorsand returns a new environment which will be passed to the next operator. If it returns a nil environment, the env will be ignored. If it returns an error, the stream will be interrupted and that error will bubble up and returned by this function, unless that error is ErrStreamClosed, in which case the Iterate method will stop the iteration and return nil. Stream operators can be reused, and thus, any state or side effect should be kept within the Op closure unless the nature of the operator prevents that.
func InsertAfter ¶
func InsertBefore ¶
type OperatorFunc ¶
type OperatorFunc func(func(env *expr.Environment) error) error
An OperatorFunc is the function that will receive each value of the stream.
type PkScanOperator ¶
type PkScanOperator struct { TableName string Ranges ValueRanges Reverse bool // contains filtered or unexported fields }
A PkScanOperator iterates over the documents of a table.
func PkScan ¶
func PkScan(tableName string, ranges ...ValueRange) *PkScanOperator
PkScan creates an iterator that iterates over each document of the given table.
func PkScanReverse ¶
func PkScanReverse(tableName string, ranges ...ValueRange) *PkScanOperator
PkScanReverse creates an iterator that iterates over each document of the given table in reverse order.
func (*PkScanOperator) Iterate ¶
func (it *PkScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
Iterate over the documents of the table. Each document is stored in the environment that is passed to the fn function, using SetCurrentValue.
func (*PkScanOperator) String ¶
func (it *PkScanOperator) String() string
type ProjectOperator ¶
A ProjectOperator applies an expression on each value of the stream and returns a new value.
func (*ProjectOperator) Iterate ¶
func (op *ProjectOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*ProjectOperator) String ¶
func (op *ProjectOperator) String() string
type SeqScanOperator ¶
type SeqScanOperator struct { TableName string Reverse bool // contains filtered or unexported fields }
A SeqScanOperator iterates over the documents of a table.
func SeqScan ¶
func SeqScan(tableName string) *SeqScanOperator
SeqScan creates an iterator that iterates over each document of the given table.
func SeqScanReverse ¶
func SeqScanReverse(tableName string) *SeqScanOperator
SeqScanReverse creates an iterator that iterates over each document of the given table in reverse order.
func (*SeqScanOperator) Iterate ¶
func (it *SeqScanOperator) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
func (*SeqScanOperator) String ¶
func (it *SeqScanOperator) String() string
type SetOperator ¶
type SetOperator struct { Path document.Path E expr.Expr // contains filtered or unexported fields }
A SetOperator filters duplicate documents.
func Set ¶
func Set(path document.Path, e expr.Expr) *SetOperator
Set filters duplicate documents based on one or more expressions.
func (*SetOperator) Iterate ¶
func (op *SetOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*SetOperator) String ¶
func (op *SetOperator) String() string
type SkipOperator ¶
type SkipOperator struct { N int64 // contains filtered or unexported fields }
A SkipOperator skips the n first values of the stream.
func (*SkipOperator) Iterate ¶
func (op *SkipOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*SkipOperator) String ¶
func (op *SkipOperator) String() string
type SortOperator ¶
A SortOperator consumes every value of the stream and outputs them in order.
func Sort ¶
func Sort(e expr.Expr) *SortOperator
Sort consumes every value of the stream and outputs them in order. It operates a partial sort on the iterator using a heap. This ensures a O(k+n log n) time complexity, where k is the sum of Take() + Skip() operators, if provided, otherwise k = n. If the sorting is in ascending order, a min-heap will be used otherwise a max-heap will be used instead. Once the heap is filled entirely with the content of the incoming stream, a stream is returned. During iteration, the stream will pop the k-smallest or k-largest elements, depending on the chosen sorting order (ASC or DESC). This function is not memory efficient as it is loading the entire stream in memory before returning the k-smallest or k-largest elements.
func SortReverse ¶
func SortReverse(e expr.Expr) *SortOperator
SortReverse does the same as Sort but in descending order.
func (*SortOperator) Iterate ¶
func (op *SortOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
func (*SortOperator) String ¶
func (op *SortOperator) String() string
type Stream ¶
type Stream struct {
Op Operator
}
func (*Stream) Iterate ¶
func (s *Stream) Iterate(in *expr.Environment, fn func(out *expr.Environment) error) error
type TableDeleteOperator ¶
type TableDeleteOperator struct { Name string // contains filtered or unexported fields }
A TableDeleteOperator replaces documents in the table
func TableDelete ¶
func TableDelete(tableName string) *TableDeleteOperator
TableDelete deletes documents from the table. Incoming documents must implement the document.Keyer interface.
func (*TableDeleteOperator) Iterate ¶
func (op *TableDeleteOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*TableDeleteOperator) String ¶
func (op *TableDeleteOperator) String() string
type TableInsertOperator ¶
type TableInsertOperator struct { Name string // contains filtered or unexported fields }
A TableInsertOperator inserts incoming documents to the table.
func TableInsert ¶
func TableInsert(tableName string) *TableInsertOperator
TableInsert inserts incoming documents to the table.
func (*TableInsertOperator) Iterate ¶
func (op *TableInsertOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*TableInsertOperator) String ¶
func (op *TableInsertOperator) String() string
type TableReplaceOperator ¶
type TableReplaceOperator struct { Name string // contains filtered or unexported fields }
A TableReplaceOperator replaces documents in the table
func TableReplace ¶
func TableReplace(tableName string) *TableReplaceOperator
TableReplace replaces documents in the table. Incoming documents must implement the document.Keyer interface.
func (*TableReplaceOperator) Iterate ¶
func (op *TableReplaceOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*TableReplaceOperator) String ¶
func (op *TableReplaceOperator) String() string
type TakeOperator ¶
type TakeOperator struct { N int64 // contains filtered or unexported fields }
A TakeOperator closes the stream after a certain number of values.
func Take ¶
func Take(n int64) *TakeOperator
Take closes the stream after n values have passed through the operator.
func (*TakeOperator) Iterate ¶
func (op *TakeOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*TakeOperator) String ¶
func (op *TakeOperator) String() string
type UnsetOperator ¶
type UnsetOperator struct { Field string // contains filtered or unexported fields }
A UnsetOperator filters duplicate documents.
func Unset ¶
func Unset(field string) *UnsetOperator
Unset filters duplicate documents based on one or more expressions.
func (*UnsetOperator) Iterate ¶
func (op *UnsetOperator) Iterate(in *expr.Environment, f func(out *expr.Environment) error) error
Iterate implements the Operator interface.
func (*UnsetOperator) String ¶
func (op *UnsetOperator) String() string
type ValueBufferEncoder ¶
type ValueBufferEncoder interface {
EncodeValueBuffer(vb *document.ValueBuffer) ([]byte, error)
}
type ValueRange ¶
type ValueRange struct {
Min, Max document.Value
// Exclude Min and Max from the results.
// By default, min and max are inclusive.
// Exclusive and Exact cannot be set to true at the same time.
Exclusive bool
// Used to match an exact value equal to Min.
// If set to true, Max will be ignored for comparison
// and for determining the global upper bound.
Exact bool
// contains filtered or unexported fields
}
func (*ValueRange) IsEqual ¶
func (r *ValueRange) IsEqual(other *ValueRange) bool
func (*ValueRange) IsInRange ¶
func (r *ValueRange) IsInRange(value []byte) bool
func (*ValueRange) String ¶
func (r *ValueRange) String() string
type ValueRanges ¶
type ValueRanges []ValueRange
func (ValueRanges) Append ¶
func (r ValueRanges) Append(rng ValueRange) ValueRanges
Append rng to r and return the new slice. Duplicate ranges are ignored.
func (ValueRanges) Cost ¶
func (r ValueRanges) Cost() int
Cost is a best effort function to determine the cost of a range lookup.
func (ValueRanges) Encode ¶
func (r ValueRanges) Encode(encoder ValueEncoder, env *expr.Environment) error
Encode each range using the given value encoder.
func (ValueRanges) String ¶
func (r ValueRanges) String() string