|
@ -25,6 +25,27 @@ namespace SqlSugar |
|
|
break; |
|
|
break; |
|
|
case ResolveExpressType.WhereSingle: |
|
|
case ResolveExpressType.WhereSingle: |
|
|
fieldName = getSingleName(parameter, expression, isLeft); |
|
|
fieldName = getSingleName(parameter, expression, isLeft); |
|
|
|
|
|
fieldName = AppendMember(parameter, isLeft, fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
case ResolveExpressType.WhereMultiple: |
|
|
|
|
|
fieldName = getMultipleName(parameter, expression, isLeft); |
|
|
|
|
|
fieldName = AppendMember(parameter, isLeft, fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
case ResolveExpressType.FieldSingle: |
|
|
|
|
|
fieldName = getSingleName(parameter, expression, isLeft); |
|
|
|
|
|
base.Context.Result.Append(fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
case ResolveExpressType.FieldMultiple: |
|
|
|
|
|
fieldName = getMultipleName(parameter, expression, isLeft); |
|
|
|
|
|
base.Context.Result.Append(fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private string AppendMember(ExpressionParameter parameter, bool? isLeft, string fieldName) |
|
|
|
|
|
{ |
|
|
if (parameter.BaseExpression is BinaryExpression) |
|
|
if (parameter.BaseExpression is BinaryExpression) |
|
|
{ |
|
|
{ |
|
|
fieldName = string.Format(" {0} ", fieldName); |
|
|
fieldName = string.Format(" {0} ", fieldName); |
|
@ -45,22 +66,8 @@ namespace SqlSugar |
|
|
{ |
|
|
{ |
|
|
base.Context.Result.Append(fieldName); |
|
|
base.Context.Result.Append(fieldName); |
|
|
} |
|
|
} |
|
|
break; |
|
|
|
|
|
case ResolveExpressType.WhereMultiple: |
|
|
return fieldName; |
|
|
fieldName = getMultipleName(parameter, expression, isLeft); |
|
|
|
|
|
base.Context.Result.Append(fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
case ResolveExpressType.FieldSingle: |
|
|
|
|
|
fieldName = getSingleName(parameter, expression, isLeft); |
|
|
|
|
|
base.Context.Result.Append(fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
case ResolveExpressType.FieldMultiple: |
|
|
|
|
|
fieldName = getMultipleName(parameter, expression, isLeft); |
|
|
|
|
|
base.Context.Result.Append(fieldName); |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private string getMultipleName(ExpressionParameter parameter, MemberExpression expression, bool? isLeft) |
|
|
private string getMultipleName(ExpressionParameter parameter, MemberExpression expression, bool? isLeft) |
|
|