- 优化 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

@ -36,6 +36,7 @@ namespace FreeSql.Odbc.MySql
.WithTransaction(_transaction)
.NoneParameter(true) as Internal.CommonProvider.InsertProvider<T1>;
insert._source = data;
insert._noneParameterFlag = flagInsert ? "cuc" : "cu";
string sql = "";
if (IdentityColumn != null && flagInsert) sql = insert.ToSql();

View File

@ -17,6 +17,7 @@ namespace FreeSql.Odbc.MySql
{
_mysqlInsert = insert as OdbcMySqlInsert<T1>;
if (_mysqlInsert == null) throw new Exception("OnDuplicateKeyUpdate 是 FreeSql.Provider.Odbc/MySql 特有的功能");
if (_mysqlInsert._noneParameterFlag == "c") _mysqlInsert._noneParameterFlag = "cu";
}
protected void ClearData()

View File

@ -93,7 +93,7 @@ namespace FreeSql.Odbc.MySql
return columnName;
}
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, Type type, object value)
public override string GetNoneParamaterSqlValue(List<DbParameter> specialParams, string specialParamFlag, Type type, object value)
{
if (value == null) return "NULL";
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);