mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 优化 NoneParameter Oracle 文本超长的问题;
This commit is contained in:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user