mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 修复 Delete.Where in 查询为空时,异步操作仍然执行删除;#1068
This commit is contained in:
parent
a01478b4b4
commit
0387c0a4cf
@ -77,6 +77,8 @@ namespace FreeSql.Tests.SqliteExpression
|
||||
{
|
||||
IEnumerable<int> testlinqlist = new List<int>(new[] { 1, 2, 3 });
|
||||
var testlinq = select.Where(a => testlinqlist.Contains(a.Int)).ToList();
|
||||
var testlinq2list = new string[] { };
|
||||
var testlinq2 = g.sqlite.Delete<TableAllType>().Where(a => testlinq2list.Contains(a.String)).ToSql();
|
||||
|
||||
//in not in
|
||||
var sql111 = select.Where(a => new[] { 1, 2, 3 }.Contains(a.Int)).ToList();
|
||||
|
@ -239,7 +239,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
return;
|
||||
}
|
||||
|
||||
sb.Insert(0, _commonUtils.QuoteSqlName(TableRuleInvoke())).Insert(0, "DELETE FROM ");
|
||||
sb.Append("DELETE FROM ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append(newwhere);
|
||||
_interceptSql?.Invoke(sb);
|
||||
await fetchAsync(sb);
|
||||
sb.Clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user