修改sql语句拼接

This commit is contained in:
2024-01-17 10:05:29 +08:00
parent 2629778c96
commit e1aa621a7d
4 changed files with 9 additions and 15 deletions

View File

@@ -136,16 +136,14 @@ public class MySqlDestination : IDisposable, IAsyncDisposable
if (currentLength + recordSb.Length >= maxAllowPacket)
{
var insertSb = new StringBuilder(headerSb.ToString());
insertSb.Append(string.Join(",", sbList));
insertSb.Append(";");
resultList.Add(insertSb.ToString());
insertSb.Clear();
sbList.Clear();
currentLength = headerSb.Length;
sbList.Add(recordSb.ToString());
currentLength = headerSb.Length + 1;//逗号长度加1
}
else
{
@@ -164,10 +162,6 @@ public class MySqlDestination : IDisposable, IAsyncDisposable
}
headerSb.Clear();
}
if (resultList.Count == 2)
{
var a = 1;
}
return resultList;
}