mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 优化 IUpdate ToSql;
This commit is contained in:
@ -177,6 +177,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
sb.Append(sql).Append("\r\n\r\n;\r\n\r\n");
|
||||
});
|
||||
if (sb.Length > 0) sb.Remove(sb.Length - 9, 9);
|
||||
if (sb.Length == 0) return null;
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
@ -797,6 +797,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
sb2.Append(sql).Append("\r\n\r\n;\r\n\r\n");
|
||||
});
|
||||
if (sb2.Length > 0) sb2.Remove(sb2.Length - 9, 9);
|
||||
if (sb2.Length == 0) return null;
|
||||
return sb2.ToString();
|
||||
}
|
||||
|
||||
@ -866,6 +867,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
public virtual void ToSqlExtension110(StringBuilder sb, bool isAsTableSplited)
|
||||
{
|
||||
if (_where.Length == 0 && _source.Any() == false) return;
|
||||
if (_source.Any() == false && _set.Length == 0 && _setIncr.Length == 0) return;
|
||||
|
||||
if (_table.AsTableImpl != null && isAsTableSplited == false && _source == _sourceOld && _source.Any())
|
||||
{
|
||||
|
Reference in New Issue
Block a user