Browse Source

Update ClickHouse

SqlSugar5
sunkaixuan 2 years ago
parent
commit
fd988e34f7
  1. 4
      Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/ClickHouseProvider.cs

4
Src/Asp.NetCore2/SqlSugar.ClickHouseCore/ClickHouse/ClickHouseProvider.cs

@ -144,6 +144,10 @@ namespace SqlSugar.ClickHouse
else
{
sql = sql.Replace(param.ParameterName, "{" + newName + ":" + dbtype + "}");
if (dbtype.ObjToString() == "DateTime"&&param.Value==DBNull.Value)
{
param.Value = Convert.ToDateTime("1900-01-01");
}
}
param.ParameterName = newName;
}

Loading…
Cancel
Save