Documentation ¶
Index ¶
- type AQLListener
- func (aql *AQLListener) EnterFromClause(ctx *parser.FromClauseContext)
- func (aql *AQLListener) EnterLimitClause(ctx *parser.LimitClauseContext)
- func (aql *AQLListener) EnterOrderByClause(ctx *parser.OrderByClauseContext)
- func (aql *AQLListener) EnterSelectClause(ctx *parser.SelectClauseContext)
- func (aql *AQLListener) EnterWhereClause(ctx *parser.WhereClauseContext)
- func (aql *AQLListener) VisitTerminal(node antlr.TerminalNode)
- type AggregateFunctionCallSelectValue
- type AqlProcessor
- type ArchetypePathPredicate
- type AtCode
- type ClassExpression
- type ComparisionSymbol
- type ContainsExpr
- type CustomErrorListener
- type CustomSyntaxError
- type From
- type FunctionCallSelectValue
- type IDCode
- type IdentifiedExpr
- type IdentifiedPath
- type IdentifiedPathSelectValue
- type Limit
- type NodePredicate
- type NodePredicateAdditionalData
- type ObjectPath
- type Operand
- type OperatorType
- type Order
- type OrderBy
- type OrderingType
- type Parameter
- type PartPath
- type PathPredicate
- type PathPredicateOperand
- type PredicateType
- type Primitive
- type PrimitiveSelectValue
- type Query
- type Select
- type SelectExpr
- type SelectValuer
- type StandartPredicate
- type Terminal
- type VersionClassExpr
- type VersionPredicate
- type Where
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AQLListener ¶
type AQLListener struct { *parser.BaseAqlParserListener // contains filtered or unexported fields }
func NewAQLListener ¶
func NewAQLListener() *AQLListener
func (*AQLListener) EnterFromClause ¶
func (aql *AQLListener) EnterFromClause(ctx *parser.FromClauseContext)
EnterFromClause is called when production fromClause is entered.
func (*AQLListener) EnterLimitClause ¶
func (aql *AQLListener) EnterLimitClause(ctx *parser.LimitClauseContext)
EnterLimitClause is called when production limitClause is entered.
func (*AQLListener) EnterOrderByClause ¶
func (aql *AQLListener) EnterOrderByClause(ctx *parser.OrderByClauseContext)
EnterOrderByClause is called when production orderByClause is entered.
func (*AQLListener) EnterSelectClause ¶
func (aql *AQLListener) EnterSelectClause(ctx *parser.SelectClauseContext)
EnterSelectClause is called when production selectClause is entered.
func (*AQLListener) EnterWhereClause ¶
func (aql *AQLListener) EnterWhereClause(ctx *parser.WhereClauseContext)
EnterWhereClause is called when production whereClause is entered.
func (*AQLListener) VisitTerminal ¶
func (aql *AQLListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type AggregateFunctionCallSelectValue ¶
type AggregateFunctionCallSelectValue struct { }
type AqlProcessor ¶
type AqlProcessor struct {
// contains filtered or unexported fields
}
func NewAqlProcessor ¶
func NewAqlProcessor(data string) *AqlProcessor
func (*AqlProcessor) Process ¶
func (p *AqlProcessor) Process() (*Query, error)
type ArchetypePathPredicate ¶
type ClassExpression ¶
type ClassExpression struct { Identifiers []string PathPredicate *PathPredicate }
type ComparisionSymbol ¶
type ComparisionSymbol string
const ( SymNone ComparisionSymbol = "NONE" SymLT ComparisionSymbol = "<" SymGT ComparisionSymbol = ">" SymLE ComparisionSymbol = "<=" SymGE ComparisionSymbol = ">=" SymNe ComparisionSymbol = "!=" SymEQ ComparisionSymbol = "=" )
type ContainsExpr ¶
type ContainsExpr struct { Operand Operand Contains []*ContainsExpr Operator *OperatorType Brackets bool }
type CustomErrorListener ¶
type CustomErrorListener struct { *antlr.DefaultErrorListener // Embed default which ensures we fit the interface Errors []error }
func (*CustomErrorListener) SyntaxError ¶
func (c *CustomErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)
type CustomSyntaxError ¶
type CustomSyntaxError struct {
// contains filtered or unexported fields
}
func (*CustomSyntaxError) Error ¶
func (e *CustomSyntaxError) Error() string
type From ¶
type From struct {
ContainsExpr
}
type FunctionCallSelectValue ¶
type FunctionCallSelectValue struct { }
type IdentifiedExpr ¶
type IdentifiedExpr struct { Next *IdentifiedExpr IsExists bool IdentifiedPath *IdentifiedPath Terminal *Terminal ComparisonOperator *ComparisionSymbol Brackets bool }
type IdentifiedPath ¶
type IdentifiedPath struct { Identifier string PathPredicate *PathPredicate ObjectPath *ObjectPath }
type IdentifiedPathSelectValue ¶
type IdentifiedPathSelectValue struct {
Val IdentifiedPath
}
type NodePredicate ¶
type NodePredicate struct { Operator OperatorType ComparisionSymbol ComparisionSymbol AtCode *AtCode IDCode *IDCode ArchetypeHRID *string AdditionalData *NodePredicateAdditionalData Parameter *Parameter Next []*NodePredicate ObjectPath *ObjectPath PathPredicateOperand *PathPredicateOperand IsMatches bool ContainedRegex *string }
type ObjectPath ¶
type ObjectPath struct {
Paths []PartPath
}
type OperatorType ¶
type OperatorType string
const ( NoneOperator OperatorType = "NONE" ANDOperator OperatorType = "AND" OROperator OperatorType = "OR" NOTOperator OperatorType = "NOT" )
type OrderBy ¶
type OrderBy struct { IdentifierPath IdentifiedPath Ordering OrderingType }
type OrderingType ¶
type OrderingType uint8
const ( NoneOrdering OrderingType = iota DescendingOrdering AscendingOrdering )
type PartPath ¶
type PartPath struct { Identifier string PathPredicate *PathPredicate }
type PathPredicate ¶
type PathPredicate struct { Type PredicateType StandartPredicate *StandartPredicate NodePredicate *NodePredicate Archetype *ArchetypePathPredicate }
type PathPredicateOperand ¶
type PathPredicateOperand struct { Primitive *Primitive ObjectPath *ObjectPath Parameter *Parameter IDCode *string AtCode *string }
type PredicateType ¶
type PredicateType string
const ( StandartPathPredicate PredicateType = "STANDARD_PREDICATE" ArchetypedPathPredicate PredicateType = "ARCHETYPED_PREDICATE" NodePathPredicate PredicateType = "NODE_PREDICATE" )
type PrimitiveSelectValue ¶
type PrimitiveSelectValue struct {
Val Primitive
}
type Query ¶
type Query struct { Select Select From From Where *Where Order *Order Limit *Limit Parameters map[string]*Parameter }
func (*Query) ParametersCount ¶
type Select ¶
type Select struct { Distinct bool SelectExprs []SelectExpr }
type SelectExpr ¶
type SelectExpr struct { Value SelectValuer Path string AliasName string }
type SelectValuer ¶
type SelectValuer interface{}
type StandartPredicate ¶
type StandartPredicate struct { ObjectPath *ObjectPath CMPOperator ComparisionSymbol Operand *PathPredicateOperand }
standardPredicate: objectPath COMPARISON_OPERATOR pathPredicateOperand;
type Terminal ¶
type Terminal struct { Primitive *Primitive Parameter *Parameter IdentifiedPath *IdentifiedPath }
type VersionClassExpr ¶
type VersionClassExpr struct { Version string Variable *string VersionPredicate *VersionPredicate }
type VersionPredicate ¶
type VersionPredicate struct { LatestVersion *string AllVersions *string StandartPredicate *StandartPredicate }
type Where ¶
type Where struct { IdentifiedExpr *IdentifiedExpr Next []*Where OperatorType OperatorType Brackets bool }
Click to show internal directories.
Click to hide internal directories.