- Handle empty result sets in CTEs (#92).
- Fix
.explain()
in Django >= 4.0 (#91). - Fixed bug in deferred loading (#90).
- Work around changes in Django 4.2 that broke CTE queries due to internally generated column aliases in the query compiler. The workaround is not always effective. Some queries will produce mal-formed SQL. For example, CTE queries with window functions.
- Fix:
.update()
did not work when using CTE manager or when accessing nested tables.
- Add support for Materialized CTEs.
- Fix: add EXPLAIN clause in correct position when using
.explain()
method.
- Fix compatibility with non-CTE models.
- Add support for Django 3.1, 3.2 and 4.0.
- Quote the CTE table name if needed.
- Resolve
OuterRef
in CTESubquery
. - Fix default
CTEManager
so it can usefrom_queryset
corectly. - Fix for Django 3.0.5+.
- Django 3 compatibility. Thank you @tim-schilling and @ryanhiebert!
- Python 3 compatibility.
- Fix CTE alias bug.
- Use
_default_manager
instead ofobjects
.
- Fix recursive CTE pickling. Note: this is currently broken on Django master.
With.queryset()
now uses the CTE model's manager to create a newQuerySet
, which makes it easier to work with customQuerySet
classes.
- BACKWARD INCOMPATIBLE CHANGE:
With.queryset()
no longer accepts amodel
argument. - Improve
With.queryset()
to select directly from the CTE rather than joining to anoter QuerySet. - Refactor
With.join()
to use real JOIN clause.
- Fix related field attname masking CTE column.
- Add
django_cte.raw.raw_cte_sql
for constructing CTEs with raw SQL.
- Improve error on bad recursive reference.
- Add more tests.
- Add change log.
- Improve README.
- PEP-8 style fixes.
- Fix readme formatting on PyPI.
- Initial implementation.