Documentation
¶
Index ¶
- Constants
- func New() *bqlParser
- type AliasAST
- type AliasedStreamWindowAST
- type ArrayAST
- type BinaryKeyword
- type BinaryOpAST
- type BoolLiteral
- type ConditionCaseAST
- type CreateSinkStmt
- type CreateSourceStmt
- type CreateStateStmt
- type CreateStreamAsSelectStmt
- type CreateStreamAsSelectUnionStmt
- type DropSinkStmt
- type DropSourceStmt
- type DropStateStmt
- type DropStreamStmt
- type Emitter
- type EmitterAST
- type EmitterLimit
- type EmitterSampling
- type EmitterSamplingType
- type EvalStmt
- type Expression
- type ExpressionCaseAST
- type ExpressionsAST
- type FilterAST
- type FloatLiteral
- type FuncAppAST
- type FuncName
- type GroupingAST
- type HavingAST
- type Identifier
- type InsertIntoFromStmt
- type IntervalAST
- type IntervalUnit
- type KeyValuePairAST
- type LoadStateOrCreateStmt
- type LoadStateStmt
- type MapAST
- type MetaInformation
- type Missing
- type NullLiteral
- type NumericLiteral
- type Operator
- type ParsedComponent
- type PauseSourceStmt
- type ProjectionsAST
- type Raw
- type ResumeSourceStmt
- type RewindSourceStmt
- type RowMeta
- type RowValue
- type SaveStateStmt
- type SelectStmt
- type SelectUnionStmt
- type SheddingOption
- type SortedExpressionAST
- type SourceSinkParamAST
- type SourceSinkParamKey
- type SourceSinkSpecsAST
- type SourceSinkType
- type Stream
- type StreamIdentifier
- type StreamType
- type StreamWindowAST
- type StringLiteral
- type Type
- type TypeCastAST
- type UnaryOpAST
- type UpdateSinkStmt
- type UpdateSourceStmt
- type UpdateStateStmt
- type WhenThenPairAST
- type Wildcard
- type WindowedFromAST
Constants ¶
View Source
const UnspecifiedCapacity int64 = -1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AliasAST ¶
type AliasAST struct {
Expr Expression
Alias string
}
func (AliasAST) ReferencedRelations ¶
func (AliasAST) RenameReferencedRelation ¶
func (a AliasAST) RenameReferencedRelation(from, to string) Expression
type AliasedStreamWindowAST ¶
type AliasedStreamWindowAST struct {
StreamWindowAST
Alias string
}
type ArrayAST ¶
type ArrayAST struct {
ExpressionsAST
}
func (ArrayAST) ReferencedRelations ¶
func (ArrayAST) RenameReferencedRelation ¶
func (a ArrayAST) RenameReferencedRelation(from, to string) Expression
type BinaryKeyword ¶
type BinaryKeyword int
const ( UnspecifiedKeyword BinaryKeyword = iota Yes No )
func (BinaryKeyword) String ¶
func (k BinaryKeyword) String() string
type BinaryOpAST ¶
type BinaryOpAST struct {
Op Operator
Left Expression
Right Expression
}
func (BinaryOpAST) Foldable ¶
func (b BinaryOpAST) Foldable() bool
func (BinaryOpAST) ReferencedRelations ¶
func (b BinaryOpAST) ReferencedRelations() map[string]bool
func (BinaryOpAST) RenameReferencedRelation ¶
func (b BinaryOpAST) RenameReferencedRelation(from, to string) Expression
func (BinaryOpAST) String ¶
func (b BinaryOpAST) String() string
type BoolLiteral ¶
type BoolLiteral struct {
Value bool
}
func NewBoolLiteral ¶
func NewBoolLiteral(b bool) BoolLiteral
func (BoolLiteral) Foldable ¶
func (l BoolLiteral) Foldable() bool
func (BoolLiteral) ReferencedRelations ¶
func (l BoolLiteral) ReferencedRelations() map[string]bool
func (BoolLiteral) RenameReferencedRelation ¶
func (l BoolLiteral) RenameReferencedRelation(from, to string) Expression
func (BoolLiteral) String ¶
func (l BoolLiteral) String() string
type ConditionCaseAST ¶
type ConditionCaseAST struct {
Checks []WhenThenPairAST
Else Expression
}
func (ConditionCaseAST) Foldable ¶
func (c ConditionCaseAST) Foldable() bool
func (ConditionCaseAST) ReferencedRelations ¶
func (c ConditionCaseAST) ReferencedRelations() map[string]bool
func (ConditionCaseAST) RenameReferencedRelation ¶
func (c ConditionCaseAST) RenameReferencedRelation(from, to string) Expression
func (ConditionCaseAST) String ¶
func (c ConditionCaseAST) String() string
type CreateSinkStmt ¶
type CreateSinkStmt struct {
Name StreamIdentifier
Type SourceSinkType
SourceSinkSpecsAST
}
func (CreateSinkStmt) String ¶
func (s CreateSinkStmt) String() string
type CreateSourceStmt ¶
type CreateSourceStmt struct {
Paused BinaryKeyword
Name StreamIdentifier
Type SourceSinkType
SourceSinkSpecsAST
}
func (CreateSourceStmt) String ¶
func (s CreateSourceStmt) String() string
type CreateStateStmt ¶
type CreateStateStmt struct {
Name StreamIdentifier
Type SourceSinkType
SourceSinkSpecsAST
}
func (CreateStateStmt) String ¶
func (s CreateStateStmt) String() string
type CreateStreamAsSelectStmt ¶
type CreateStreamAsSelectStmt struct {
Name StreamIdentifier
Select SelectStmt
}
func (CreateStreamAsSelectStmt) String ¶
func (s CreateStreamAsSelectStmt) String() string
type CreateStreamAsSelectUnionStmt ¶
type CreateStreamAsSelectUnionStmt struct {
Name StreamIdentifier
SelectUnionStmt
}
func (CreateStreamAsSelectUnionStmt) String ¶
func (s CreateStreamAsSelectUnionStmt) String() string
type DropSinkStmt ¶
type DropSinkStmt struct {
Sink StreamIdentifier
}
func (DropSinkStmt) String ¶
func (s DropSinkStmt) String() string
type DropSourceStmt ¶
type DropSourceStmt struct {
Source StreamIdentifier
}
func (DropSourceStmt) String ¶
func (s DropSourceStmt) String() string
type DropStateStmt ¶
type DropStateStmt struct {
State StreamIdentifier
}
func (DropStateStmt) String ¶
func (s DropStateStmt) String() string
type DropStreamStmt ¶
type DropStreamStmt struct {
Stream StreamIdentifier
}
func (DropStreamStmt) String ¶
func (s DropStreamStmt) String() string
type EmitterAST ¶
type EmitterAST struct {
EmitterType Emitter
EmitterOptions []interface{}
}
type EmitterLimit ¶
type EmitterLimit struct {
Limit int64
}
type EmitterSampling ¶
type EmitterSampling struct {
Value float64
Type EmitterSamplingType
}
type EmitterSamplingType ¶
type EmitterSamplingType int
const ( UnspecifiedSamplingType EmitterSamplingType = iota CountBasedSampling RandomizedSampling TimeBasedSampling )
func (EmitterSamplingType) String ¶
func (est EmitterSamplingType) String() string
type EvalStmt ¶
type EvalStmt struct {
Expr Expression
Input *MapAST
}
type Expression ¶
type ExpressionCaseAST ¶
type ExpressionCaseAST struct {
Expr Expression
ConditionCaseAST
}
func (ExpressionCaseAST) Foldable ¶
func (c ExpressionCaseAST) Foldable() bool
func (ExpressionCaseAST) ReferencedRelations ¶
func (c ExpressionCaseAST) ReferencedRelations() map[string]bool
func (ExpressionCaseAST) RenameReferencedRelation ¶
func (c ExpressionCaseAST) RenameReferencedRelation(from, to string) Expression
func (ExpressionCaseAST) String ¶
func (c ExpressionCaseAST) String() string
type ExpressionsAST ¶
type ExpressionsAST struct {
Expressions []Expression
}
type FilterAST ¶
type FilterAST struct {
Filter Expression
}
type FloatLiteral ¶
type FloatLiteral struct {
Value float64
}
func NewFloatLiteral ¶
func NewFloatLiteral(s string) FloatLiteral
func (FloatLiteral) Foldable ¶
func (l FloatLiteral) Foldable() bool
func (FloatLiteral) ReferencedRelations ¶
func (l FloatLiteral) ReferencedRelations() map[string]bool
func (FloatLiteral) RenameReferencedRelation ¶
func (l FloatLiteral) RenameReferencedRelation(from, to string) Expression
func (FloatLiteral) String ¶
func (l FloatLiteral) String() string
type FuncAppAST ¶
type FuncAppAST struct {
Function FuncName
ExpressionsAST
Ordering []SortedExpressionAST
}
func (FuncAppAST) Foldable ¶
func (f FuncAppAST) Foldable() bool
func (FuncAppAST) ReferencedRelations ¶
func (f FuncAppAST) ReferencedRelations() map[string]bool
func (FuncAppAST) RenameReferencedRelation ¶
func (f FuncAppAST) RenameReferencedRelation(from, to string) Expression
func (FuncAppAST) String ¶
func (f FuncAppAST) String() string
type GroupingAST ¶
type GroupingAST struct {
GroupList []Expression
}
type HavingAST ¶
type HavingAST struct {
Having Expression
}
type Identifier ¶
type Identifier string
type InsertIntoFromStmt ¶
type InsertIntoFromStmt struct {
Sink StreamIdentifier
Input StreamIdentifier
}
func (InsertIntoFromStmt) String ¶
func (s InsertIntoFromStmt) String() string
type IntervalAST ¶
type IntervalAST struct {
FloatLiteral
Unit IntervalUnit
}
type IntervalUnit ¶
type IntervalUnit int
const ( UnspecifiedIntervalUnit IntervalUnit = iota Tuples Seconds Milliseconds )
func (IntervalUnit) String ¶
func (i IntervalUnit) String() string
type KeyValuePairAST ¶
type KeyValuePairAST struct {
Key string
Value Expression
}
type LoadStateOrCreateStmt ¶
type LoadStateOrCreateStmt struct {
Name StreamIdentifier
Type SourceSinkType
Tag string
LoadSpecs SourceSinkSpecsAST
CreateSpecs SourceSinkSpecsAST
}
func (LoadStateOrCreateStmt) String ¶
func (s LoadStateOrCreateStmt) String() string
type LoadStateStmt ¶
type LoadStateStmt struct {
Name StreamIdentifier
Type SourceSinkType
Tag string
SourceSinkSpecsAST
}
func (LoadStateStmt) String ¶
func (s LoadStateStmt) String() string
type MapAST ¶
type MapAST struct {
Entries []KeyValuePairAST
}
func (MapAST) ReferencedRelations ¶
func (MapAST) RenameReferencedRelation ¶
func (m MapAST) RenameReferencedRelation(from, to string) Expression
type MetaInformation ¶
type MetaInformation int
const ( UnknownMeta MetaInformation = iota TimestampMeta NowMeta )
func (MetaInformation) String ¶
func (m MetaInformation) String() string
type Missing ¶
type Missing struct {
}
func NewMissing ¶
func NewMissing() Missing
func (Missing) ReferencedRelations ¶
func (Missing) RenameReferencedRelation ¶
func (l Missing) RenameReferencedRelation(from, to string) Expression
type NullLiteral ¶
type NullLiteral struct {
}
func NewNullLiteral ¶
func NewNullLiteral() NullLiteral
func (NullLiteral) Foldable ¶
func (l NullLiteral) Foldable() bool
func (NullLiteral) ReferencedRelations ¶
func (l NullLiteral) ReferencedRelations() map[string]bool
func (NullLiteral) RenameReferencedRelation ¶
func (l NullLiteral) RenameReferencedRelation(from, to string) Expression
func (NullLiteral) String ¶
func (l NullLiteral) String() string
type NumericLiteral ¶
type NumericLiteral struct {
Value int64
}
func NewNumericLiteral ¶
func NewNumericLiteral(s string) NumericLiteral
func (NumericLiteral) Foldable ¶
func (l NumericLiteral) Foldable() bool
func (NumericLiteral) ReferencedRelations ¶
func (l NumericLiteral) ReferencedRelations() map[string]bool
func (NumericLiteral) RenameReferencedRelation ¶
func (l NumericLiteral) RenameReferencedRelation(from, to string) Expression
func (NumericLiteral) String ¶
func (l NumericLiteral) String() string
type Operator ¶
type Operator int
const ( // Operators are defined in precedence order (increasing). These // values can be compared using the hasHigherPrecedenceThan method. UnknownOperator Operator = iota Or And Not Equal Less LessOrEqual Greater GreaterOrEqual NotEqual Concat Is IsNot Plus Minus Multiply Divide Modulo UnaryMinus )
type ParsedComponent ¶
type ParsedComponent struct {
// contains filtered or unexported fields
}
ParsedComponent is an element of the parse stack that represents a section of the input string that was successfully parsed.
type PauseSourceStmt ¶
type PauseSourceStmt struct {
Source StreamIdentifier
}
func (PauseSourceStmt) String ¶
func (s PauseSourceStmt) String() string
type ProjectionsAST ¶
type ProjectionsAST struct {
Projections []Expression
}
type ResumeSourceStmt ¶
type ResumeSourceStmt struct {
Source StreamIdentifier
}
func (ResumeSourceStmt) String ¶
func (s ResumeSourceStmt) String() string
type RewindSourceStmt ¶
type RewindSourceStmt struct {
Source StreamIdentifier
}
func (RewindSourceStmt) String ¶
func (s RewindSourceStmt) String() string
type RowMeta ¶
type RowMeta struct {
Relation string
MetaType MetaInformation
}
func NewRowMeta ¶
func NewRowMeta(s string, t MetaInformation) RowMeta
func (RowMeta) ReferencedRelations ¶
func (RowMeta) RenameReferencedRelation ¶
func (rm RowMeta) RenameReferencedRelation(from, to string) Expression
type RowValue ¶
func NewRowValue ¶
func (RowValue) ReferencedRelations ¶
func (RowValue) RenameReferencedRelation ¶
func (rv RowValue) RenameReferencedRelation(from, to string) Expression
type SaveStateStmt ¶
type SaveStateStmt struct {
Name StreamIdentifier
Tag string
}
func (SaveStateStmt) String ¶
func (s SaveStateStmt) String() string
type SelectStmt ¶
type SelectStmt struct {
EmitterAST
ProjectionsAST
WindowedFromAST
FilterAST
GroupingAST
HavingAST
}
func (SelectStmt) String ¶
func (s SelectStmt) String() string
type SelectUnionStmt ¶
type SelectUnionStmt struct {
Selects []SelectStmt
}
func (SelectUnionStmt) String ¶
func (s SelectUnionStmt) String() string
type SheddingOption ¶
type SheddingOption int
const ( UnspecifiedSheddingOption SheddingOption = iota Wait DropOldest DropNewest )
func (SheddingOption) String ¶
func (t SheddingOption) String() string
type SortedExpressionAST ¶
type SortedExpressionAST struct {
Expr Expression
Ascending BinaryKeyword
}
func (SortedExpressionAST) Foldable ¶
func (s SortedExpressionAST) Foldable() bool
func (SortedExpressionAST) ReferencedRelations ¶
func (s SortedExpressionAST) ReferencedRelations() map[string]bool
func (SortedExpressionAST) RenameReferencedRelation ¶
func (s SortedExpressionAST) RenameReferencedRelation(from, to string) Expression
func (SortedExpressionAST) String ¶
func (s SortedExpressionAST) String() string
type SourceSinkParamAST ¶
type SourceSinkParamAST struct {
Key SourceSinkParamKey
Value data.Value
}
type SourceSinkParamKey ¶
type SourceSinkParamKey string
type SourceSinkSpecsAST ¶
type SourceSinkSpecsAST struct {
Params []SourceSinkParamAST
}
type SourceSinkType ¶
type SourceSinkType string
type Stream ¶
type Stream struct {
Type StreamType
Name string
Params []Expression
}
It seems not possible in Go to have a variable that says "this is either struct A or struct B or struct C", so we build one struct that serves both for "real" streams (as in `FROM x`) and stream- generating functions (as in `FROM series(1, 5)`).
type StreamIdentifier ¶
type StreamIdentifier string
type StreamType ¶
type StreamType int
const ( UnknownStreamType StreamType = iota ActualStream UDSFStream )
func (StreamType) String ¶
func (st StreamType) String() string
type StreamWindowAST ¶
type StreamWindowAST struct {
Stream
IntervalAST
Capacity int64
Shedding SheddingOption
}
type StringLiteral ¶
type StringLiteral struct {
Value string
}
func NewStringLiteral ¶
func NewStringLiteral(s string) StringLiteral
func (StringLiteral) Foldable ¶
func (l StringLiteral) Foldable() bool
func (StringLiteral) ReferencedRelations ¶
func (l StringLiteral) ReferencedRelations() map[string]bool
func (StringLiteral) RenameReferencedRelation ¶
func (l StringLiteral) RenameReferencedRelation(from, to string) Expression
func (StringLiteral) String ¶
func (l StringLiteral) String() string
type TypeCastAST ¶
type TypeCastAST struct {
Expr Expression
Target Type
}
func (TypeCastAST) Foldable ¶
func (u TypeCastAST) Foldable() bool
func (TypeCastAST) ReferencedRelations ¶
func (u TypeCastAST) ReferencedRelations() map[string]bool
func (TypeCastAST) RenameReferencedRelation ¶
func (u TypeCastAST) RenameReferencedRelation(from, to string) Expression
func (TypeCastAST) String ¶
func (u TypeCastAST) String() string
type UnaryOpAST ¶
type UnaryOpAST struct {
Op Operator
Expr Expression
}
func (UnaryOpAST) Foldable ¶
func (u UnaryOpAST) Foldable() bool
func (UnaryOpAST) ReferencedRelations ¶
func (u UnaryOpAST) ReferencedRelations() map[string]bool
func (UnaryOpAST) RenameReferencedRelation ¶
func (u UnaryOpAST) RenameReferencedRelation(from, to string) Expression
func (UnaryOpAST) String ¶
func (u UnaryOpAST) String() string
type UpdateSinkStmt ¶
type UpdateSinkStmt struct {
Name StreamIdentifier
SourceSinkSpecsAST
}
func (UpdateSinkStmt) String ¶
func (s UpdateSinkStmt) String() string
type UpdateSourceStmt ¶
type UpdateSourceStmt struct {
Name StreamIdentifier
SourceSinkSpecsAST
}
func (UpdateSourceStmt) String ¶
func (s UpdateSourceStmt) String() string
type UpdateStateStmt ¶
type UpdateStateStmt struct {
Name StreamIdentifier
SourceSinkSpecsAST
}
func (UpdateStateStmt) String ¶
func (s UpdateStateStmt) String() string
type WhenThenPairAST ¶
type WhenThenPairAST struct {
When Expression
Then Expression
}
type Wildcard ¶
type Wildcard struct {
Relation string
}
func NewWildcard ¶
func (Wildcard) ReferencedRelations ¶
func (Wildcard) RenameReferencedRelation ¶
func (w Wildcard) RenameReferencedRelation(from, to string) Expression
type WindowedFromAST ¶
type WindowedFromAST struct {
Relations []AliasedStreamWindowAST
}
Click to show internal directories.
Click to hide internal directories.