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