Browse Source

Merge branch 'SqlSugar5' of github.com:sunkaixuan/SqlSugar

pull/12/MERGE
skx 4 years ago
parent
commit
0a1f788901
  1. 18
      Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

18
Src/Asp.NetCore2/SqlSeverTest/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs

@ -467,7 +467,14 @@ 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);
return resulut.Select<T>(sqlBuilder.SqlSelectAll);
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()
{
@ -495,7 +502,14 @@ 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);
return resulut.Select<T>(sqlBuilder.SqlSelectAll);
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()
{

Loading…
Cancel
Save