mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 13:17:57 +08:00
Synchronization code
This commit is contained in:
parent
adaec37f56
commit
35287da6a9
@ -676,7 +676,7 @@ namespace SqlSugar
|
|||||||
if (this.UpdateParameterIsNull)
|
if (this.UpdateParameterIsNull)
|
||||||
{
|
{
|
||||||
var whereSql = Regex.Replace(sql, ".* WHERE ", "", RegexOptions.Singleline);
|
var whereSql = Regex.Replace(sql, ".* WHERE ", "", RegexOptions.Singleline);
|
||||||
if (sql.Contains("WHERE (EXISTS"))
|
if (IsExists(sql))
|
||||||
{
|
{
|
||||||
whereSql = Regex.Match(sql, @"\(EXISTS.+").Value;
|
whereSql = Regex.Match(sql, @"\(EXISTS.+").Value;
|
||||||
}
|
}
|
||||||
@ -718,6 +718,11 @@ namespace SqlSugar
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool IsExists(string sql)
|
||||||
|
{
|
||||||
|
return sql.Contains("WHERE (EXISTS") || sql.Contains("((EXISTS (");
|
||||||
|
}
|
||||||
|
|
||||||
private void ThrowUpdateByExpression()
|
private void ThrowUpdateByExpression()
|
||||||
{
|
{
|
||||||
Check.Exception(UpdateParameterIsNull == true, ErrorMessage.GetThrowMessage(" no support UpdateColumns and WhereColumns", "根据表达式更新 db.Updateable<T>() 禁止使用 UpdateColumns和WhereColumns,你可以使用 SetColumns Where 等。更新分为2种方式 1.根据表达式更新 2.根据实体或者集合更新, 具体用法请查看文档 "));
|
Check.Exception(UpdateParameterIsNull == true, ErrorMessage.GetThrowMessage(" no support UpdateColumns and WhereColumns", "根据表达式更新 db.Updateable<T>() 禁止使用 UpdateColumns和WhereColumns,你可以使用 SetColumns Where 等。更新分为2种方式 1.根据表达式更新 2.根据实体或者集合更新, 具体用法请查看文档 "));
|
||||||
|
Loading…
Reference in New Issue
Block a user