mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 优化 varchar/nvarchar 的 NoneParameter 处理;#519
This commit is contained in:
		@@ -78,7 +78,7 @@ namespace FreeSql.Oracle.Curd
 | 
			
		||||
                        object val = col.GetDbValue(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, _noneParameterFlag, col.Attribute.MapType, val));
 | 
			
		||||
                            sb.Append(_commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col, col.Attribute.MapType, val));
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            sb.Append(_commonUtils.QuoteWriteParamter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}")));
 | 
			
		||||
@@ -143,7 +143,7 @@ namespace FreeSql.Oracle.Curd
 | 
			
		||||
                        object val = col.GetDbValue(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, _noneParameterFlag, col.Attribute.MapType, val));
 | 
			
		||||
                            sb.Append(_commonUtils.GetNoneParamaterSqlValue(specialParams, _noneParameterFlag, col, col.Attribute.MapType, val));
 | 
			
		||||
                        else
 | 
			
		||||
                        {
 | 
			
		||||
                            sb.Append(_commonUtils.QuoteWriteParamter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"{col.CsName}_{didx}")));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user