Update oracle

This commit is contained in:
sunkaixuan
2022-03-26 20:49:08 +08:00
parent 8ef7f0f8bf
commit 7bf085d3e7

View File

@@ -65,7 +65,7 @@ namespace SqlSugar
batchInsetrSql.Append("("); batchInsetrSql.Append("(");
insertColumns = string.Join(",", item.Select(it =>FormatValue(it.Value))); insertColumns = string.Join(",", item.Select(it =>FormatValue(it.Value,it.PropertyName)));
batchInsetrSql.Append(insertColumns); batchInsetrSql.Append(insertColumns);
if (identities.HasValue()) if (identities.HasValue())
{ {
@@ -99,7 +99,8 @@ namespace SqlSugar
return result; return result;
} }
} }
public override object FormatValue(object value) int i = 0;
public object FormatValue(object value,string name)
{ {
if (value == null) if (value == null)
{ {
@@ -144,7 +145,10 @@ namespace SqlSugar
{ {
if (value.ToString().Length > 2000) if (value.ToString().Length > 2000)
{ {
return "to_clob('" + value.ToString().ToSqlFilter() + "')"; ++i;
var parameterName = this.Builder.SqlParameterKeyWord + name + i;
this.Parameters.Add(new SugarParameter(parameterName, value));
return parameterName;
} }
else else
{ {