- 增加 IInsertOrUpdate.SetSource(sql) 重载方法;

This commit is contained in:
2881099
2022-08-17 19:49:54 +08:00
parent 4829df9573
commit e12f6e04a2
26 changed files with 245 additions and 76 deletions

View File

@ -17,10 +17,11 @@ namespace FreeSql.Odbc.Dameng
public override string ToSql()
{
var dbParams = new List<DbParameter>();
if (_sourceSql != null) return getMergeSql(null);
if (_source?.Any() != true) return null;
var sqls = new string[2];
var dbParams = new List<DbParameter>();
var ds = SplitSourceByIdentityValueIsNull(_source);
if (ds.Item1.Any()) sqls[0] = string.Join("\r\n\r\n;\r\n\r\n", ds.Item1.Select(a => getMergeSql(a)));
if (ds.Item2.Any()) sqls[1] = string.Join("\r\n\r\n;\r\n\r\n", ds.Item2.Select(a => getInsertSql(a)));