public override IASTNode VisitJoinSpecification(SqlServerCommandParser.JoinSpecificationContext context) { JoinSpecificationSegment result = new JoinSpecificationSegment(); if (null != context.expr()) { var expr = Visit(context.expr()); if (expr is PredicateSegment predicateSegment) { result.SetPredicateSegment(predicateSegment); } } if (null != context.USING()) { ICollection <ColumnSegment> columnSegmentList = new LinkedList <ColumnSegment>(); foreach (var columnNameWithSortContext in context.columnNames().columnNameWithSort()) { columnSegmentList.Add((ColumnSegment)Visit(columnNameWithSortContext)); } result.SetUsingColumns(columnSegmentList); } return(result); }
public override IASTNode VisitJoinSpecification(MySqlCommandParser.JoinSpecificationContext ctx) { JoinSpecificationSegment result = new JoinSpecificationSegment(); if (null != ctx.expr()) { IASTNode expr = Visit(ctx.expr()); if (expr is PredicateSegment) { PredicateSegment predicate = (PredicateSegment)expr; result.SetPredicateSegment(predicate); } } if (null != ctx.USING()) { ICollection <ColumnSegment> columnSegmentList = new List <ColumnSegment>(); foreach (var cname in ctx.columnNames().columnName()) { columnSegmentList.Add((ColumnSegment)Visit(cname)); } result.SetUsingColumns(columnSegmentList); } return(result); }