Update exp to sql

This commit is contained in:
sunkaixuan 2025-03-24 18:47:24 +08:00
parent d904c684a6
commit 5de90ca4b8

View File

@ -69,6 +69,7 @@ namespace SqlSugar
{
var isLeft = parameter.IsLeft;
object value = ExpressionTool.GetValue(expression.Value, this.Context);
var isNullStr = value != null && value.ObjToString() == "NULL";
value = ConvetValue(parameter, expression, value);
if (IsEnumString(value))
value = ConvertEnum(value);
@ -116,6 +117,11 @@ namespace SqlSugar
parameter.BaseParameter.ValueIsNull = true;
value = this.Context.DbMehtods.Null();
}
if (isNullStr)
{
this.Context.Result.Append(AppendParameter(value));
break;
}
AppendValue(parameter, isLeft, value);
}
break;