PgSql sql set columns null

This commit is contained in:
sunkaixuna
2021-04-25 14:17:40 +08:00
parent 2c9a234eea
commit 3421dd491b

View File

@@ -139,8 +139,16 @@ namespace SqlSugar
if (addItem.Value == null && dataType == UtilConstants.DateType)
{
addItem.DbType = System.Data.DbType.Date;
}
if (addItem.Value == null && dataType.IsIn(UtilConstants.FloatType,UtilConstants.IntType,UtilConstants.LongType,UtilConstants.DecType,UtilConstants.DobType))
{
addItem.DbType = System.Data.DbType.Int32;
}
if (addItem.Value == null && dataType == UtilConstants.BoolType)
{
addItem.DbType = System.Data.DbType.Boolean;
}
this.Context.Parameters.Add(addItem);
this.Context.ParameterIndex++;
}