- 补充 fsql.InsertOrUpdate IfExistsDoNothing 数据存在时不做任何事(不更新) #330 #316;

This commit is contained in:
28810
2020-07-18 11:58:58 +08:00
parent f97e7c21eb
commit 8d11993e6c
44 changed files with 5585 additions and 73 deletions

View File

@ -38,7 +38,7 @@ namespace FreeSql.Odbc.Dameng
sb.Append(" ) t2 ON (").Append(string.Join(" AND ", _table.Primarys.Select(a => $"t1.{_commonUtils.QuoteSqlName(a.Attribute.Name)} = t2.{a.Attribute.Name}"))).Append(") \r\n");
var cols = _table.Columns.Values.Where(a => a.Attribute.IsPrimary == false && a.Attribute.CanUpdate == true);
if (cols.Any())
if (_doNothing == false && cols.Any())
sb.Append("WHEN MATCHED THEN \r\n")
.Append(" update set ").Append(string.Join(", ", cols.Select(a =>
a.Attribute.IsVersion ?