mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 22:25:49 +08:00
Update Exp to sql
This commit is contained in:
@@ -253,6 +253,19 @@ namespace SqlSugar
|
||||
this.Context.Result.Replace(ExpressionConst.FormatSymbol, "NOT");
|
||||
}
|
||||
}
|
||||
protected void AppendNegate(object Value)
|
||||
{
|
||||
var isAppend = !this.Context.Result.Contains(ExpressionConst.FormatSymbol);
|
||||
var lastCharIsSpace = this.Context.Result.LastCharIsSpace;
|
||||
if (isAppend)
|
||||
{
|
||||
this.Context.Result.Append(lastCharIsSpace ? "-" : " -");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Context.Result.Replace(ExpressionConst.FormatSymbol, "-");
|
||||
}
|
||||
}
|
||||
|
||||
protected MethodCallExpressionArgs GetMethodCallArgs(ExpressionParameter parameter, Expression item)
|
||||
{
|
||||
|
||||
@@ -123,6 +123,8 @@ namespace SqlSugar
|
||||
parameter.CommonTempData = CommonTempDataType.Append;
|
||||
if (nodeType == ExpressionType.Not)
|
||||
AppendNot(parameter.CommonTempData);
|
||||
if (nodeType == ExpressionType.Negate)
|
||||
AppendNegate(parameter.CommonTempData);
|
||||
base.Start();
|
||||
parameter.BaseParameter.CommonTempData = parameter.CommonTempData;
|
||||
parameter.BaseParameter.ChildExpression = base.Expression;
|
||||
|
||||
Reference in New Issue
Block a user