Package org.ehrbase.aql.compiler
Class QueryCompilerPass2
- java.lang.Object
-
- org.ehrbase.aql.parser.AqlBaseListener
-
- org.ehrbase.aql.compiler.QueryCompilerPass2
-
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeListener,AqlListener
public class QueryCompilerPass2 extends AqlBaseListener
AQL compilation pass 2This pass uses the results of pass 1 to:
- resolve AQL paths from symbols, example: c/items[at0002]/items[at0001]/value/value/magnitude
- create the list of variables used in SELECT
- create the list of ORDER BY expression parts
- set the TOP clause if specified
-
-
Constructor Summary
Constructors Constructor Description QueryCompilerPass2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexitFunction(AqlParser.FunctionContext functionContext)Exit a parse tree produced byAqlParser.function().voidexitLimit(AqlParser.LimitContext ctx)Exit a parse tree produced byAqlParser.limit().voidexitObjectPath(AqlParser.ObjectPathContext objectPathContext)Exit a parse tree produced byAqlParser.objectPath().voidexitOffset(AqlParser.OffsetContext ctx)Exit a parse tree produced byAqlParser.offset().voidexitOrderBySeq(AqlParser.OrderBySeqContext context)Exit a parse tree produced byAqlParser.orderBySeq().voidexitSelectExpr(AqlParser.SelectExprContext selectExprContext)Exit a parse tree produced byAqlParser.selectExpr().voidexitTopExpr(AqlParser.TopExprContext context)Exit a parse tree produced byAqlParser.topExpr().List<I_VariableDefinition>getVariables()-
Methods inherited from class org.ehrbase.aql.parser.AqlBaseListener
enterArchetypedClassExpr, enterClassExpr, enterContainExpressionBool, enterContains, enterContainsExpression, enterEveryRule, enterExtension, enterFrom, enterFromEHR, enterFromExpr, enterFromForeignData, enterFunction, enterIdentifiedEquality, enterIdentifiedExpr, enterIdentifiedOperand, enterIdentifiedPath, enterInvokeExpr, enterInvokeOperand, enterJoinPredicate, enterLimit, enterMatchesOperand, enterNodePredicateAnd, enterNodePredicateComparable, enterNodePredicateOr, enterNodePredicateRegEx, enterObjectPath, enterOffset, enterOperand, enterOrderBy, enterOrderByExpr, enterOrderBySeq, enterPathPart, enterPredicate, enterPredicateAnd, enterPredicateEquality, enterPredicateExpr, enterPredicateOperand, enterQuery, enterQueryExpr, enterSelect, enterSelectExpr, enterSimpleClassExpr, enterStandardPredicate, enterStdExpression, enterTopExpr, enterValueListItems, enterVersionClassExpr, enterVersionedClassExpr, enterVersionpredicate, enterVersionpredicateOptions, enterWhere, exitArchetypedClassExpr, exitClassExpr, exitContainExpressionBool, exitContains, exitContainsExpression, exitEveryRule, exitExtension, exitFrom, exitFromEHR, exitFromExpr, exitFromForeignData, exitIdentifiedEquality, exitIdentifiedExpr, exitIdentifiedOperand, exitIdentifiedPath, exitInvokeExpr, exitInvokeOperand, exitJoinPredicate, exitMatchesOperand, exitNodePredicateAnd, exitNodePredicateComparable, exitNodePredicateOr, exitNodePredicateRegEx, exitOperand, exitOrderBy, exitOrderByExpr, exitPathPart, exitPredicate, exitPredicateAnd, exitPredicateEquality, exitPredicateExpr, exitPredicateOperand, exitQuery, exitQueryExpr, exitSelect, exitSimpleClassExpr, exitStandardPredicate, exitStdExpression, exitValueListItems, exitVersionClassExpr, exitVersionedClassExpr, exitVersionpredicate, exitVersionpredicateOptions, exitWhere, visitErrorNode, visitTerminal
-
-
-
-
Method Detail
-
exitObjectPath
public void exitObjectPath(AqlParser.ObjectPathContext objectPathContext)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.objectPath().The default implementation does nothing.
- Specified by:
exitObjectPathin interfaceAqlListener- Overrides:
exitObjectPathin classAqlBaseListener- Parameters:
objectPathContext- the parse tree
-
exitSelectExpr
public void exitSelectExpr(AqlParser.SelectExprContext selectExprContext)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.selectExpr().The default implementation does nothing.
- Specified by:
exitSelectExprin interfaceAqlListener- Overrides:
exitSelectExprin classAqlBaseListener- Parameters:
selectExprContext- the parse tree
-
exitTopExpr
public void exitTopExpr(AqlParser.TopExprContext context)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.topExpr().The default implementation does nothing.
- Specified by:
exitTopExprin interfaceAqlListener- Overrides:
exitTopExprin classAqlBaseListener- Parameters:
context- the parse tree
-
exitOrderBySeq
public void exitOrderBySeq(AqlParser.OrderBySeqContext context)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.orderBySeq().The default implementation does nothing.
- Specified by:
exitOrderBySeqin interfaceAqlListener- Overrides:
exitOrderBySeqin classAqlBaseListener- Parameters:
context- the parse tree
-
exitOffset
public void exitOffset(AqlParser.OffsetContext ctx)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.offset().The default implementation does nothing.
- Specified by:
exitOffsetin interfaceAqlListener- Overrides:
exitOffsetin classAqlBaseListener- Parameters:
ctx- the parse tree
-
exitLimit
public void exitLimit(AqlParser.LimitContext ctx)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.limit().The default implementation does nothing.
- Specified by:
exitLimitin interfaceAqlListener- Overrides:
exitLimitin classAqlBaseListener- Parameters:
ctx- the parse tree
-
exitFunction
public void exitFunction(AqlParser.FunctionContext functionContext)
Description copied from class:AqlBaseListenerExit a parse tree produced byAqlParser.function().The default implementation does nothing.
- Specified by:
exitFunctionin interfaceAqlListener- Overrides:
exitFunctionin classAqlBaseListener- Parameters:
functionContext- the parse tree
-
getVariables
public List<I_VariableDefinition> getVariables()
-
-