Update click houst

This commit is contained in:
sunkaixuan 2022-08-14 03:18:06 +08:00
parent f867559e89
commit 31609a18dd

View File

@ -125,7 +125,14 @@ namespace SqlSugar.ClickHouse
{ {
dbtype = ClickHouseDbBind.MappingTypesConst.First(it => it.Value == CSharpDataType.@decimal).Key; dbtype = ClickHouseDbBind.MappingTypesConst.First(it => it.Value == CSharpDataType.@decimal).Key;
} }
sql = sql.Replace(param.ParameterName,"{"+ newName + ":"+ dbtype + "}"); if (dbtype.ObjToString() == System.Data.DbType.Boolean.ToString())
{
sql = sql.Replace(param.ParameterName, param.Value.ObjToBool()?"1":"0");
}
else
{
sql = sql.Replace(param.ParameterName, "{" + newName + ":" + dbtype + "}");
}
param.ParameterName = newName; param.ParameterName = newName;
} }
sqlCommand.CommandText = sql; sqlCommand.CommandText = sql;