mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 优化 IUpdate.Set(xx, null) 的情况;
This commit is contained in:
parent
86d2c57f82
commit
f295f2cd1a
@ -655,6 +655,11 @@ namespace FreeSql.Internal.CommonProvider
|
|||||||
if (col.Attribute.MapType == col.CsType) val = value;
|
if (col.Attribute.MapType == col.CsType) val = value;
|
||||||
else val = Utils.GetDataReaderValue(col.Attribute.MapType, value);
|
else val = Utils.GetDataReaderValue(col.Attribute.MapType, value);
|
||||||
_set.Append(", ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ");
|
_set.Append(", ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ");
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
_set.Append("NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(_params, "u", col, col.Attribute.MapType, val) :
|
var colsql = _noneParameter ? _commonUtils.GetNoneParamaterSqlValue(_params, "u", col, col.Attribute.MapType, val) :
|
||||||
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"p_{_params.Count}"));
|
_commonUtils.QuoteWriteParamterAdapter(col.Attribute.MapType, _commonUtils.QuoteParamterName($"p_{_params.Count}"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user