sqlsugar/Src/Asp.Net/SqlSugar/Json2Sql/Provider/Updateable/AppendWhere.cs

20 lines
647 B
C#
Raw Permalink Normal View History

2025-05-11 16:20:50 +08:00
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace SqlSugar
{
public partial class JsonUpdateableProvider : IJsonUpdateableProvider<JsonUpdateResult>
{
private void AppendWhere(JToken item)
{
Check.Exception(isList, "Batch updates cannot use Where, only WhereColumns can set columns", "批量更新不能使用Where只能通过WhereColumns设置列");
var sqlObj = jsonCommonProvider.GetWhere(item, sugarUpdateable.UpdateBuilder.Context);
sugarUpdateable.Where(sqlObj.Key, sqlObj.Value);
}
}
}