mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update exp to sql (SetColumns null pgsql)
This commit is contained in:
parent
f3ff9fe463
commit
67837fde76
@ -156,6 +156,14 @@ namespace SqlSugar
|
||||
string parameterName = this.Context.SqlParameterKeyWord + ExpressionConst.Const + this.Context.ParameterIndex;
|
||||
parameter.Context.Result.Append(base.Context.GetEqString(memberName, parameterName));
|
||||
var addItem = new SugarParameter(parameterName, parameter.CommonTempData);
|
||||
if (addItem.Value == null&&item.Type?.Name== "Nullable`1")
|
||||
{
|
||||
var genericType = item.Type?.GenericTypeArguments?.FirstOrDefault();
|
||||
if (genericType != null)
|
||||
{
|
||||
addItem.DbType = new SugarParameter(parameterName, UtilMethods.GetDefaultValue(genericType)).DbType;
|
||||
}
|
||||
}
|
||||
ConvertParameterTypeByType(item, addItem);
|
||||
|
||||
this.Context.Parameters.Add(addItem);
|
||||
|
Loading…
Reference in New Issue
Block a user