@@ -267,22 +267,6 @@ public virtual string Translate(SqlCompilerContext context, SqlArray node, Array
267267 }
268268 }
269269
270- // Type itemType = node.ItemType;
271- // object[] values = node.GetValues();
272- // int count = values.Length;
273- // if (count==0)
274- // return "(NULL)";
275- // var buffer = new string[count];
276- // for (int index = 0; index < count; index++)
277- // buffer[index] = Translate(context, (SqlLiteral) SqlDml.Literal(values[index], itemType));
278- // if (count==1)
279- // return "(" + buffer[0] + ")";
280- //
281- // buffer[0] = "(" + buffer[0];
282- // buffer[count - 1] += ")";
283- // return String.Join(RowItemDelimiter, buffer);
284- // }
285-
286270 public virtual string Translate ( SqlCompilerContext context , SqlAssignment node , NodeSection section )
287271 {
288272 switch ( section ) {
@@ -1825,8 +1809,9 @@ public virtual string BuildBatch(string[] statements)
18251809 {
18261810 if ( statements . Length == 0 )
18271811 return string . Empty ;
1812+ var statementEndingLength = BatchItemDelimiter . Length + NewLine . Length ;
18281813 var expectedLength = BatchBegin . Length + BatchEnd . Length +
1829- statements . Sum ( statement => statement . Length + BatchItemDelimiter . Length + NewLine . Length ) ;
1814+ statements . Sum ( statement => statement . Length + statementEndingLength ) ;
18301815 var builder = new StringBuilder ( expectedLength ) ;
18311816 builder . Append ( BatchBegin ) ;
18321817 foreach ( var statement in statements ) {
0 commit comments