mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
!102 Fix Vastbase BINARY format handling in PostgreSQL COPY command
Merge pull request !102 from yayaxxww/master
This commit is contained in:
@@ -41,7 +41,7 @@ namespace SqlSugar
|
|||||||
string copyString = $"COPY {dt.TableName} ( {string.Join(",", lsColNames)} ) FROM STDIN (FORMAT BINARY)";
|
string copyString = $"COPY {dt.TableName} ( {string.Join(",", lsColNames)} ) FROM STDIN (FORMAT BINARY)";
|
||||||
var innertemp = this.Context.CurrentConnectionConfig?.MoreSettings?.InnerTemp as DbType?;
|
var innertemp = this.Context.CurrentConnectionConfig?.MoreSettings?.InnerTemp as DbType?;
|
||||||
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.OpenGauss ||
|
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.OpenGauss ||
|
||||||
(this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.Vastbase && innertemp == DbType.MySql))
|
this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.Vastbase)
|
||||||
{
|
{
|
||||||
copyString = copyString.Replace("(FORMAT BINARY)", "(FORMAT 'BINARY')");
|
copyString = copyString.Replace("(FORMAT BINARY)", "(FORMAT 'BINARY')");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user