internal override SqlBlock VisitBlock(SqlBlock block) { SqlBlock block2 = new SqlBlock(block.SourceExpression); foreach (SqlStatement statement in block.Statements) { block2.Statements.Add((SqlStatement)this.Visit(statement)); } return(block2); }
internal virtual SqlBlock VisitBlock(SqlBlock b) { int num = 0; int count = b.Statements.Count; while (num < count) { b.Statements[num] = (SqlStatement)this.Visit(b.Statements[num]); num++; } return(b); }
internal string[] FormatBlock(SqlBlock block, bool isDebug) { var list = new List <string>(block.Statements.Count); int num = 0; int count = block.Statements.Count; while (num < count) { var node = block.Statements[num]; var select = node as SqlSelect; if ((select == null) || !select.DoNotOutput) { list.Add(this.Format(node, isDebug)); } num++; } return(list.ToArray()); }
ReadOnlyCollection <ReadOnlyCollection <SqlParameterInfo> > ISqlParameterizer.ParameterizeBlock(SqlBlock block) { var item = new SqlParameterInfo(new SqlParameter(typeof(int), typeProvider.From(typeof(int)), "@ROWCOUNT", block.SourceExpression)); var list = new List <ReadOnlyCollection <SqlParameterInfo> >(); int num = 0; int count = block.Statements.Count; while (num < count) { SqlNode node = block.Statements[num]; List <SqlParameterInfo> list2 = this.ParameterizeInternal(node); if (num > 0) { list2.Add(item); } list.Add(list2.AsReadOnly()); num++; } return(list.AsReadOnly()); }