mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修复 浮点类型 NoneParameter 不使用科学字符串表示;
This commit is contained in:
@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Data.Odbc;
|
||||
using System.Globalization;
|
||||
|
||||
namespace FreeSql.Odbc.Dameng
|
||||
{
|
||||
@ -101,6 +102,7 @@ namespace FreeSql.Odbc.Dameng
|
||||
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, Type type, object value)
|
||||
{
|
||||
if (value == null) return "NULL";
|
||||
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);
|
||||
if (type == typeof(byte[])) return $"hextoraw('{CommonUtils.BytesSqlRaw(value as byte[])}')";
|
||||
return FormatSql("{0}", value, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user