public override IASTNode VisitJoinedTable(SqlServerCommandParser.JoinedTableContext context) { JoinedTableSegment result = new JoinedTableSegment(); TableFactorSegment tableFactor = (TableFactorSegment)Visit(context.tableFactor()); result.SetTableFactor(tableFactor); if (null != context.joinSpecification()) { result.SetJoinSpecification((JoinSpecificationSegment)Visit(context.joinSpecification())); } return(result); }
private ICollection <SimpleTableSegment> GetTableSegments(ICollection <SimpleTableSegment> tableSegments, SqlServerCommandParser.JoinedTableContext joinedTable) { ICollection <SimpleTableSegment> result = new LinkedList <SimpleTableSegment>(); foreach (var simpleTableSegment in ((CollectionValue <SimpleTableSegment>)Visit(joinedTable)).GetValue()) { if (IsTable(simpleTableSegment, tableSegments)) { result.Add(simpleTableSegment); } } return(result); }