Browse Source

Update db.Fastest oracle

pull/11/head
sunkaixuna 3 years ago
parent
commit
2512aeedc5
  1. 2
      Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/Oracle/SqlBuilder/OracleFastBuilder.cs

2
Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Realization/Oracle/SqlBuilder/OracleFastBuilder.cs

@ -36,7 +36,7 @@ namespace SqlSugar
Check.ArgumentNullException(!updateColumns.Any(), "update columns count is 0"); Check.ArgumentNullException(!updateColumns.Any(), "update columns count is 0");
Check.ArgumentNullException(!whereColumns.Any(), "where columns count is 0"); Check.ArgumentNullException(!whereColumns.Any(), "where columns count is 0");
var sets = string.Join(",", updateColumns.Select(it => $"TM{it}=TE{it}")); var sets = string.Join(",", updateColumns.Select(it => $"TM{it}=TE{it}"));
var wheres = string.Join(",", whereColumns.Select(it => $"TM.{sqlBuilder.GetTranslationColumnName(it)}=TE.{sqlBuilder.GetTranslationColumnName(it)}")); var wheres = string.Join(" AND ", whereColumns.Select(it => $"TM.{sqlBuilder.GetTranslationColumnName(it)}=TE.{sqlBuilder.GetTranslationColumnName(it)}"));
var forms= string.Join(",", updateColumns.Select(it => $" TM.{sqlBuilder.GetTranslationColumnName(it)} TM{it},TE.{sqlBuilder.GetTranslationColumnName(it)} TE{it}")); ; var forms= string.Join(",", updateColumns.Select(it => $" TM.{sqlBuilder.GetTranslationColumnName(it)} TM{it},TE.{sqlBuilder.GetTranslationColumnName(it)} TE{it}")); ;
string sql = string.Format(UpdateSql, sets, wheres,tableName, tempName, forms); string sql = string.Format(UpdateSql, sets, wheres,tableName, tempName, forms);
return await this.Context.Ado.ExecuteCommandAsync(sql); return await this.Context.Ado.ExecuteCommandAsync(sql);

Loading…
Cancel
Save