Update 人大金仓

This commit is contained in:
sunkaixuan
2025-12-03 16:56:50 +08:00
parent fa05baafac
commit 98dc2f1ddf
4 changed files with 17 additions and 2 deletions

View File

@@ -76,6 +76,11 @@ namespace SqlSugar
{
item.Length = 0;
}
if (IsSqlServerModel()&&item.DataType == "bytea")
{
item.Length = 0;
item.DataType = "varbinary(max)";
}
}
}

View File

@@ -743,6 +743,11 @@ WHERE tgrelid = '" + tableName + "'::regclass");
x.Scale = 0;
}
}
if (IsSqlServerModel() && x.DataType == "bytea")
{
x.Length = 0;
x.DataType = "varbinary(max)";
}
}
private bool IsPgModel()
{

View File

@@ -93,7 +93,12 @@ namespace SqlSugar
else if (it.Value is bool&& (IsMySqlModel()|| IsSqlServerModel()))
{
return Convert.ToBoolean(it.Value)?"1":"0";
}
}
else if (it.Value is byte[] bytes)
{
string bytesString = "0x" + BitConverter.ToString(bytes).Replace("-", "");
return bytesString;
}
else
{
value = it.Value;

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.210</version>
<version>5.1.4.211-preview03</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>