SQLParser

package
v2.3.8+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2018 License: Apache-2.0 Imports: 19 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AggRegistry = map[string]uda.AggInterface{
	"TickCandler":   &tickcandler.TickCandler{},
	"tickcandler":   &tickcandler.TickCandler{},
	"CandleCandler": &candlecandler.CandleCandler{},
	"candlecandler": &candlecandler.CandleCandler{},
	"Count":         &count.Count{},
	"count":         &count.Count{},
	"Min":           &min.Min{},
	"min":           &min.Min{},
	"Max":           &max.Max{},
	"max":           &max.Max{},
	"Avg":           &avg.Avg{},
	"avg":           &avg.Avg{},
}

Functions

func CoerceToNumeric

func CoerceToNumeric(literal *Literal) (err error)

Utility Structs and Functions

func Explain

func Explain(ctx IMSTree, o_level ...int) (out []string)

func ExplainAllItemsInList

func ExplainAllItemsInList(items []IMSTree, level int) (out []string)

func GetStructString

func GetStructString(sp interface{}) string

func PrependLevel

func PrependLevel(msg string, level int) string

func PrintExplain

func PrintExplain(stmt string, input []string)

func QueryWalk

func QueryWalk(es *ExecutableStatement, i_ctx IMSTree) interface{}

func SourceValidator

func SourceValidator(sourceDSV []io.DataShape, selectList []*AliasedIdentifier) (validates bool,
	missing, keepList, projectionList []string, err error)

Types

type AliasedIdentifier

type AliasedIdentifier struct {
	IsPrimary, IsAliased, IsFunctionCall bool
	PrimaryName, Alias                   string
	RuntimeExpression                    *ExpressionParse
	FunctionCall                         *FunctionCallReference
}

func NewAliasedIdentifier

func NewAliasedIdentifier(name ...string) (ai *AliasedIdentifier)

func (*AliasedIdentifier) AddAlias

func (ai *AliasedIdentifier) AddAlias(alias string)

func (*AliasedIdentifier) AddFunctionCall

func (ai *AliasedIdentifier) AddFunctionCall(fc *FunctionCallReference)

func (*AliasedIdentifier) AddRuntimeExpression

func (ai *AliasedIdentifier) AddRuntimeExpression(ep *ExpressionParse)

func (*AliasedIdentifier) String

func (ai *AliasedIdentifier) String() (out string)

type AliasedRelationParse

type AliasedRelationParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewAliasedRelationParse

func NewAliasedRelationParse(node antlr.Tree) (term *AliasedRelationParse)

func (*AliasedRelationParse) Accept

func (this *AliasedRelationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*AliasedRelationParse) String

func (sp *AliasedRelationParse) String(level int) (out []string)

type ArithmeticBinaryParse

type ArithmeticBinaryParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewArithmeticBinaryParse

func NewArithmeticBinaryParse(node antlr.Tree) (term *ArithmeticBinaryParse)

func (*ArithmeticBinaryParse) Accept

func (this *ArithmeticBinaryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ArithmeticBinaryParse) String

func (sp *ArithmeticBinaryParse) String(level int) (out []string)

type ArithmeticOperatorEnum

type ArithmeticOperatorEnum uint8
const (
	MINUS ArithmeticOperatorEnum
	PLUS
	MULTIPLY
	DIVIDE
	PERCENT
)

type ArithmeticUnaryParse

type ArithmeticUnaryParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewArithmeticUnaryParse

func NewArithmeticUnaryParse(node antlr.Tree) (term *ArithmeticUnaryParse)

func (*ArithmeticUnaryParse) Accept

func (this *ArithmeticUnaryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ArithmeticUnaryParse) String

func (sp *ArithmeticUnaryParse) String(level int) (out []string)

type AstBuilder

type AstBuilder struct {
	BaseSQLBaseListener

	QTRoot, QTCurrent *QueryTree

	Mtree IMSTree // The query tree, built from the parse tree
	// contains filtered or unexported fields
}

func NewAstBuilder

func NewAstBuilder(sourceString string) (ast *AstBuilder, err error)

type AtTimeZoneParse

type AtTimeZoneParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewAtTimeZoneParse

func NewAtTimeZoneParse(node antlr.Tree) (term *AtTimeZoneParse)

func (*AtTimeZoneParse) Accept

func (this *AtTimeZoneParse) Accept(visitor IMSTreeVisitor) interface{}

func (*AtTimeZoneParse) String

func (sp *AtTimeZoneParse) String(level int) (out []string)

type BaseMSTreeVisitor

type BaseMSTreeVisitor struct{}

func (*BaseMSTreeVisitor) Visit

func (mst *BaseMSTreeVisitor) Visit(tree IMSTree) interface{}

func (*BaseMSTreeVisitor) VisitChildren

func (mst *BaseMSTreeVisitor) VisitChildren(tree IMSTree) interface{}

type BaseSQLQueryTreeVisitor

type BaseSQLQueryTreeVisitor struct {
	*BaseMSTreeVisitor
}

func (*BaseSQLQueryTreeVisitor) Visit

func (this *BaseSQLQueryTreeVisitor) Visit(tree IMSTree) interface{}

func (*BaseSQLQueryTreeVisitor) VisitAliasedRelationParse

