Browse Source

Update exp to sql (ArrayIndex)

pull/23/head
sunkaixuan 2 years ago
parent
commit
96daa7e100
  1. 6
      Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs

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

@ -27,6 +27,12 @@ namespace SqlSugar
private void Other(ExpressionParameter parameter)
{
var expression = this.Expression as BinaryExpression;
if (expression.NodeType == ExpressionType.ArrayIndex)
{
var parameterName=AppendParameter(ExpressionTool.DynamicInvoke(expression));
base.Context.Result.Append($" {BaseParameter.BaseParameter.OperatorValue} {parameterName} ");
return;
}
var operatorValue = parameter.OperatorValue = ExpressionTool.GetOperator(expression.NodeType);
var isSubGroup = IsGroupSubquery(expression.Right, operatorValue);
if (isSubGroup)

Loading…
Cancel
Save