mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 04:13:48 +08:00
Optimize nested queries
This commit is contained in:
parent
846ae8f651
commit
757a938c93
@ -2396,9 +2396,12 @@ namespace SqlSugar
|
||||
|
||||
private bool MasterHasWhereFirstJoin()
|
||||
{
|
||||
if (this.QueryBuilder.IsSingle() == false && this.QueryBuilder.SelectValue is Expression&&this.QueryBuilder.AsTables?.Any()==false)
|
||||
if (this.QueryBuilder.IsSingle() == false && this.QueryBuilder.SelectValue is LambdaExpression exp &&this.QueryBuilder.AsTables?.Any()==false)
|
||||
{
|
||||
return true;
|
||||
if (exp.Parameters.Count == this.QueryBuilder.JoinQueryInfos.Count)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return this.QueryBuilder.JoinIndex == 0 &&
|
||||
this.QueryBuilder.IsSqlQuery == false &&
|
||||
|
Loading…
Reference in New Issue
Block a user