Skip to content

Commit

Permalink
Re-introduction of GeneratePseudoFromClause for specific "empty" FROM…
Browse files Browse the repository at this point in the history
… clauses.
  • Loading branch information
cincuranet authored and ajcvickers committed Nov 26, 2019
1 parent 93d5bfb commit 67b36d3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/EFCore.Relational/Query/QuerySqlGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ protected override Expression VisitSelect(SelectExpression selectExpression)

GenerateList(selectExpression.Tables, e => Visit(e), sql => sql.AppendLine());
}
else
{
GeneratePseudoFromClause();
}

if (selectExpression.Predicate != null)
{
Expand Down Expand Up @@ -193,6 +197,14 @@ protected override Expression VisitSelect(SelectExpression selectExpression)
return selectExpression;
}

/// <summary>
/// Generates a pseudo FROM clause. Required by some providers
/// when a query has no actual FROM clause.
/// </summary>
protected virtual void GeneratePseudoFromClause()
{
}

protected override Expression VisitProjection(ProjectionExpression projectionExpression)
{
Visit(projectionExpression.Expression);
Expand Down

0 comments on commit 67b36d3

Please sign in to comment.