Update Doris

This commit is contained in:
sunkaixuan
2024-07-18 09:39:54 +08:00
parent f905afdccd
commit fec2d61b3b
2 changed files with 9 additions and 2 deletions

View File

@@ -523,6 +523,7 @@ namespace SqlSugar
if (this.CurrentConnectionConfig.MoreSettings == null) if (this.CurrentConnectionConfig.MoreSettings == null)
this.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings(); this.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings();
this.CurrentConnectionConfig.MoreSettings.DatabaseModel = DbType.Doris; this.CurrentConnectionConfig.MoreSettings.DatabaseModel = DbType.Doris;
this.CurrentConnectionConfig.MoreSettings.DisableNvarchar = true;
break; break;
case DbType.TDengine: case DbType.TDengine:
Check.Exception(SugarCompatible.IsFramework, "TDengine only support .net core"); Check.Exception(SugarCompatible.IsFramework, "TDengine only support .net core");

View File

@@ -154,8 +154,14 @@ namespace SqlSugar
batchInsetrSql.Append("), "); batchInsetrSql.Append("), ");
} }
} }
if (DorisHelper.IsDoris(this.Context))
batchInsetrSql.AppendLine(";select @@IDENTITY"); {
//doris insert ignore
}
else
{
batchInsetrSql.AppendLine(";select @@IDENTITY");
}
var result = batchInsetrSql.ToString(); var result = batchInsetrSql.ToString();
result = GetMySqlIgnore(result); result = GetMySqlIgnore(result);
return result; return result;