- 补充 fsql.InsertOrUpdate UpdateColumns 数据存在时只更新指定的字段;

This commit is contained in:
28810
2020-07-29 15:32:14 +08:00
parent a8d1db8614
commit 06b301395f
19 changed files with 89 additions and 26 deletions

View File

@ -44,6 +44,7 @@ namespace FreeSql.Sqlite.Curd
insert.InsertIdentity();
if (_doNothing == false)
{
if (_updateIgnore.Any()) throw new Exception($"fsql.InsertOrUpdate Sqlite 无法完成 UpdateColumns 操作");
sql = insert.ToSql();
if (sql?.StartsWith("INSERT INTO ") == true)
sql = $"REPLACE INTO {sql.Substring("INSERT INTO ".Length)}";