mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-08-06 16:12:27 +08:00
Clickhouse 数组参数化测试
This commit is contained in:
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Globalization;
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using ClickHouse.Client.ADO.Parameters;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@ -18,7 +19,7 @@ namespace FreeSql.ClickHouse
|
||||
}
|
||||
|
||||
public override DbParameter AppendParamter(List<DbParameter> _params, string parameterName, ColumnInfo col, Type type, object value)
|
||||
{
|
||||
{
|
||||
if (value is string str)
|
||||
value = str?.Replace("\t", "\\t")
|
||||
.Replace("\r\n", "\\r\\n")
|
||||
@ -43,9 +44,10 @@ namespace FreeSql.ClickHouse
|
||||
if (col.DbScale != 0) ret.Scale = col.DbScale;
|
||||
break;
|
||||
}
|
||||
//直接使用Bool
|
||||
//if (value is bool)
|
||||
// ret.Value = (bool)value ? 1 : 0;
|
||||
//if (value.GetType().IsArray)
|
||||
//{
|
||||
// ret.DbType = DbType.Object;
|
||||
//}
|
||||
}
|
||||
_params?.Add(ret);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user