/** * INCLUDE statement */ @Override public Integer visitInclude_stmt(@NotNull HplsqlParser.Include_stmtContext ctx) { return exec.stmt.include(ctx); }
@Override public void exitComparisonPredicate(@NotNull PQL2Parser.ComparisonPredicateContext ctx) { popNode(); }
@Override public void exitFloatingPointLiteral(@NotNull PQL2Parser.FloatingPointLiteralContext ctx) { popNode(); }
@Override public void exitLimit(@NotNull PQL2Parser.LimitContext ctx) { popNode(); }
@Override public void exitOrderByExpression(@NotNull PQL2Parser.OrderByExpressionContext ctx) { popNode(); }
@Override public void exitBooleanOperator(@NotNull PQL2Parser.BooleanOperatorContext ctx) { popNode(); }
@Override public void exitStarExpression(@NotNull PQL2Parser.StarExpressionContext ctx) { popNode(); }
@Override public void exitHaving(@NotNull PQL2Parser.HavingContext ctx) { popNode(); }
@Override public void enterSelect(@NotNull PQL2Parser.SelectContext ctx) { pushNode(new SelectAstNode()); }
@Override public void enterStarExpression(@NotNull PQL2Parser.StarExpressionContext ctx) { pushNode(new StarExpressionAstNode()); }
@Override public void enterRegexpLikePredicate(@NotNull PQL2Parser.RegexpLikePredicateContext ctx) { pushNode(new RegexpLikePredicateAstNode()); }
@Override public void enterPredicateParenthesisGroup(@NotNull PQL2Parser.PredicateParenthesisGroupContext ctx) { pushNode(new PredicateParenthesisGroupAstNode()); }
@Override public void enterWhere(@NotNull PQL2Parser.WhereContext ctx) { pushNode(new WhereAstNode()); }
@Override public void enterPredicateList(@NotNull PQL2Parser.PredicateListContext ctx) { pushNode(new PredicateListAstNode()); }
@Override public void enterIntegerLiteral(@NotNull PQL2Parser.IntegerLiteralContext ctx) { pushNode(new IntegerLiteralAstNode(Long.parseLong(ctx.getText()))); }
@Override public void enterTableName(@NotNull PQL2Parser.TableNameContext ctx) { pushNode(new TableNameAstNode(ctx.getText())); }
@Override public void enterInPredicate(@NotNull PQL2Parser.InPredicateContext ctx) { boolean isNotInClause = false; if ("not".equalsIgnoreCase(ctx.getChild(0).getChild(1).getText())) { isNotInClause = true; } pushNode(new InPredicateAstNode(isNotInClause)); }
@Override public void enterFunctionCall(@NotNull PQL2Parser.FunctionCallContext ctx) { String expression = _expression.substring(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex() + 1); pushNode(new FunctionCallAstNode(ctx.getChild(0).getText(), expression)); }
@Override public void enterLimit(@NotNull PQL2Parser.LimitContext ctx) { // Can either be LIMIT <maxRows> or LIMIT <offset>, <maxRows> (the second is a MySQL syntax extension) if (ctx.getChild(0).getChildCount() == 2) { pushNode(new LimitAstNode(Integer.parseInt(ctx.getChild(0).getChild(1).getText()))); } else { pushNode(new LimitAstNode(Integer.parseInt(ctx.getChild(0).getChild(3).getText()), Integer.parseInt(ctx.getChild(0).getChild(1).getText()))); } }
@Override public void enterOrderByExpression(@NotNull PQL2Parser.OrderByExpressionContext ctx) { if (ctx.getChildCount() == 1) { pushNode(new OrderByExpressionAstNode(ctx.getChild(0).getText(), "asc")); } else { pushNode(new OrderByExpressionAstNode(ctx.getChild(0).getText(), ctx.getChild(1).getText())); } }