private Select VisitSelect(Select select) { JoinStatementList newJoinStatementList = new JoinStatementList(); int numJoinStatements = 0; for (int i = 0, n = select.joinStatementList.Length; i < n; i++) { if (select.joinStatementList[i] != null) numJoinStatements++; if (numJoinStatements <= 64) newJoinStatementList.Add((JoinStatement)this.VisitJoinStatement(select.joinStatementList[i])); else this.HandleError(select.joinStatementList[i], Error.TooManyJoinStatements); } select.joinStatementList = newJoinStatementList; return select; }
private Select VisitSelect(Select select) { JoinStatementList newJoinStatementList = new JoinStatementList(); for (int i = 0, n = select.joinStatementList.Length; i < n; i++) newJoinStatementList.Add((JoinStatement)this.VisitJoinStatement(select.joinStatementList[i])); select.joinStatementList = newJoinStatementList; return select; }
private Select VisitSelect(Select select) { JoinStatementList newJoinStatementList = new JoinStatementList(); for (int i = 0, n = select.joinStatementList.Length; i < n; i++) { JoinStatement js = this.VisitJoinStatement(select.joinStatementList[i]); js.visible = select.visible; newJoinStatementList.Add(js); } select.joinStatementList = newJoinStatementList; return select; }
private Select VisitSelect(Select select) { if (select == null) return null; PushSelectStatement(select); JoinStatementList newJoinStatementList = new JoinStatementList(); int timeoutIndex = -1; for (int i = 0, n = select.joinStatementList.Length; i < n; i++) { if (select.joinStatementList[i].joinPatternList[0] is TimeoutPattern) { if (timeoutIndex >= 0) { // If we've already seen a "timeout" join statement, then skip // subsequent ones and report an error. HandleError(select.joinStatementList[i], Error.TooManyTimeouts); continue; } timeoutIndex = i; } JoinStatement newJoinStatement = (JoinStatement)this.VisitJoinStatement(select.joinStatementList[i]); if (newJoinStatement != null) newJoinStatementList.Add(newJoinStatement); } select.joinStatementList = newJoinStatementList; // If a timeout is present and it isn't already last, move it to the // end of the list. This will be helpful during code generation. if (timeoutIndex >= 0 && timeoutIndex != (select.joinStatementList.Length - 1)) { JoinStatement temp; temp = select.joinStatementList[select.joinStatementList.Length - 1]; select.joinStatementList[select.joinStatementList.Length - 1] = select.joinStatementList[timeoutIndex]; select.joinStatementList[timeoutIndex] = temp; } if (select.joinStatementList.Length == 1) select.deterministicSelection = true; PopSelectStatement(); if (select.joinStatementList.Length == 0) return null; return select; }