mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-09 15:17:57 +08:00
Update union all
This commit is contained in:
parent
b116962d11
commit
1e51138fa0
@ -520,9 +520,9 @@ namespace SqlSugar
|
|||||||
string sql = sqlObj.Key;
|
string sql = sqlObj.Key;
|
||||||
UtilMethods.RepairReplicationParameters(ref sql, sqlObj.Value.ToArray(), i, "UnionAll");
|
UtilMethods.RepairReplicationParameters(ref sql, sqlObj.Value.ToArray(), i, "UnionAll");
|
||||||
if (sqlObj.Value.HasValue())
|
if (sqlObj.Value.HasValue())
|
||||||
allItems.Add(new KeyValuePair<string, List<SugarParameter>>(sql, sqlObj.Value));
|
allItems.Add(new KeyValuePair<string, List<SugarParameter>>($" ( {sql} ) ", sqlObj.Value));
|
||||||
else
|
else
|
||||||
allItems.Add(new KeyValuePair<string, List<SugarParameter>>(sql, new List<SugarParameter>()));
|
allItems.Add(new KeyValuePair<string, List<SugarParameter>>($" ( {sql} ) ", new List<SugarParameter>()));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
var allSql = sqlBuilder.GetUnionAllSql(allItems.Select(it => it.Key).ToList());
|
var allSql = sqlBuilder.GetUnionAllSql(allItems.Select(it => it.Key).ToList());
|
||||||
|
Loading…
Reference in New Issue
Block a user