mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
修复数据类型sbyte对应clickhouse Int8的错误
This commit is contained in:
parent
0cf9a96737
commit
16e32901d5
@ -133,6 +133,10 @@ namespace SqlSugar.ClickHouse
|
||||
param.Value = Guid.Empty;
|
||||
}
|
||||
}
|
||||
if (dbtype.ObjToString() == System.Data.DbType.SByte.ToString())
|
||||
{
|
||||
dbtype = ClickHouseDbBind.MappingTypesConst.First(it => it.Value == CSharpDataType.@sbyte).Key;
|
||||
}
|
||||
if (param.Value!=null&¶m.Value!=DBNull.Value&&dbtype.ObjToString() == System.Data.DbType.Boolean.ToString())
|
||||
{
|
||||
sql = sql.Replace(param.ParameterName, param.Value.ObjToBool()?"1":"0");
|
||||
|
@ -67,8 +67,8 @@ namespace SqlSugar.ClickHouse
|
||||
new KeyValuePair<string, CSharpDataType>("UInt32",CSharpDataType.@int),
|
||||
new KeyValuePair<string, CSharpDataType>("UInt16",CSharpDataType.@short),
|
||||
new KeyValuePair<string, CSharpDataType>("UInt64",CSharpDataType.@long),
|
||||
new KeyValuePair<string, CSharpDataType>("Int8",CSharpDataType.@int),
|
||||
new KeyValuePair<string, CSharpDataType>("UInt8",CSharpDataType.@int),
|
||||
new KeyValuePair<string, CSharpDataType>("Int8",CSharpDataType.@sbyte),
|
||||
new KeyValuePair<string, CSharpDataType>("UInt8",CSharpDataType.@byte),
|
||||
new KeyValuePair<string, CSharpDataType>("Decimal(38,19)",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, CSharpDataType>("Decimal",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, CSharpDataType>("Decimal32",CSharpDataType.@decimal),
|
||||
|
@ -15,6 +15,7 @@ namespace SqlSugar
|
||||
@double,
|
||||
@Guid,
|
||||
@byte,
|
||||
@sbyte,
|
||||
@enum,
|
||||
@short,
|
||||
@long,
|
||||
|
@ -110,6 +110,10 @@ namespace SqlSugar
|
||||
{
|
||||
this.DbType = System.Data.DbType.Byte;
|
||||
}
|
||||
else if (type == UtilConstants.SByteType)
|
||||
{
|
||||
this.DbType = System.Data.DbType.SByte;
|
||||
}
|
||||
else if (type == UtilConstants.FloatType)
|
||||
{
|
||||
this.DbType = System.Data.DbType.Single;
|
||||
|
@ -24,6 +24,7 @@ namespace SqlSugar
|
||||
internal static Type BoolType = typeof(bool);
|
||||
internal static Type BoolTypeNull = typeof(bool?);
|
||||
internal static Type ByteType = typeof(Byte);
|
||||
internal static Type SByteType = typeof(sbyte);
|
||||
internal static Type ObjType = typeof(object);
|
||||
internal static Type DobType = typeof(double);
|
||||
internal static Type FloatType = typeof(float);
|
||||
|
Loading…
Reference in New Issue
Block a user