private PredicateSegment CreateBetweenSegment(SqlServerCommandParser.PredicateContext context) { ColumnSegment column = (ColumnSegment)Visit(context.bitExpr(0)); IExpressionSegment between = (IExpressionSegment)Visit(context.bitExpr(1)); IExpressionSegment and = (IExpressionSegment)Visit(context.predicate()); return(new PredicateSegment(context.Start.StartIndex, context.Stop.StopIndex, column, new PredicateBetweenRightValue(between, and))); }
private IASTNode VisitRemainPredicate(SqlServerCommandParser.PredicateContext context) { foreach (var bitExpr in context.bitExpr()) { Visit(bitExpr); } foreach (var expr in context.expr()) { Visit(expr); } foreach (var simpleExpr in context.simpleExpr()) { Visit(simpleExpr); } if (null != context.predicate()) { Visit(context.predicate()); } return(new CommonExpressionSegment(context.Start.StartIndex, context.Stop.StopIndex, context.GetText())); }