mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 20:57:58 +08:00
Update oracle no clob
This commit is contained in:
parent
08033bfc52
commit
12e9923b60
@ -33,10 +33,10 @@ namespace SqlSugar
|
|||||||
|
|
||||||
private string GetOracleUpdateColums(DbColumnInfo m)
|
private string GetOracleUpdateColums(DbColumnInfo m)
|
||||||
{
|
{
|
||||||
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(), FormatValue(m.Value,m.IsPrimarykey));
|
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(), FormatValue(m.Value,m.IsPrimarykey,m.PropertyName));
|
||||||
}
|
}
|
||||||
|
int i = 0;
|
||||||
public object FormatValue(object value,bool isPrimaryKey)
|
public object FormatValue(object value,bool isPrimaryKey,string name)
|
||||||
{
|
{
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
@ -87,7 +87,17 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else if (type == UtilConstants.StringType || type == UtilConstants.ObjType)
|
else if (type == UtilConstants.StringType || type == UtilConstants.ObjType)
|
||||||
{
|
{
|
||||||
return N + "'" + value.ToString().ToSqlFilter() + "'";
|
if (value.ToString().Length > 2000)
|
||||||
|
{
|
||||||
|
++i;
|
||||||
|
var parameterName = this.Builder.SqlParameterKeyWord + name + i;
|
||||||
|
this.Parameters.Add(new SugarParameter(parameterName, value));
|
||||||
|
return parameterName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return N + "'" + value.ToString().ToSqlFilter() + "'";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user