mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
!100 修改海量数据库mysql BulkCopyAsync兼容性问题
Merge pull request !100 from 陈剑辉/master
This commit is contained in:
@@ -39,7 +39,9 @@ namespace SqlSugar
|
|||||||
lsColNames.Add($"\"{dt.Columns[i].ColumnName}\"");
|
lsColNames.Add($"\"{dt.Columns[i].ColumnName}\"");
|
||||||
}
|
}
|
||||||
string copyString = $"COPY {dt.TableName} ( {string.Join(",", lsColNames)} ) FROM STDIN (FORMAT BINARY)";
|
string copyString = $"COPY {dt.TableName} ( {string.Join(",", lsColNames)} ) FROM STDIN (FORMAT BINARY)";
|
||||||
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.OpenGauss)
|
var innertemp = this.Context.CurrentConnectionConfig?.MoreSettings?.InnerTemp as DbType?;
|
||||||
|
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.OpenGauss ||
|
||||||
|
(this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.Vastbase && innertemp == DbType.MySql))
|
||||||
{
|
{
|
||||||
copyString = copyString.Replace("(FORMAT BINARY)", "(FORMAT 'BINARY')");
|
copyString = copyString.Replace("(FORMAT BINARY)", "(FORMAT 'BINARY')");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user