mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
PgSql sql set columns null
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user