mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-28 16:37:58 +08:00
Update Exp to sql
This commit is contained in:
parent
9a45e0cfe6
commit
db1b8c5cd3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user