func (this *BaseSQLQueryTreeVisitor) VisitAliasedRelationParse(ctx *AliasedRelationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitArithmeticBinaryParse

func (this *BaseSQLQueryTreeVisitor) VisitArithmeticBinaryParse(ctx *ArithmeticBinaryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitArithmeticUnaryParse

func (this *BaseSQLQueryTreeVisitor) VisitArithmeticUnaryParse(ctx *ArithmeticUnaryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitAtTimeZoneParse

func (this *BaseSQLQueryTreeVisitor) VisitAtTimeZoneParse(ctx *AtTimeZoneParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitBaseTypeParse

func (this *BaseSQLQueryTreeVisitor) VisitBaseTypeParse(ctx *BaseTypeParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitBetweenParse

func (this *BaseSQLQueryTreeVisitor) VisitBetweenParse(ctx *BetweenParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitBooleanExpressionParse

func (this *BaseSQLQueryTreeVisitor) VisitBooleanExpressionParse(ctx *BooleanExpressionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitCallArgParse

func (this *BaseSQLQueryTreeVisitor) VisitCallArgParse(ctx *CallArgParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitCastParse

func (this *BaseSQLQueryTreeVisitor) VisitCastParse(ctx *CastParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitChildren

func (this *BaseSQLQueryTreeVisitor) VisitChildren(tree IMSTree) interface{}

func (*BaseSQLQueryTreeVisitor) VisitColumnAliasesParse

func (this *BaseSQLQueryTreeVisitor) VisitColumnAliasesParse(ctx *ColumnAliasesParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitColumnDefinitionParse

func (this *BaseSQLQueryTreeVisitor) VisitColumnDefinitionParse(ctx *ColumnDefinitionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitComparisonOperatorParse

func (this *BaseSQLQueryTreeVisitor) VisitComparisonOperatorParse(ctx *ComparisonOperatorParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitComparisonParse

func (this *BaseSQLQueryTreeVisitor) VisitComparisonParse(ctx *ComparisonParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitComparisonQuantifierParse

func (this *BaseSQLQueryTreeVisitor) VisitComparisonQuantifierParse(ctx *ComparisonQuantifierParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitConcatenationParse

func (this *BaseSQLQueryTreeVisitor) VisitConcatenationParse(ctx *ConcatenationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitDereferenceParse

func (this *BaseSQLQueryTreeVisitor) VisitDereferenceParse(ctx *DereferenceParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitDistinctFromParse

func (this *BaseSQLQueryTreeVisitor) VisitDistinctFromParse(ctx *DistinctFromParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitExplainOptionParse

func (this *BaseSQLQueryTreeVisitor) VisitExplainOptionParse(ctx *ExplainOptionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitExpressionParse

func (this *BaseSQLQueryTreeVisitor) VisitExpressionParse(ctx *ExpressionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitExtractParse

func (this *BaseSQLQueryTreeVisitor) VisitExtractParse(ctx *ExtractParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitFilterParse

func (this *BaseSQLQueryTreeVisitor) VisitFilterParse(ctx *FilterParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitFrameBoundParse

func (this *BaseSQLQueryTreeVisitor) VisitFrameBoundParse(ctx *FrameBoundParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitFunctionCallParse

func (this *BaseSQLQueryTreeVisitor) VisitFunctionCallParse(ctx *FunctionCallParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitGroupByParse

func (this *BaseSQLQueryTreeVisitor) VisitGroupByParse(ctx *GroupByParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitGroupingElementParse

func (this *BaseSQLQueryTreeVisitor) VisitGroupingElementParse(ctx *GroupingElementParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitGroupingExpressionsParse

func (this *BaseSQLQueryTreeVisitor) VisitGroupingExpressionsParse(ctx *GroupingExpressionsParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitGroupingSetParse

func (this *BaseSQLQueryTreeVisitor) VisitGroupingSetParse(ctx *GroupingSetParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitIDParse

func (this *BaseSQLQueryTreeVisitor) VisitIDParse(ctx *IDParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitInListParse

func (this *BaseSQLQueryTreeVisitor) VisitInListParse(ctx *InListParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitInSubqueryParse

func (this *BaseSQLQueryTreeVisitor) VisitInSubqueryParse(ctx *InSubqueryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitIntervalFieldParse

func (this *BaseSQLQueryTreeVisitor) VisitIntervalFieldParse(ctx *IntervalFieldParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitIntervalParse

func (this *BaseSQLQueryTreeVisitor) VisitIntervalParse(ctx *IntervalParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitJoinCriteriaParse

func (this *BaseSQLQueryTreeVisitor) VisitJoinCriteriaParse(ctx *JoinCriteriaParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitLambdaParse

func (this *BaseSQLQueryTreeVisitor) VisitLambdaParse(ctx *LambdaParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitLevelOfIsolationParse

func (this *BaseSQLQueryTreeVisitor) VisitLevelOfIsolationParse(ctx *LevelOfIsolationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitLikeClauseParse

func (this *BaseSQLQueryTreeVisitor) VisitLikeClauseParse(ctx *LikeClauseParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitLikeParse

func (this *BaseSQLQueryTreeVisitor) VisitLikeParse(ctx *LikeParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitNamedQueryParse

func (this *BaseSQLQueryTreeVisitor) VisitNamedQueryParse(ctx *NamedQueryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitNonReservedParse

func (this *BaseSQLQueryTreeVisitor) VisitNonReservedParse(ctx *NonReservedParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitNormalizeParse

func (this *BaseSQLQueryTreeVisitor) VisitNormalizeParse(ctx *NormalizeParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitNullPredicateParse

func (this *BaseSQLQueryTreeVisitor) VisitNullPredicateParse(ctx *NullPredicateParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitOverParse

func (this *BaseSQLQueryTreeVisitor) VisitOverParse(ctx *OverParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitPredicateParse

func (this *BaseSQLQueryTreeVisitor) VisitPredicateParse(ctx *PredicateParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitPrimaryExpressionParse

func (this *BaseSQLQueryTreeVisitor) VisitPrimaryExpressionParse(ctx *PrimaryExpressionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitPrivilegeParse

func (this *BaseSQLQueryTreeVisitor) VisitPrivilegeParse(ctx *PrivilegeParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQualifiedNameParse

func (this *BaseSQLQueryTreeVisitor) VisitQualifiedNameParse(ctx *QualifiedNameParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQuantifiedComparisonParse

func (this *BaseSQLQueryTreeVisitor) VisitQuantifiedComparisonParse(ctx *QuantifiedComparisonParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQueryNoWithParse

func (this *BaseSQLQueryTreeVisitor) VisitQueryNoWithParse(ctx *QueryNoWithParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQueryParse

func (this *BaseSQLQueryTreeVisitor) VisitQueryParse(ctx *QueryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQueryPrimaryParse

func (this *BaseSQLQueryTreeVisitor) VisitQueryPrimaryParse(ctx *QueryPrimaryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQuerySpecificationParse

func (this *BaseSQLQueryTreeVisitor) VisitQuerySpecificationParse(ctx *QuerySpecificationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitQueryTermParse

func (this *BaseSQLQueryTreeVisitor) VisitQueryTermParse(ctx *QueryTermParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitRelationParse

func (this *BaseSQLQueryTreeVisitor) VisitRelationParse(ctx *RelationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitRelationPrimaryParse

func (this *BaseSQLQueryTreeVisitor) VisitRelationPrimaryParse(ctx *RelationPrimaryParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSampledRelationParse

func (this *BaseSQLQueryTreeVisitor) VisitSampledRelationParse(ctx *SampledRelationParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSearchedCaseParse

func (this *BaseSQLQueryTreeVisitor) VisitSearchedCaseParse(ctx *SearchedCaseParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSelectItemParse

func (this *BaseSQLQueryTreeVisitor) VisitSelectItemParse(ctx *SelectItemParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSimpleCaseParse

func (this *BaseSQLQueryTreeVisitor) VisitSimpleCaseParse(ctx *SimpleCaseParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSortItemParse

func (this *BaseSQLQueryTreeVisitor) VisitSortItemParse(ctx *SortItemParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSpecialDateTimeFunctionParse

func (this *BaseSQLQueryTreeVisitor) VisitSpecialDateTimeFunctionParse(ctx *SpecialDateTimeFunctionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitStatementParse

func (this *BaseSQLQueryTreeVisitor) VisitStatementParse(ctx *StatementParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitStatementsParse

func (this *BaseSQLQueryTreeVisitor) VisitStatementsParse(ctx *StatementsParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSubscriptParse

func (this *BaseSQLQueryTreeVisitor) VisitSubscriptParse(ctx *SubscriptParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitSubstringParse

func (this *BaseSQLQueryTreeVisitor) VisitSubstringParse(ctx *SubstringParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTableElementParse

func (this *BaseSQLQueryTreeVisitor) VisitTableElementParse(ctx *TableElementParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTablePropertiesParse

func (this *BaseSQLQueryTreeVisitor) VisitTablePropertiesParse(ctx *TablePropertiesParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTablePropertyParse

func (this *BaseSQLQueryTreeVisitor) VisitTablePropertyParse(ctx *TablePropertyParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTimeZoneSpecifierParse

func (this *BaseSQLQueryTreeVisitor) VisitTimeZoneSpecifierParse(ctx *TimeZoneSpecifierParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTransactionModeParse

func (this *BaseSQLQueryTreeVisitor) VisitTransactionModeParse(ctx *TransactionModeParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTypeParameterParse

func (this *BaseSQLQueryTreeVisitor) VisitTypeParameterParse(ctx *TypeParameterParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitTypeTParse

func (this *BaseSQLQueryTreeVisitor) VisitTypeTParse(ctx *TypeTParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitValueExpressionParse

func (this *BaseSQLQueryTreeVisitor) VisitValueExpressionParse(ctx *ValueExpressionParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitWhenParse

func (this *BaseSQLQueryTreeVisitor) VisitWhenParse(ctx *WhenParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitWindowFrameParse

func (this *BaseSQLQueryTreeVisitor) VisitWindowFrameParse(ctx *WindowFrameParse) interface{}

func (*BaseSQLQueryTreeVisitor) VisitWithParse

func (this *BaseSQLQueryTreeVisitor) VisitWithParse(ctx *WithParse) interface{}

type BaseTypeEnum

type BaseTypeEnum uint8
const (
	TIME_WITH_TIME_ZONE BaseTypeEnum
	TIMESTAMP_WITH_TIME_ZONE
	DOUBLE_PRECISION
)

type BaseTypeParse

type BaseTypeParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewBaseTypeParse

func NewBaseTypeParse(node antlr.Tree) (term *BaseTypeParse)

func (*BaseTypeParse) Accept

func (this *BaseTypeParse) Accept(visitor IMSTreeVisitor) interface{}

func (*BaseTypeParse) String

func (sp *BaseTypeParse) String(level int) (out []string)

type BetweenParse

type BetweenParse struct {
	MSTree
	IsNot bool
	// contains filtered or unexported fields
}

func NewBetweenParse

func NewBetweenParse(node antlr.Tree) (term *BetweenParse)

func (*BetweenParse) Accept

func (this *BetweenParse) Accept(visitor IMSTreeVisitor) interface{}

func (*BetweenParse) String

func (sp *BetweenParse) String(level int) (out []string)

type BinaryOperatorEnum

type BinaryOperatorEnum uint8
const (
	AND_OP BinaryOperatorEnum
	OR_OP
)

type BooleanExpressionParse

type BooleanExpressionParse struct {
	MSTree

	IsLiteral, IsNot bool
	// contains filtered or unexported fields
}

================================================ BooleanExpression block ================================================

func NewBooleanExpressionParse

func NewBooleanExpressionParse(node antlr.Tree) (term *BooleanExpressionParse)

func (*BooleanExpressionParse) Accept

func (this *BooleanExpressionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*BooleanExpressionParse) String

func (sp *BooleanExpressionParse) String(level int) (out []string)

type CallArgParse

type CallArgParse struct{ MSTree }

func NewCallArgParse

func NewCallArgParse(node antlr.Tree) (term *CallArgParse)

func (*CallArgParse) Accept

func (this *CallArgParse) Accept(visitor IMSTreeVisitor) interface{}

func (*CallArgParse) String

func (sp *CallArgParse) String(level int) (out []string)

type CastParse

type CastParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewCastParse

func NewCastParse(node antlr.Tree) (term *CastParse)

func (*CastParse) Accept

func (this *CastParse) Accept(visitor IMSTreeVisitor) interface{}

func (*CastParse) String

func (sp *CastParse) String(level int) (out []string)

type ColumnAliasesParse

type ColumnAliasesParse struct{ MSTree }

func NewColumnAliasesParse

func NewColumnAliasesParse(node antlr.Tree) (term *ColumnAliasesParse)

func (*ColumnAliasesParse) Accept

func (this *ColumnAliasesParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ColumnAliasesParse) String

func (sp *ColumnAliasesParse) String(level int) (out []string)

type ColumnDefinitionParse

type ColumnDefinitionParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewColumnDefinitionParse

func NewColumnDefinitionParse(node antlr.Tree) (term *ColumnDefinitionParse)

func (*ColumnDefinitionParse) Accept

func (this *ColumnDefinitionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ColumnDefinitionParse) String

func (sp *ColumnDefinitionParse) String(level int) (out []string)

type ColumnReference

type ColumnReference struct {
	Value *AliasedIdentifier
}

func NewColumnReference

func NewColumnReference(name string) (cr *ColumnReference)

func (*ColumnReference) GetAlias

func (cr *ColumnReference) GetAlias() string

func (*ColumnReference) GetName

func (cr *ColumnReference) GetName() string

type ComparisonOperatorParse

type ComparisonOperatorParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewComparisonOperatorParse

func NewComparisonOperatorParse(node antlr.Tree) (term *ComparisonOperatorParse)

func (*ComparisonOperatorParse) Accept

func (this *ComparisonOperatorParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ComparisonOperatorParse) String

func (sp *ComparisonOperatorParse) String(level int) (out []string)

type ComparisonParse

type ComparisonParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewComparisonParse

func NewComparisonParse(node antlr.Tree) (term *ComparisonParse)

func (*ComparisonParse) Accept

func (this *ComparisonParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ComparisonParse) String

func (sp *ComparisonParse) String(level int) (out []string)

type ComparisonQuantifierEnum

type ComparisonQuantifierEnum uint8
const (
	ALL ComparisonQuantifierEnum
	SOME
	ANY
)

func StringToComparisonQuantifierEnum

func StringToComparisonQuantifierEnum(opstr string) ComparisonQuantifierEnum

func (ComparisonQuantifierEnum) String

func (cq ComparisonQuantifierEnum) String() string

type ComparisonQuantifierParse

type ComparisonQuantifierParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewComparisonQuantifierParse

func NewComparisonQuantifierParse(node antlr.Tree) (term *ComparisonQuantifierParse)

func (*ComparisonQuantifierParse) Accept

func (this *ComparisonQuantifierParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ComparisonQuantifierParse) String

func (sp *ComparisonQuantifierParse) String(level int) (out []string)

type ConcatenationParse

type ConcatenationParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewConcatParse

func NewConcatParse(node antlr.Tree) (term *ConcatenationParse)

func (*ConcatenationParse) Accept

func (this *ConcatenationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ConcatenationParse) String

func (sp *ConcatenationParse) String(level int) (out []string)

type DereferenceParse

type DereferenceParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewDereferenceParse

func NewDereferenceParse(node antlr.Tree) (term *DereferenceParse)

func (*DereferenceParse) Accept

func (this *DereferenceParse) Accept(visitor IMSTreeVisitor) interface{}

func (*DereferenceParse) String

func (sp *DereferenceParse) String(level int) (out []string)

type DescriptiveErrorListener

type DescriptiveErrorListener struct {
	DefaultErrorListener
	// contains filtered or unexported fields
}

Utility Functions

func (*DescriptiveErrorListener) SyntaxError

func (de *DescriptiveErrorListener) SyntaxError(recognizer Recognizer, offendingSymbol interface{},
	line, column int, msg string, e RecognitionException)

type DistinctFromParse

type DistinctFromParse struct {
	MSTree
	IsNot bool
	// contains filtered or unexported fields
}

func NewDistinctFromParse

func NewDistinctFromParse(node antlr.Tree) (term *DistinctFromParse)

func (*DistinctFromParse) Accept

func (this *DistinctFromParse) Accept(visitor IMSTreeVisitor) interface{}

func (*DistinctFromParse) String

func (sp *DistinctFromParse) String(level int) (out []string)

type ExecutableStatement

type ExecutableStatement struct {
	QueryTree
	BaseSQLQueryTreeVisitor

	IsExplain bool
	// contains filtered or unexported fields
}

func NewExecutableStatement

func NewExecutableStatement(qtree ...IMSTree) (es *ExecutableStatement, err error)

func (*ExecutableStatement) GetPendingStaticPredicateGroup

func (es *ExecutableStatement) GetPendingStaticPredicateGroup() (spg StaticPredicateGroup, err error)

func (*ExecutableStatement) Materialize

func (es *ExecutableStatement) Materialize() (cs *io.ColumnSeries, err error)

func (*ExecutableStatement) Visit

func (es *ExecutableStatement) Visit(tree IMSTree) interface{}

func (*ExecutableStatement) VisitAliasedRelationParse

func (es *ExecutableStatement) VisitAliasedRelationParse(ctx *AliasedRelationParse) interface{}

func (*ExecutableStatement) VisitBetweenParse

func (es *ExecutableStatement) VisitBetweenParse(ctx *BetweenParse) interface{}

func (*ExecutableStatement) VisitBooleanExpressionParse

func (es *ExecutableStatement) VisitBooleanExpressionParse(ctx *BooleanExpressionParse) interface{}

func (*ExecutableStatement) VisitChildren

func (es *ExecutableStatement) VisitChildren(tree IMSTree) interface{}

func (*ExecutableStatement) VisitComparisonParse

func (es *ExecutableStatement) VisitComparisonParse(ctx *ComparisonParse) interface{}

func (*ExecutableStatement) VisitExpressionParse

func (es *ExecutableStatement) VisitExpressionParse(ctx *ExpressionParse) interface{}

func (*ExecutableStatement) VisitFunctionCallParse

func (es *ExecutableStatement) VisitFunctionCallParse(ctx *FunctionCallParse) interface{}

func (*ExecutableStatement) VisitIDParse

func (es *ExecutableStatement) VisitIDParse(ctx *IDParse) interface{}

func (*ExecutableStatement) VisitPredicateParse

func (es *ExecutableStatement) VisitPredicateParse(ctx *PredicateParse) interface{}

func (*ExecutableStatement) VisitPrimaryExpressionParse

func (es *ExecutableStatement) VisitPrimaryExpressionParse(ctx *PrimaryExpressionParse) interface{}

func (*ExecutableStatement) VisitQualifiedNameParse

func (es *ExecutableStatement) VisitQualifiedNameParse(ctx *QualifiedNameParse) interface{}

func (*ExecutableStatement) VisitQueryNoWithParse

func (es *ExecutableStatement) VisitQueryNoWithParse(ctx *QueryNoWithParse) interface{}

func (*ExecutableStatement) VisitQueryParse

func (es *ExecutableStatement) VisitQueryParse(ctx *QueryParse) interface{}

func (*ExecutableStatement) VisitQueryPrimaryParse

func (es *ExecutableStatement) VisitQueryPrimaryParse(ctx *QueryPrimaryParse) interface{}

func (*ExecutableStatement) VisitQuerySpecificationParse

func (es *ExecutableStatement) VisitQuerySpecificationParse(ctx *QuerySpecificationParse) interface{}

func (*ExecutableStatement) VisitQueryTermParse

func (es *ExecutableStatement) VisitQueryTermParse(ctx *QueryTermParse) interface{}

func (*ExecutableStatement) VisitRelationParse

func (es *ExecutableStatement) VisitRelationParse(ctx *RelationParse) interface{}

func (*ExecutableStatement) VisitRelationPrimaryParse

func (es *ExecutableStatement) VisitRelationPrimaryParse(ctx *RelationPrimaryParse) interface{}

func (*ExecutableStatement) VisitSampledRelationParse

func (es *ExecutableStatement) VisitSampledRelationParse(ctx *SampledRelationParse) interface{}

func (*ExecutableStatement) VisitStatementParse

func (es *ExecutableStatement) VisitStatementParse(ctx *StatementParse) interface{}

func (*ExecutableStatement) VisitStatementsParse

func (es *ExecutableStatement) VisitStatementsParse(ctx *StatementsParse) interface{}

func (*ExecutableStatement) VisitValueExpressionParse

func (es *ExecutableStatement) VisitValueExpressionParse(ctx *ValueExpressionParse) interface{}

type ExplainOptionParse

type ExplainOptionParse struct {
	MSTree
	IsFormat bool
}

func NewExplainOptionParse

func NewExplainOptionParse(node antlr.Tree) (term *ExplainOptionParse)

func (*ExplainOptionParse) Accept

func (this *ExplainOptionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ExplainOptionParse) String

func (sp *ExplainOptionParse) String(level int) (out []string)

type ExplainStatement

type ExplainStatement struct {
	ExecutableStatement
	QueryText string
}

func NewExplainStatement

func NewExplainStatement(ctx *StatementParse, queryText string) (es *ExplainStatement)

func (*ExplainStatement) Explain

func (es *ExplainStatement) Explain() string

func (*ExplainStatement) GetLeft

func (es *ExplainStatement) GetLeft() IMSTree

func (*ExplainStatement) GetRight

func (es *ExplainStatement) GetRight() IMSTree

func (*ExplainStatement) Materialize

func (es *ExplainStatement) Materialize() (cs *io.ColumnSeries, err error)

type ExpressionParse

type ExpressionParse struct {
	MSTree
	IsBoolean bool
}

================================================ Expression block ================================================

func NewExpressionParse

func NewExpressionParse(node antlr.Tree) (term *ExpressionParse)

func (*ExpressionParse) Accept

func (this *ExpressionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ExpressionParse) String

func (sp *ExpressionParse) String(level int) (out []string)

type ExtractParse

type ExtractParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewExtractParse

func NewExtractParse(node antlr.Tree) (term *ExtractParse)

func (*ExtractParse) Accept

func (this *ExtractParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ExtractParse) String

func (sp *ExtractParse) String(level int) (out []string)

type FilterParse

type FilterParse struct {
	MSTree
}

func NewFilterParse

func NewFilterParse(node antlr.Tree) (term *FilterParse)

func (*FilterParse) Accept

func (this *FilterParse) Accept(visitor IMSTreeVisitor) interface{}

func (*FilterParse) String

func (sp *FilterParse) String(level int) (out []string)

type FrameBoundParse

type FrameBoundParse struct {
	MSTree
	IsCurrentRow, IsUnbounded, IsPreceding, IsFollowing bool
}

func NewFrameBoundParse

func NewFrameBoundParse(node antlr.Tree) (term *FrameBoundParse)

func (*FrameBoundParse) Accept

func (this *FrameBoundParse) Accept(visitor IMSTreeVisitor) interface{}

func (*FrameBoundParse) String

func (sp *FrameBoundParse) String(level int) (out []string)

type FunctionCallParse

type FunctionCallParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewFunctionCallParse

func NewFunctionCallParse(node antlr.Tree) (term *FunctionCallParse)

func (*FunctionCallParse) Accept

func (this *FunctionCallParse) Accept(visitor IMSTreeVisitor) interface{}

func (*FunctionCallParse) String

func (sp *FunctionCallParse) String(level int) (out []string)

type FunctionCallReference

type FunctionCallReference struct {
	Name       string
	IsAsterisk bool
	Args       []interface{}
}

Primary Expression Datatypes

func NewFunctionCallReference

func NewFunctionCallReference(name string, args []interface{}) *FunctionCallReference

func (*FunctionCallReference) GetIDs

func (fc *FunctionCallReference) GetIDs() (idList []string)

func (*FunctionCallReference) GetLiterals

func (fc *FunctionCallReference) GetLiterals() (literals []*Literal)

type FunctionNameEnum

type FunctionNameEnum uint8
const (
	CURRENT_DATE FunctionNameEnum
	CURRENT_TIME
	CURRENT_TIMESTAMP
	LOCALTIME
	LOCALTIMESTAMP
)

type GroupByParse

type GroupByParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewGroupByParse

func NewGroupByParse(node antlr.Tree) (term *GroupByParse)

func (*GroupByParse) Accept

func (this *GroupByParse) Accept(visitor IMSTreeVisitor) interface{}

func (*GroupByParse) String

func (sp *GroupByParse) String(level int) (out []string)

type GroupingElementParse

type GroupingElementParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewGroupingElementParse

func NewGroupingElementParse(node antlr.Tree) (term *GroupingElementParse)

func (*GroupingElementParse) Accept

func (this *GroupingElementParse) Accept(visitor IMSTreeVisitor) interface{}

func (*GroupingElementParse) String

func (sp *GroupingElementParse) String(level int) (out []string)

type GroupingExpressionsParse

type GroupingExpressionsParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewGroupingExpressionsParse

func NewGroupingExpressionsParse(node antlr.Tree) (term *GroupingExpressionsParse)

func (*GroupingExpressionsParse) Accept

func (this *GroupingExpressionsParse) Accept(visitor IMSTreeVisitor) interface{}

func (*GroupingExpressionsParse) String

func (sp *GroupingExpressionsParse) String(level int) (out []string)

type GroupingSetParse

type GroupingSetParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewGroupingSetParse

func NewGroupingSetParse(node antlr.Tree) (term *GroupingSetParse)

func (*GroupingSetParse) Accept

func (this *GroupingSetParse) Accept(visitor IMSTreeVisitor) interface{}

func (*GroupingSetParse) String

func (sp *GroupingSetParse) String(level int) (out []string)

type IDParse

type IDParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewIDParse

func NewIDParse(node antlr.Tree) (term *IDParse)

func (*IDParse) Accept

func (this *IDParse) Accept(visitor IMSTreeVisitor) interface{}

func (*IDParse) String

func (sp *IDParse) String(level int) (out []string)

type IMSTree

type IMSTree interface {
	GetParent() IMSTree
	SetParent(IMSTree)
	GetPayload() interface{}
	GetChild(i int) IMSTree
	GetChildCount() int
	GetChildren() []IMSTree
	AddChild(IMSTree)
	String(int) []string
	Accept(IMSTreeVisitor) interface{}
}

Utility Functions

type IMSTreeVisitor

type IMSTreeVisitor interface {
	Visit(IMSTree) interface{}
	VisitChildren(IMSTree) interface{}
}

type ISQLQueryTreeVisitor

type ISQLQueryTreeVisitor interface {
	IMSTreeVisitor
	VisitStatementsParse(ctx *StatementsParse) interface{}
	VisitStatementParse(ctx *StatementParse) interface{}
	VisitQueryParse(ctx *QueryParse) interface{}
	VisitWithParse(ctx *WithParse) interface{}
	VisitTableElementParse(ctx *TableElementParse) interface{}
	VisitColumnDefinitionParse(ctx *ColumnDefinitionParse) interface{}
	VisitLikeClauseParse(ctx *LikeClauseParse) interface{}
	VisitTablePropertiesParse(ctx *TablePropertiesParse) interface{}
	VisitTablePropertyParse(ctx *TablePropertyParse) interface{}
	VisitQueryNoWithParse(ctx *QueryNoWithParse) interface{}
	VisitQueryTermParse(ctx *QueryTermParse) interface{}
	VisitQueryPrimaryParse(ctx *QueryPrimaryParse) interface{}
	VisitSortItemParse(ctx *SortItemParse) interface{}
	VisitQuerySpecificationParse(ctx *QuerySpecificationParse) interface{}
	VisitGroupByParse(ctx *GroupByParse) interface{}
	VisitGroupingElementParse(ctx *GroupingElementParse) interface{}
	VisitGroupingExpressionsParse(ctx *GroupingExpressionsParse) interface{}
	VisitGroupingSetParse(ctx *GroupingSetParse) interface{}
	VisitNamedQueryParse(ctx *NamedQueryParse) interface{}
	VisitSelectItemParse(ctx *SelectItemParse) interface{}
	VisitRelationParse(ctx *RelationParse) interface{}
	VisitJoinCriteriaParse(ctx *JoinCriteriaParse) interface{}
	VisitSampledRelationParse(ctx *SampledRelationParse) interface{}
	VisitAliasedRelationParse(ctx *AliasedRelationParse) interface{}
	VisitColumnAliasesParse(ctx *ColumnAliasesParse) interface{}
	VisitRelationPrimaryParse(ctx *RelationPrimaryParse) interface{}
	VisitExpressionParse(ctx *ExpressionParse) interface{}
	VisitBooleanExpressionParse(ctx *BooleanExpressionParse) interface{}
	VisitPredicateParse(ctx *PredicateParse) interface{}
	VisitComparisonParse(ctx *ComparisonParse) interface{}
	VisitQuantifiedComparisonParse(ctx *QuantifiedComparisonParse) interface{}
	VisitBetweenParse(ctx *BetweenParse) interface{}
	VisitInListParse(ctx *InListParse) interface{}
	VisitInSubqueryParse(ctx *InSubqueryParse) interface{}
	VisitLikeParse(ctx *LikeParse) interface{}
	VisitNullPredicateParse(ctx *NullPredicateParse) interface{}
	VisitDistinctFromParse(ctx *DistinctFromParse) interface{}
	VisitValueExpressionParse(ctx *ValueExpressionParse) interface{}
	VisitAtTimeZoneParse(ctx *AtTimeZoneParse) interface{}
	VisitArithmeticUnaryParse(ctx *ArithmeticUnaryParse) interface{}
	VisitArithmeticBinaryParse(ctx *ArithmeticBinaryParse) interface{}
	VisitConcatenationParse(ctx *ConcatenationParse) interface{}
	VisitPrimaryExpressionParse(ctx *PrimaryExpressionParse) interface{}
	VisitFunctionCallParse(ctx *FunctionCallParse) interface{}
	VisitLambdaParse(ctx *LambdaParse) interface{}
	VisitSimpleCaseParse(ctx *SimpleCaseParse) interface{}
	VisitSearchedCaseParse(ctx *SearchedCaseParse) interface{}
	VisitCastParse(ctx *CastParse) interface{}
	VisitSubscriptParse(ctx *SubscriptParse) interface{}
	VisitDereferenceParse(ctx *DereferenceParse) interface{}
	VisitSpecialDateTimeFunctionParse(ctx *SpecialDateTimeFunctionParse) interface{}
	VisitSubstringParse(ctx *SubstringParse) interface{}
	VisitNormalizeParse(ctx *NormalizeParse) interface{}
	VisitExtractParse(ctx *ExtractParse) interface{}
	VisitTimeZoneSpecifierParse(ctx *TimeZoneSpecifierParse) interface{}
	VisitComparisonOperatorParse(ctx *ComparisonOperatorParse) interface{}
	VisitComparisonQuantifierParse(ctx *ComparisonQuantifierParse) interface{}
	VisitIntervalParse(ctx *IntervalParse) interface{}
	VisitIntervalFieldParse(ctx *IntervalFieldParse) interface{}
	VisitTypeTParse(ctx *TypeTParse) interface{}
	VisitTypeParameterParse(ctx *TypeParameterParse) interface{}
	VisitBaseTypeParse(ctx *BaseTypeParse) interface{}
	VisitWhenParse(ctx *WhenParse) interface{}
	VisitFilterParse(ctx *FilterParse) interface{}
	VisitOverParse(ctx *OverParse) interface{}
	VisitWindowFrameParse(ctx *WindowFrameParse) interface{}
	VisitFrameBoundParse(ctx *FrameBoundParse) interface{}
	VisitExplainOptionParse(ctx *ExplainOptionParse) interface{}
	VisitTransactionModeParse(ctx *TransactionModeParse) interface{}
	VisitLevelOfIsolationParse(ctx *LevelOfIsolationParse) interface{}
	VisitCallArgParse(ctx *CallArgParse) interface{}
	VisitPrivilegeParse(ctx *PrivilegeParse) interface{}
	VisitQualifiedNameParse(ctx *QualifiedNameParse) interface{}
	VisitIDParse(ctx *IDParse) interface{}
	VisitNonReservedParse(ctx *NonReservedParse) interface{}
}

type InListParse

type InListParse struct {
	MSTree
	IsNot bool
	// contains filtered or unexported fields
}

func NewInListParse

func NewInListParse(node antlr.Tree) (term *InListParse)

func (*InListParse) Accept

func (this *InListParse) Accept(visitor IMSTreeVisitor) interface{}

func (*InListParse) String

func (sp *InListParse) String(level int) (out []string)

type InSubqueryParse

type InSubqueryParse struct {
	MSTree
	IsNot bool
	// contains filtered or unexported fields
}

func NewInSubqueryParse

func NewInSubqueryParse(node antlr.Tree) (term *InSubqueryParse)

func (*InSubqueryParse) Accept

func (this *InSubqueryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*InSubqueryParse) String

func (sp *InSubqueryParse) String(level int) (out []string)

type InsertIntoStatement

type InsertIntoStatement struct {
	ExecutableStatement
	SelectRelation *SelectRelation
	QueryText      string
	TableName      string
	ColumnAliases  []string
}

func NewInsertIntoStatement

func NewInsertIntoStatement(tableName, queryText string, selectRelation *SelectRelation) (is *InsertIntoStatement)

func (*InsertIntoStatement) Explain

func (is *InsertIntoStatement) Explain() string

func (*InsertIntoStatement) GetLeft

func (is *InsertIntoStatement) GetLeft() IMSTree

func (*InsertIntoStatement) GetRight

func (is *InsertIntoStatement) GetRight() IMSTree

func (*InsertIntoStatement) Materialize

func (is *InsertIntoStatement) Materialize() (outputColumnSeries *io.ColumnSeries, err error)

type IntervalEnum

type IntervalEnum uint8
const (
	YEAR IntervalEnum
	MONTH
	DAY
	HOUR
	MINUTE
	SECOND
)

type IntervalFieldParse

type IntervalFieldParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewIntervalFieldParse

func NewIntervalFieldParse(node antlr.Tree) (term *IntervalFieldParse)

func (*IntervalFieldParse) Accept

func (this *IntervalFieldParse) Accept(visitor IMSTreeVisitor) interface{}

func (*IntervalFieldParse) String

func (sp *IntervalFieldParse) String(level int) (out []string)

type IntervalParse

type IntervalParse struct {
	MSTree
	IsPlus, IsMinus bool
	// contains filtered or unexported fields
}

func NewIntervalParse

func NewIntervalParse(node antlr.Tree) (term *IntervalParse)

func (*IntervalParse) Accept

func (this *IntervalParse) Accept(visitor IMSTreeVisitor) interface{}

func (*IntervalParse) String

func (sp *IntervalParse) String(level int) (out []string)

type JoinCriteriaParse

type JoinCriteriaParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewJoinCriteriaParse

func NewJoinCriteriaParse(node antlr.Tree) (term *JoinCriteriaParse)

func (*JoinCriteriaParse) Accept

func (this *JoinCriteriaParse) Accept(visitor IMSTreeVisitor) interface{}

func (*JoinCriteriaParse) String

func (sp *JoinCriteriaParse) String(level int) (out []string)

type JoinTypeEnum

type JoinTypeEnum uint8
const (
	INNER JoinTypeEnum
	LEFT_OUTER
	RIGHT_OUTER
	FULL_OUTER
)

type LambdaParse

type LambdaParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewLambdaParse

func NewLambdaParse(node antlr.Tree) (term *LambdaParse)

func (*LambdaParse) Accept

func (this *LambdaParse) Accept(visitor IMSTreeVisitor) interface{}

func (*LambdaParse) String

func (sp *LambdaParse) String(level int) (out []string)

type LevelOfIsolationParse

type LevelOfIsolationParse struct{ MSTree }

func NewLevelOfIsolationParse

func NewLevelOfIsolationParse(node antlr.Tree) (term *LevelOfIsolationParse)

func (*LevelOfIsolationParse) Accept

func (this *LevelOfIsolationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*LevelOfIsolationParse) String

func (sp *LevelOfIsolationParse) String(level int) (out []string)

type LikeClauseParse

type LikeClauseParse struct {
	MSTree

	IsIncluding bool
	// contains filtered or unexported fields
}

func NewLikeClauseParse

func NewLikeClauseParse(node antlr.Tree) (term *LikeClauseParse)

func (*LikeClauseParse) Accept

func (this *LikeClauseParse) Accept(visitor IMSTreeVisitor) interface{}

func (*LikeClauseParse) String

func (sp *LikeClauseParse) String(level int) (out []string)

type LikeParse

type LikeParse struct {
	MSTree
	IsNot bool
	// contains filtered or unexported fields
}

func NewLikeParse

func NewLikeParse(node antlr.Tree) (term *LikeParse)

func (*LikeParse) Accept

func (this *LikeParse) Accept(visitor IMSTreeVisitor) interface{}

func (*LikeParse) String

func (sp *LikeParse) String(level int) (out []string)

type Literal

type Literal struct {
	Value interface{}
	Type  PrimaryExpressionEnum
}

func NewLiteral

func NewLiteral(value interface{}, pType PrimaryExpressionEnum) (li *Literal)

type MSTree

type MSTree struct {
	IMSTree
	BaseMSTreeVisitor
	// contains filtered or unexported fields
}

func (*MSTree) AddChild

func (pt *MSTree) AddChild(arg IMSTree)

func (*MSTree) GetChild

func (pt *MSTree) GetChild(i int) IMSTree

func (*MSTree) GetChildCount

func (pt *MSTree) GetChildCount() int

func (*MSTree) GetChildren

func (pt *MSTree) GetChildren() []IMSTree

func (*MSTree) GetParent

func (pt *MSTree) GetParent() IMSTree

func (*MSTree) GetPayload

func (pt *MSTree) GetPayload() interface{}

func (*MSTree) SetParent

func (pt *MSTree) SetParent(arg IMSTree)

func (*MSTree) String

func (pt *MSTree) String(level int) (out []string)

type NamedQueryParse

type NamedQueryParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewNamedQueryParse

func NewNamedQueryParse(node antlr.Tree) (term *NamedQueryParse)

func (*NamedQueryParse) Accept

func (this *NamedQueryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*NamedQueryParse) String

func (sp *NamedQueryParse) String(level int) (out []string)

type NonReservedParse

type NonReservedParse struct{ MSTree }

func NewNonReservedParse

func NewNonReservedParse(node antlr.Tree) (term *NonReservedParse)

func (*NonReservedParse) Accept

func (this *NonReservedParse) Accept(visitor IMSTreeVisitor) interface{}

func (*NonReservedParse) String

func (sp *NonReservedParse) String(level int) (out []string)

type NormalFormEnum

type NormalFormEnum uint8
const (
	NFD NormalFormEnum
	NFC
	NFKD
	NFKC
)

type NormalizeParse

type NormalizeParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewNormalizeParse

func NewNormalizeParse(node antlr.Tree) (term *NormalizeParse)

func (*NormalizeParse) Accept

func (this *NormalizeParse) Accept(visitor IMSTreeVisitor) interface{}

func (*NormalizeParse) String

func (sp *NormalizeParse) String(level int) (out []string)

type NullOrderEnum

type NullOrderEnum uint8
const (
	FIRST NullOrderEnum
	LAST
)

type NullPredicateParse

type NullPredicateParse struct {
	MSTree
	IsNot bool
}

func NewNullPredicateParse

func NewNullPredicateParse(node antlr.Tree) (term *NullPredicateParse)

func (*NullPredicateParse) Accept

func (this *NullPredicateParse) Accept(visitor IMSTreeVisitor) interface{}

func (*NullPredicateParse) String

func (sp *NullPredicateParse) String(level int) (out []string)

type OverParse

type OverParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewOverParse

func NewOverParse(node antlr.Tree) (term *OverParse)

func (*OverParse) Accept

func (this *OverParse) Accept(visitor IMSTreeVisitor) interface{}

func (*OverParse) String

func (sp *OverParse) String(level int) (out []string)

type PredicateParse

type PredicateParse struct{ MSTree }

================================================ Predicate block ================================================

func NewPredicateParse

func NewPredicateParse(node antlr.Tree) (term *PredicateParse)

func (*PredicateParse) Accept

func (this *PredicateParse) Accept(visitor IMSTreeVisitor) interface{}

func (*PredicateParse) String

func (sp *PredicateParse) String(level int) (out []string)

type PrimaryExpressionEnum

type PrimaryExpressionEnum uint8
const (
	NULL_LITERAL PrimaryExpressionEnum
	PARAMETER
	STRING_LITERAL
	BINARY_LITERAL
	DECIMAL_LITERAL
	INTEGER_LITERAL
	BOOLEAN_LITERAL
	TYPE_CONSTRUCTOR
	INTERVAL_LITERAL
	POSITION
	ROW_CONSTRUCTOR
	FUNCTION_CALL
	LAMBDA
	SUBQUERY_EXPRESSION
	EXISTS
	SIMPLE_CASE
	SEARCHED_CASE
	CAST
	ARRAY_CONSTRUCTOR
	SUBSCRIPT
	COLUMN_REFERENCE
	DEREFERENCE
	SPECIAL_DATE_TIME_FUNCTION
	SUBSTRING
	NORMALIZE
	EXTRACT
	PARENTHESIZED_EXPRESSION
)

func (PrimaryExpressionEnum) String

func (i PrimaryExpressionEnum) String() string

type PrimaryExpressionParse

type PrimaryExpressionParse struct {
	MSTree
	// contains filtered or unexported fields
}

================================================

================================================ PrimaryExpression block ================================================

func NewPrimaryExpressionParse

func NewPrimaryExpressionParse(node antlr.Tree) (term *PrimaryExpressionParse)

func (*PrimaryExpressionParse) Accept

func (this *PrimaryExpressionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*PrimaryExpressionParse) String

func (sp *PrimaryExpressionParse) String(level int) (out []string)

type PrivilegeParse

type PrivilegeParse struct{ MSTree }

func NewPrivilegeParse

func NewPrivilegeParse(node antlr.Tree) (term *PrivilegeParse)

func (*PrivilegeParse) Accept

func (this *PrivilegeParse) Accept(visitor IMSTreeVisitor) interface{}

func (*PrivilegeParse) String

func (sp *PrivilegeParse) String(level int) (out []string)

type QualifiedNameParse

type QualifiedNameParse struct{ MSTree }

func NewQualifiedNameParse

func NewQualifiedNameParse(node antlr.Tree) (term *QualifiedNameParse)

func (*QualifiedNameParse) Accept

func (this *QualifiedNameParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QualifiedNameParse) String

func (sp *QualifiedNameParse) String(level int) (out []string)

type QuantifiedComparisonParse

type QuantifiedComparisonParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQuantifiedComparisonParse

func NewQuantifiedComparisonParse(node antlr.Tree) (term *QuantifiedComparisonParse)

func (*QuantifiedComparisonParse) Accept

func (this *QuantifiedComparisonParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QuantifiedComparisonParse) String

func (sp *QuantifiedComparisonParse) String(level int) (out []string)

type QueryNoWithParse

type QueryNoWithParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQueryNoWithParse

func NewQueryNoWithParse(node antlr.Tree) (term *QueryNoWithParse)

func (*QueryNoWithParse) Accept

func (this *QueryNoWithParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QueryNoWithParse) String

func (sp *QueryNoWithParse) String(level int) (out []string)

type QueryParse

type QueryParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQueryParse

func NewQueryParse(node antlr.Tree) (term *QueryParse)

func (*QueryParse) Accept

func (this *QueryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QueryParse) String

func (sp *QueryParse) String(level int) (out []string)

type QueryPrimaryParse

type QueryPrimaryParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQueryPrimaryParse

func NewQueryPrimaryParse(node antlr.Tree) (term *QueryPrimaryParse)

func (*QueryPrimaryParse) Accept

func (this *QueryPrimaryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QueryPrimaryParse) String

func (sp *QueryPrimaryParse) String(level int) (out []string)

type QuerySpecificationParse

type QuerySpecificationParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQuerySpecificationParse

func NewQuerySpecificationParse(node antlr.Tree) (term *QuerySpecificationParse)

func (*QuerySpecificationParse) Accept

func (this *QuerySpecificationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QuerySpecificationParse) String

func (sp *QuerySpecificationParse) String(level int) (out []string)

type QueryTermParse

type QueryTermParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewQueryTermParse

func NewQueryTermParse(node antlr.Tree) (term *QueryTermParse)

func (*QueryTermParse) Accept

func (this *QueryTermParse) Accept(visitor IMSTreeVisitor) interface{}

func (*QueryTermParse) String

func (sp *QueryTermParse) String(level int) (out []string)

type QueryTree

type QueryTree struct {
	Relation
	MSTree
}

type Relation

type Relation interface {
	Materialize() (cs *io.ColumnSeries, err error)
}

type RelationParse

type RelationParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewRelationParse

func NewRelationParse(node antlr.Tree) (term *RelationParse)

func (*RelationParse) Accept

func (this *RelationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*RelationParse) String

func (sp *RelationParse) String(level int) (out []string)

type RelationPrimaryParse

type RelationPrimaryParse struct {
	MSTree
	IsTableName, IsSubquery, IsUnnest, IsRelation, WithOrdinality bool
}

================================================ RelationPrimary block ================================================

func NewRelationPrimaryParse

func NewRelationPrimaryParse(node antlr.Tree) (term *RelationPrimaryParse)

func (*RelationPrimaryParse) Accept

func (this *RelationPrimaryParse) Accept(visitor IMSTreeVisitor) interface{}

func (*RelationPrimaryParse) String

func (sp *RelationPrimaryParse) String(level int) (out []string)

type SampleTypeEnum

type SampleTypeEnum uint8
const (
	BERNOULLI SampleTypeEnum
	SYSTEM
	POISSONIZED
)

type SampledRelationParse

type SampledRelationParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSampledRelationParse

func NewSampledRelationParse(node antlr.Tree) (term *SampledRelationParse)

func (*SampledRelationParse) Accept

func (this *SampledRelationParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SampledRelationParse) String

func (sp *SampledRelationParse) String(level int) (out []string)

type SearchedCaseParse

type SearchedCaseParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSearchedCaseParse

func NewSearchedCaseParse(node antlr.Tree) (term *SearchedCaseParse)

func (*SearchedCaseParse) Accept

func (this *SearchedCaseParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SearchedCaseParse) String

func (sp *SearchedCaseParse) String(level int) (out []string)

type SelectItemParse

type SelectItemParse struct {
	MSTree

	IsSelectAll bool
	// contains filtered or unexported fields
}

func NewSelectItemParse

func NewSelectItemParse(node antlr.Tree) (term *SelectItemParse)

func (*SelectItemParse) Accept

func (this *SelectItemParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SelectItemParse) String

func (sp *SelectItemParse) String(level int) (out []string)

type SelectRelation

type SelectRelation struct {
	ExecutableStatement
	Limit                  int
	OrderBy                []SortItem
	SelectList             []*AliasedIdentifier
	IsPrimary, IsSelectAll bool
	PrimaryTargetName      []string
	Subquery               *SelectRelation
	WherePredicate         IMSTree // Runtime predicates
	SetQuantifier          SetQuantifierEnum
	StaticPredicates       StaticPredicateGroup
}

func NewSelectRelation

func NewSelectRelation() (sr *SelectRelation)

func (*SelectRelation) Explain

func (sr *SelectRelation) Explain() string

func (*SelectRelation) GetLeft

func (sr *SelectRelation) GetLeft() IMSTree

func (*SelectRelation) GetRight

func (sr *SelectRelation) GetRight() IMSTree

func (*SelectRelation) Materialize

func (sr *SelectRelation) Materialize() (outputColumnSeries *io.ColumnSeries, err error)

type SetOperatorEnum

type SetOperatorEnum uint8
const (
	INTERSECT SetOperatorEnum
	UNION
	EXCEPT
)

type SetQuantifierEnum

type SetQuantifierEnum uint8
const (
	DISTINCT_SET SetQuantifierEnum
	ALL_SET
)

type SimpleCaseParse

type SimpleCaseParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSimpleCaseParse

func NewSimpleCaseParse(node antlr.Tree) (term *SimpleCaseParse)

func (*SimpleCaseParse) Accept

func (this *SimpleCaseParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SimpleCaseParse) String

func (sp *SimpleCaseParse) String(level int) (out []string)

type SortItem

type SortItem struct {
	Order     SortOrderEnum
	NullOrder NullOrderEnum
}

type SortItemParse

type SortItemParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSortItemParse

func NewSortItemParse(node antlr.Tree) (term *SortItemParse)

func (*SortItemParse) Accept

func (this *SortItemParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SortItemParse) String

func (sp *SortItemParse) String(level int) (out []string)

type SortOrderEnum

type SortOrderEnum uint8

Utility Functions

const (
	ASCENDING SortOrderEnum
	DESCENDING
)

type SpecialDateTimeFunctionParse

type SpecialDateTimeFunctionParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSpecialDateTimeFunctionParse

func NewSpecialDateTimeFunctionParse(node antlr.Tree) (term *SpecialDateTimeFunctionParse)

func (*SpecialDateTimeFunctionParse) Accept

func (this *SpecialDateTimeFunctionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SpecialDateTimeFunctionParse) String

func (sp *SpecialDateTimeFunctionParse) String(level int) (out []string)

type StatementParse

type StatementParse struct {
	/*
		This one is long because it is a catch all for DDL type
		statements

		Many of these fields are unused depending on the value
		of statementType
	*/
	MSTree

	IsFrom, IsGrantOption, IsAll, IsExists bool

	QueryText string
	// contains filtered or unexported fields
}

func NewStatementParse

func NewStatementParse(node antlr.Tree, queryText string) (term *StatementParse)

func (*StatementParse) Accept

func (this *StatementParse) Accept(visitor IMSTreeVisitor) interface{}

func (*StatementParse) String

func (sp *StatementParse) String(level int) (out []string)

type StatementTypeEnum

type StatementTypeEnum uint8
const (
	QUERY_STMT StatementTypeEnum
	CREATE_TABLE_STMT
	CREATE_TABLE_AS_SELECT_STMT
	DROP_TABLE_STMT
	INSERT_INTO_STMT
	DELETE_STMT
	RENAME_TABLE_STMT
	RENAME_COLUMN_STMT
	ADD_COLUMN_STMT
	CREATE_VIEW_STMT
	DROP_VIEW_STMT
	CALL_STMT
	GRANT_STMT
	REVOKE_STMT
	EXPLAIN_STMT
	SHOW_CREATE_TABLE_STMT
	SHOW_CREATE_VIEW_STMT
	SHOW_TABLES_STMT
	SHOW_SCHEMAS_STMT
	SHOW_CATALOGS_STMT
	SHOW_COLUMNS_STMT
	SHOW_FUNCTIONS_STMT
	SHOW_SESSION_STMT
	SET_SESSION_STMT
	RESET_SESSION_STMT
	START_TRANSACTION_STMT
	COMMIT_STMT
	ROLLBACK_STMT
	SHOW_PARTITIONS_STMT
	PREPARE_STMT
	DEALLOCATE_STMT
	EXECUTE_STMT
	DESCRIBE_INPUT_STMT
	DESCRIBE_OUTPUT_STMT
)

func (StatementTypeEnum) String

func (i StatementTypeEnum) String() string

type StatementsParse

type StatementsParse struct {
	MSTree
	QueryText string
}

func NewStatementsParse

func NewStatementsParse(node antlr.Tree, queryText string) (term *StatementsParse)

func (*StatementsParse) Accept

func (this *StatementsParse) Accept(visitor IMSTreeVisitor) interface{}

func (*StatementsParse) String

func (sp *StatementsParse) String(level int) (out []string)

type StaticPredicate

type StaticPredicate struct {
	/*
		This stores the right hand side of an evaluation such as:

	*/
	Column *ColumnReference

	ContentsEnum StaticPredicateContentsEnum
	// contains filtered or unexported fields
}

func NewStaticPredicate

func NewStaticPredicate(column *ColumnReference) (sp *StaticPredicate)

func (*StaticPredicate) AddComparison

func (sp *StaticPredicate) AddComparison(op io.ComparisonOperatorEnum,
	value interface{}) error

func (*StaticPredicate) IsFalse

func (sp *StaticPredicate) IsFalse() bool

func (*StaticPredicate) SetEqual

func (sp *StaticPredicate) SetEqual(newEQ interface{})

func (*StaticPredicate) SetInlist

func (sp *StaticPredicate) SetInlist(inlist []interface{})

func (*StaticPredicate) SetLike

func (sp *StaticPredicate) SetLike(pattern, esc string)

func (*StaticPredicate) SetMax

func (sp *StaticPredicate) SetMax(newMax interface{}, inclusive bool)

func (*StaticPredicate) SetMin

func (sp *StaticPredicate) SetMin(newMin interface{}, inclusive bool)

type StaticPredicateContentsEnum

type StaticPredicateContentsEnum uint16
const (
	INLIST StaticPredicateContentsEnum
	MINBOUND
	INCLUSIVEMIN // Boundary should include the min value
	MAXBOUND
	INCLUSIVEMAX // Boundary should include the max value
	EQUALITY
	LIKEPATTERN
)

func (*StaticPredicateContentsEnum) AddOption

func (*StaticPredicateContentsEnum) AnySet

func (cat *StaticPredicateContentsEnum) AnySet(checkOption ...StaticPredicateContentsEnum) bool

func (*StaticPredicateContentsEnum) DelOption

func (*StaticPredicateContentsEnum) IsSet

type StaticPredicateGroup

type StaticPredicateGroup map[string]*StaticPredicate

func NewStaticPredicateGroup

func NewStaticPredicateGroup() (spg StaticPredicateGroup)

func (StaticPredicateGroup) Add

func (StaticPredicateGroup) AddComparison

func (spg StaticPredicateGroup) AddComparison(column *ColumnReference,
	op io.ComparisonOperatorEnum, value interface{})

func (StaticPredicateGroup) Merge

func (spg StaticPredicateGroup) Merge(sp *StaticPredicate, IsOr bool) error

type SubscriptParse

type SubscriptParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSubscriptParse

func NewSubscriptParse(node antlr.Tree) (term *SubscriptParse)

func (*SubscriptParse) Accept

func (this *SubscriptParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SubscriptParse) String

func (sp *SubscriptParse) String(level int) (out []string)

type SubstringParse

type SubstringParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewSubstringParse

func NewSubstringParse(node antlr.Tree) (term *SubstringParse)

func (*SubstringParse) Accept

func (this *SubstringParse) Accept(visitor IMSTreeVisitor) interface{}

func (*SubstringParse) String

func (sp *SubstringParse) String(level int) (out []string)

type TableElementParse

type TableElementParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewTableElementParse

func NewTableElementParse(node antlr.Tree) (term *TableElementParse)

func (*TableElementParse) Accept

func (this *TableElementParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TableElementParse) String

func (sp *TableElementParse) String(level int) (out []string)

type TablePropertiesParse

type TablePropertiesParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewTablePropertiesParse

func NewTablePropertiesParse(node antlr.Tree) (term *TablePropertiesParse)

func (*TablePropertiesParse) Accept

func (this *TablePropertiesParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TablePropertiesParse) String

func (sp *TablePropertiesParse) String(level int) (out []string)

type TablePropertyParse

type TablePropertyParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewTablePropertyParse

func NewTablePropertyParse(node antlr.Tree) (term *TablePropertyParse)

func (*TablePropertyParse) Accept

func (this *TablePropertyParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TablePropertyParse) String

func (sp *TablePropertyParse) String(level int) (out []string)

type TimeZoneSpecifierParse

type TimeZoneSpecifierParse struct {
	MSTree
	// contains filtered or unexported fields
}

================================================

func NewTimeZoneSpecifierParse

func NewTimeZoneSpecifierParse(node antlr.Tree) (term *TimeZoneSpecifierParse)

func (*TimeZoneSpecifierParse) Accept

func (this *TimeZoneSpecifierParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TimeZoneSpecifierParse) String

func (sp *TimeZoneSpecifierParse) String(level int) (out []string)

type TransactionModeParse

type TransactionModeParse struct{ MSTree }

func NewTransactionModeParse

func NewTransactionModeParse(node antlr.Tree) (term *TransactionModeParse)

func (*TransactionModeParse) Accept

func (this *TransactionModeParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TransactionModeParse) String

func (sp *TransactionModeParse) String(level int) (out []string)

type TypeParameterParse

type TypeParameterParse struct{ MSTree }

func NewTypeParameterParse

func NewTypeParameterParse(node antlr.Tree) (term *TypeParameterParse)

func (*TypeParameterParse) Accept

func (this *TypeParameterParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TypeParameterParse) String

func (sp *TypeParameterParse) String(level int) (out []string)

type TypeTParse

type TypeTParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewTypeTParse

func NewTypeTParse(node antlr.Tree) (term *TypeTParse)

func (*TypeTParse) Accept

func (this *TypeTParse) Accept(visitor IMSTreeVisitor) interface{}

func (*TypeTParse) String

func (sp *TypeTParse) String(level int) (out []string)

type ValueExpressionParse

type ValueExpressionParse struct {
	MSTree
}

func NewValueExpressionParse

func NewValueExpressionParse(node antlr.Tree) (term *ValueExpressionParse)

func (*ValueExpressionParse) Accept

func (this *ValueExpressionParse) Accept(visitor IMSTreeVisitor) interface{}

func (*ValueExpressionParse) String

func (sp *ValueExpressionParse) String(level int) (out []string)

type WhenParse

type WhenParse struct {
	MSTree
	// contains filtered or unexported fields
}

func NewWhenParse

func NewWhenParse(node antlr.Tree) (term *WhenParse)

func (*WhenParse) Accept

func (this *WhenParse) Accept(visitor IMSTreeVisitor) interface{}

func (*WhenParse) String

func (sp *WhenParse) String(level int) (out []string)

type WindowFrameParse

type WindowFrameParse struct {
	MSTree
	IsRange, IsBetween bool
}

func NewWindowFrameParse

func NewWindowFrameParse(node antlr.Tree) (term *WindowFrameParse)

func (*WindowFrameParse) Accept

func (this *WindowFrameParse) Accept(visitor IMSTreeVisitor) interface{}

func (*WindowFrameParse) String

func (sp *WindowFrameParse) String(level int) (out []string)

type WithParse

type WithParse struct {
	MSTree
	IsRecursive bool
	// contains filtered or unexported fields
}

func NewWithParse

func NewWithParse(node antlr.Tree) (term *WithParse)

func (*WithParse) Accept

func (this *WithParse) Accept(visitor IMSTreeVisitor) interface{}

func (*WithParse) String

func (sp *WithParse) String(level int) (out []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL