- 修复 Pgsql 批量更新使用 NoneParameter 后日期类型的语法 bug;

This commit is contained in:
28810
2019-08-23 18:17:17 +08:00
parent 858e3d3dbb
commit 8e33d80b5a
7 changed files with 52 additions and 1 deletions

View File

@ -566,6 +566,7 @@ namespace FreeSql.Internal.CommonProvider
protected abstract void ToSqlCase(StringBuilder caseWhen, ColumnInfo[] primarys);
protected abstract void ToSqlWhen(StringBuilder sb, ColumnInfo[] primarys, object d);
protected virtual void ToSqlCaseWhenEnd(StringBuilder sb, ColumnInfo col) { }
public IUpdate<T1> AsTable(Func<string, string> tableRule)
{
@ -658,7 +659,11 @@ namespace FreeSql.Internal.CommonProvider
if (isnull == false) isnull = value == null || value == DBNull.Value;
}
cwsb.Append(" END");
if (isnull == false) sb.Append(cwsb.ToString());
if (isnull == false)
{
ToSqlCaseWhenEnd(cwsb, col);
sb.Append(cwsb.ToString());
}
else sb.Append("NULL");
cwsb.Clear();