- 优化 Contains 表达式解析为 where in 自动拆分,防止大于 1000 的 SQL 错误;

This commit is contained in:
28810
2019-11-20 16:06:45 +08:00
parent d42b2fc2b8
commit 9f97d67cb2
32 changed files with 201 additions and 86 deletions

View File

@ -48,12 +48,8 @@ namespace FreeSql.Odbc.PostgreSQL
else if (param is TimeSpan || param is TimeSpan?)
return ((TimeSpan)param).Ticks / 10;
else if (param is IEnumerable)
{
var sb = new StringBuilder();
var ie = param as IEnumerable;
foreach (var z in ie) sb.Append(",").Append(AddslashesProcessParam(z, mapType, mapColumn));
return sb.Length == 0 ? "(NULL)" : sb.Remove(0, 1).Insert(0, "(").Append(")").ToString();
}
return AddslashesIEnumerable(param, mapType, mapColumn);
return string.Concat("'", param.ToString().Replace("'", "''"), "'");
}