mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
-
This commit is contained in:
parent
0a1f788901
commit
185e5349fc
@ -467,8 +467,15 @@ namespace SqlSugar
|
||||
var allParameters = allItems.SelectMany(it => it.Value).ToArray();
|
||||
var resulut = this.Context.Queryable<ExpandoObject>().AS(UtilMethods.GetPackTable(allSql, "unionTable")).With(SqlWith.Null);
|
||||
resulut.AddParameters(allParameters);
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.Oracle && sqlBuilder.SqlSelectAll == "*")
|
||||
{
|
||||
return resulut.Select<T>("unionTable.*");
|
||||
}
|
||||
else
|
||||
{
|
||||
return resulut.Select<T>(sqlBuilder.SqlSelectAll);
|
||||
}
|
||||
}
|
||||
public virtual ISugarQueryable<T> UnionAll<T>(List<ISugarQueryable<T>> queryables) where T : class, new()
|
||||
{
|
||||
Check.Exception(queryables.IsNullOrEmpty(), "UnionAll.queryables is null ");
|
||||
@ -495,8 +502,15 @@ namespace SqlSugar
|
||||
var allParameters = allItems.SelectMany(it => it.Value).ToArray();
|
||||
var resulut = this.Context.Queryable<ExpandoObject>().AS(UtilMethods.GetPackTable(allSql, "unionTable")).With(SqlWith.Null);
|
||||
resulut.AddParameters(allParameters);
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.Oracle && sqlBuilder.SqlSelectAll == "*")
|
||||
{
|
||||
return resulut.Select<T>("unionTable.*");
|
||||
}
|
||||
else
|
||||
{
|
||||
return resulut.Select<T>(sqlBuilder.SqlSelectAll);
|
||||
}
|
||||
}
|
||||
public virtual ISugarQueryable<T> Union<T>(List<ISugarQueryable<T>> queryables) where T : class, new()
|
||||
{
|
||||
Check.Exception(queryables.IsNullOrEmpty(), "Union.queryables is null ");
|
||||
@ -936,7 +950,8 @@ namespace SqlSugar
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.CurrentConnectionConfig.DbType == DbType.Oracle) {
|
||||
if (this.CurrentConnectionConfig.DbType == DbType.Oracle)
|
||||
{
|
||||
throw new Exception("Oracle no support SaveQueues");
|
||||
}
|
||||
if (this.Queues == null || this.Queues.Count == 0) return default(T);
|
||||
|
Loading…
Reference in New Issue
Block a user