Browse Source

Update exp to sql

SqlSugar5
sunkaixuan 2 years ago
parent
commit
74143f63ad
  1. 7
      Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs

7
Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs

@ -217,8 +217,15 @@ namespace SqlSugar
var p = (leftExp as MemberExpression); var p = (leftExp as MemberExpression);
this.Context.SingleTableNameSubqueryShortName=p.Expression.ToString(); this.Context.SingleTableNameSubqueryShortName=p.Expression.ToString();
} }
if (UtilMethods.IsParentheses(rightSql+""))
{
base.Context.Result.Append($" {leftSql} {not} in {rightSql} ");
}
else
{
base.Context.Result.Append($" {leftSql} {not} in ({rightSql}) "); base.Context.Result.Append($" {leftSql} {not} in ({rightSql}) ");
} }
}
private bool IsGroupSubquery(Expression rightExpression, string operatorValue) private bool IsGroupSubquery(Expression rightExpression, string operatorValue)
{ {

Loading…
Cancel
Save