-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle left outer joins in versions before 4.0
Before Django 4.0, the `elide_empty` argument on the compiler did not exist. To ensure that left outer joins in these versions of Django are not optimized away by the SqlCompile, essentially the same behavior is added to the error handling in those versions of Django. This creates a copy of the CTE query, forces the where to have a always-false condition that the SqlCompiler cannot optimize away, and then builds the SQL for that query instead.
- Loading branch information
Showing
1 changed file
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters