- 优化 NoneParameter Oracle 文本超长的问题;

This commit is contained in:
28810
2020-08-10 17:57:29 +08:00
parent d602dfbaaa
commit 93562fd802
39 changed files with 129 additions and 249 deletions

View File

@ -71,7 +71,7 @@ namespace FreeSql.Oracle.Curd
object val = col.GetMapValue(d);
if (val == null && col.Attribute.IsNullable == false) val = col.CsType == typeof(string) ? "" : Utils.GetDataReaderValue(col.CsType.NullableTypeOrThis(), null);//#384
if (_noneParameter)
sb.Append(_commonUtils.GetNoneParamaterSqlValue(specialParams, col.Attribute.MapType, val));
sb.Append(_commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col.Attribute.MapType, val));
else
{
sb.Append(_commonUtils.QuoteWriteParamter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}")));
@ -83,6 +83,7 @@ namespace FreeSql.Oracle.Curd
sb.Append(")");
++didx;
}
if (_noneParameter && specialParams.Any()) _params = specialParams.ToArray();
if (_source.Count > 1) sb.Append("\r\n SELECT 1 FROM DUAL");
return sb.ToString();
}