Documentation
¶
Index ¶
- Variables
- func AreStreamsEqual(first, second RecordStream) (bool, error)
- func AreStreamsEqualNoOrdering(first, second RecordStream) (bool, error)
- func HashRecord(rec *Record) (uint64, error)
- func ParseType(str string) octosql.Value
- type Aggregate
- type AggregatePrototype
- type AliasedExpression
- type And
- type Constant
- type Datatype
- type Distinct
- type DistinctStream
- type DummyNode
- type DummyValue
- type Equal
- type Expression
- type Field
- type Filter
- type FilteredStream
- type Formula
- type Function
- type FunctionExpression
- type GreaterEqual
- type GroupBy
- type GroupByStream
- type HashMap
- type In
- type InMemoryStream
- type InnerJoin
- type InnerJoinedStream
- type Iterator
- type Joiner
- type LeftJoin
- type LeftJoinedStream
- type LessEqual
- type LessThan
- type Like
- type Limit
- type LimitedStream
- type LogicExpression
- type Map
- type MappedStream
- type MoreThan
- type NamedExpression
- type Node
- type NodeExpression
- type Not
- type NotEqual
- type NotIn
- type Offset
- type Or
- type OrderBy
- type OrderDirection
- type Predicate
- type Record
- func NewRecord(fields []octosql.VariableName, data map[octosql.VariableName]octosql.Value, ...) *Record
- func NewRecordFromSlice(fields []octosql.VariableName, data []octosql.Value, opts ...RecordOption) *Record
- func NewRecordFromSliceWithNormalize(fields []octosql.VariableName, data []interface{}, opts ...RecordOption) *Record
- func Normalize(rec *Record) *Record
- func (r *Record) AsTuple() octosql.Tuple
- func (r *Record) AsVariables() octosql.Variables
- func (r *Record) Equal(other *Record) bool
- func (r *Record) EventTime() octosql.Value
- func (r *Record) Fields() []Field
- func (r *Record) IsUndo() bool
- func (r *Record) String() string
- func (r *Record) Value(field octosql.VariableName) octosql.Value
- type RecordOption
- type RecordStream
- type Relation
- type RequalifiedStream
- type Requalifier
- type TupleExpression
- type UnifiedStream
- type UnionAll
- type Validator
- type Variable
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEndOfStream = errors.New("end of stream")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func AreStreamsEqual ¶
func AreStreamsEqual(first, second RecordStream) (bool, error)
func AreStreamsEqualNoOrdering ¶
func AreStreamsEqualNoOrdering(first, second RecordStream) (bool, error)
func HashRecord ¶
Types ¶
type AggregatePrototype ¶
type AggregatePrototype func() Aggregate
type AliasedExpression ¶
type AliasedExpression struct {
// contains filtered or unexported fields
}
func NewAliasedExpression ¶
func NewAliasedExpression(name octosql.VariableName, expr Expression) *AliasedExpression
func (*AliasedExpression) ExpressionValue ¶
func (*AliasedExpression) Name ¶
func (alExpr *AliasedExpression) Name() octosql.VariableName
type Distinct ¶
type Distinct struct {
// contains filtered or unexported fields
}
func NewDistinct ¶
type DistinctStream ¶
type DistinctStream struct {
// contains filtered or unexported fields
}
func (*DistinctStream) Close ¶
func (ds *DistinctStream) Close() error
func (*DistinctStream) Next ¶
func (ds *DistinctStream) Next() (*Record, error)
type DummyNode ¶
type DummyNode struct {
// contains filtered or unexported fields
}
func NewDummyNode ¶
type DummyValue ¶
type DummyValue struct {
// contains filtered or unexported fields
}
func NewDummyValue ¶
func NewDummyValue(value octosql.Value) *DummyValue
func (*DummyValue) ExpressionValue ¶
type Expression ¶
type Field ¶
type Field struct {
Name octosql.VariableName
}
type FilteredStream ¶
type FilteredStream struct {
// contains filtered or unexported fields
}
func (*FilteredStream) Close ¶
func (stream *FilteredStream) Close() error
func (*FilteredStream) Next ¶
func (stream *FilteredStream) Next() (*Record, error)
type Function ¶
type Function struct {
Name string
ArgumentNames [][]string
Description docs.Documentation
Validator Validator
Logic func(...octosql.Value) (octosql.Value, error)
}
func (*Function) Document ¶
func (f *Function) Document() docs.Documentation
type FunctionExpression ¶
type FunctionExpression struct {
// contains filtered or unexported fields
}
func NewFunctionExpression ¶
func NewFunctionExpression(fun *Function, args []Expression) *FunctionExpression
func (*FunctionExpression) ExpressionValue ¶
type GreaterEqual ¶
type GreaterEqual struct {
}
func (*GreaterEqual) Apply ¶
func (rel *GreaterEqual) Apply(variables octosql.Variables, left, right Expression) (bool, error)
type GroupBy ¶
type GroupBy struct {
// contains filtered or unexported fields
}
func NewGroupBy ¶
func NewGroupBy(source Node, key []Expression, fields []octosql.VariableName, aggregatePrototypes []AggregatePrototype, as []octosql.VariableName) *GroupBy
type GroupByStream ¶
type GroupByStream struct {
// contains filtered or unexported fields
}
func (*GroupByStream) Close ¶
func (stream *GroupByStream) Close() error
func (*GroupByStream) Next ¶
func (stream *GroupByStream) Next() (*Record, error)
type HashMap ¶
type HashMap struct {
// contains filtered or unexported fields
}
func NewHashMap ¶
func NewHashMap() *HashMap
func (*HashMap) GetIterator ¶
type InMemoryStream ¶
type InMemoryStream struct {
// contains filtered or unexported fields
}
func NewInMemoryStream ¶
func NewInMemoryStream(data []*Record) *InMemoryStream
func (*InMemoryStream) Close ¶
func (ims *InMemoryStream) Close() error
func (*InMemoryStream) Next ¶
func (ims *InMemoryStream) Next() (*Record, error)
type InnerJoin ¶
type InnerJoin struct {
// contains filtered or unexported fields
}
InnerJoin currently only supports lookup joins.
type InnerJoinedStream ¶
type InnerJoinedStream struct {
// contains filtered or unexported fields
}
func (*InnerJoinedStream) Close ¶
func (stream *InnerJoinedStream) Close() error
func (*InnerJoinedStream) Next ¶
func (stream *InnerJoinedStream) Next() (*Record, error)
type Joiner ¶ added in v0.1.1
type Joiner struct {
// contains filtered or unexported fields
}
Joiner is used to join one source stream with another datasource.
func (*Joiner) GetNextRecord ¶ added in v0.1.1
func (joiner *Joiner) GetNextRecord() (*Record, RecordStream, error)
type LeftJoin ¶
type LeftJoin struct {
// contains filtered or unexported fields
}
LeftJoin currently only supports lookup joins.
type LeftJoinedStream ¶
type LeftJoinedStream struct {
// contains filtered or unexported fields
}
func (*LeftJoinedStream) Close ¶
func (stream *LeftJoinedStream) Close() error
func (*LeftJoinedStream) Next ¶
func (stream *LeftJoinedStream) Next() (*Record, error)
type Limit ¶
type Limit struct {
// contains filtered or unexported fields
}
func NewLimit ¶
func NewLimit(data Node, limit Expression) *Limit
type LimitedStream ¶
type LimitedStream struct {
// contains filtered or unexported fields
}
func (*LimitedStream) Close ¶
func (node *LimitedStream) Close() error
func (*LimitedStream) Next ¶
func (node *LimitedStream) Next() (*Record, error)
type LogicExpression ¶
type LogicExpression struct {
// contains filtered or unexported fields
}
func NewLogicExpression ¶
func NewLogicExpression(formula Formula) *LogicExpression
func (*LogicExpression) ExpressionValue ¶
type MappedStream ¶
type MappedStream struct {
// contains filtered or unexported fields
}
func (*MappedStream) Close ¶
func (stream *MappedStream) Close() error
func (*MappedStream) Next ¶
func (stream *MappedStream) Next() (*Record, error)
type NamedExpression ¶
type NamedExpression interface {
Expression
Name() octosql.VariableName
}
type NodeExpression ¶
type NodeExpression struct {
// contains filtered or unexported fields
}
func NewNodeExpression ¶
func NewNodeExpression(node Node) *NodeExpression
func (*NodeExpression) ExpressionValue ¶
type Offset ¶
type Offset struct {
// contains filtered or unexported fields
}
func NewOffset ¶
func NewOffset(data Node, offsetExpr Expression) *Offset
type OrderBy ¶
type OrderBy struct {
// contains filtered or unexported fields
}
func NewOrderBy ¶
func NewOrderBy(exprs []Expression, directions []OrderDirection, source Node) *OrderBy
type OrderDirection ¶
type OrderDirection string
const ( Ascending OrderDirection = "asc" Descending OrderDirection = "desc" )
type Predicate ¶
type Predicate struct {
Left Expression
Relation Relation
Right Expression
}
func NewPredicate ¶
func NewPredicate(left Expression, relation Relation, right Expression) *Predicate
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func NewRecord ¶
func NewRecord(fields []octosql.VariableName, data map[octosql.VariableName]octosql.Value, opts ...RecordOption) *Record
func NewRecordFromSlice ¶
func NewRecordFromSlice(fields []octosql.VariableName, data []octosql.Value, opts ...RecordOption) *Record
func NewRecordFromSliceWithNormalize ¶
func NewRecordFromSliceWithNormalize(fields []octosql.VariableName, data []interface{}, opts ...RecordOption) *Record
func (*Record) AsVariables ¶
type RecordOption ¶ added in v0.2.0
type RecordOption func(stream *Record)
func WithEventTime ¶ added in v0.2.0
func WithEventTime(eventTime time.Time) RecordOption
func WithMetadataFrom ¶ added in v0.2.0
func WithMetadataFrom(base *Record) RecordOption
func WithUndo ¶ added in v0.2.0
func WithUndo() RecordOption
type Relation ¶
type Relation interface {
Apply(variables octosql.Variables, left, right Expression) (bool, error)
}
func NewGreaterEqual ¶
func NewGreaterEqual() Relation
func NewLessEqual ¶
func NewLessEqual() Relation
func NewLessThan ¶
func NewLessThan() Relation
func NewMoreThan ¶
func NewMoreThan() Relation
func NewNotEqual ¶
func NewNotEqual() Relation
type RequalifiedStream ¶
type RequalifiedStream struct {
// contains filtered or unexported fields
}
func (*RequalifiedStream) Close ¶
func (stream *RequalifiedStream) Close() error
func (*RequalifiedStream) Next ¶
func (stream *RequalifiedStream) Next() (*Record, error)
type Requalifier ¶
type Requalifier struct {
// contains filtered or unexported fields
}
func NewRequalifier ¶
func NewRequalifier(qualifier string, child Node) *Requalifier
func (*Requalifier) Get ¶
func (node *Requalifier) Get(variables octosql.Variables) (RecordStream, error)
type TupleExpression ¶
type TupleExpression struct {
// contains filtered or unexported fields
}
func NewTuple ¶
func NewTuple(expressions []Expression) *TupleExpression
func (*TupleExpression) ExpressionValue ¶
type UnifiedStream ¶
type UnifiedStream struct {
// contains filtered or unexported fields
}
func (*UnifiedStream) Close ¶
func (node *UnifiedStream) Close() error
func (*UnifiedStream) Next ¶
func (node *UnifiedStream) Next() (*Record, error)
type UnionAll ¶
type UnionAll struct {
// contains filtered or unexported fields
}
func NewUnionAll ¶
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
func NewVariable ¶
func NewVariable(name octosql.VariableName) *Variable
func (*Variable) ExpressionValue ¶
func (*Variable) Name ¶
func (v *Variable) Name() octosql.VariableName
Source Files
¶
Click to show internal directories.
Click to hide internal directories.