Update gbase

This commit is contained in:
sunkaixuan
2025-10-14 14:29:01 +08:00
parent 9ad46d7188
commit 0a03d1cb15
2 changed files with 12 additions and 2 deletions

View File

@@ -12,6 +12,10 @@ namespace SqlSugar.GBase
{
return nameof(DateTimeOffset);
}
else if (csharpTypeName == "Byte[]")
{
return "blob";
}
else
{
return base.GetDbTypeName(csharpTypeName);

View File

@@ -374,7 +374,7 @@ namespace SqlSugar.GBase
gbsParam.DbType = param.DbType;
gbsParam.ParameterName = param.ParameterName;
gbsParam.Direction = param.Direction;
if (UtilMethods.HasBigObjectParam(param))
{
// assign GbsType.
@@ -398,6 +398,12 @@ namespace SqlSugar.GBase
gbsParam.Value = (param.Value == null) ? DBNull.Value : param.Value;
break;
}
if (param.DbType is System.Data.DbType.Binary&& param.TypeName==null)
{
gbsParam.GbsType = GbsType.Blob;
gbsParam.Value = (param.Value == null) ? string.Empty : param.Value;
}
}
else
{
@@ -452,7 +458,7 @@ namespace SqlSugar.GBase
// sqlCommand.Parameters.AddRange(ipars);
//}
CheckConnection();
return sqlCommand;
return sqlCommand!;
}
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
{