- 完善 [Column(MapType = typeof(byte[]))] 对 Guid/string 的映射支持;

This commit is contained in:
28810
2020-01-07 00:41:22 +08:00
parent fbbd74f54c
commit 5afeea7711
33 changed files with 128 additions and 135 deletions

View File

@ -96,14 +96,7 @@ namespace FreeSql.Odbc.Oracle
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, Type type, object value)
{
if (value == null) return "NULL";
if (type == typeof(byte[]))
{
var bytes = value as byte[];
var sb = new StringBuilder().Append("rawtohex('0x");
foreach (var vc in bytes)
sb.Append(vc.ToString("X").PadLeft(2, '0'));
return sb.Append("')").ToString();
}
if (type == typeof(byte[])) return $"hextoraw('{CommonUtils.BytesSqlRaw(value as byte[])}')";
return FormatSql("{0}", value, 1);
}
}