mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-24 04:53:45 +08:00
Update Util.GetSqlString
This commit is contained in:
@@ -779,6 +779,17 @@ namespace SqlSugar
|
||||
{
|
||||
result = result.Replace(item.ParameterName, "0x" + BitConverter.ToString((byte[])item.Value));
|
||||
}
|
||||
else if (item.Value is bool)
|
||||
{
|
||||
if (connectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
result = result.Replace(item.ParameterName, (Convert.ToBoolean(item.Value) ? "true": "false") );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = result.Replace(item.ParameterName, (Convert.ToBoolean(item.Value) ? 1 : 0) + "");
|
||||
}
|
||||
}
|
||||
else if (item.Value.GetType() != UtilConstants.StringType && connectionConfig.DbType == DbType.PostgreSQL && PostgreSQLDbBind.MappingTypesConst.Any(x => x.Value.ToString().EqualCase(item.Value.GetType().Name)))
|
||||
{
|
||||
var type = PostgreSQLDbBind.MappingTypesConst.First(x => x.Value.ToString().EqualCase(item.Value.GetType().Name)).Key;
|
||||
|
Reference in New Issue
Block a user