django-cachalot/cachalot
Dominik Bartenstein 76d4ab4c8d
Simplify annotation handling by using the flatten method: (#197)
* Simplify annotation handling by using the flatten method:
f42ccdd835/django/db/models/expressions.py (L370)

Handle annotated cases when Subquery is part of the When.

* Before Django 3.2 flatten did not check for existence of flatten in the processed nodes.

* Add type BaseExpression to function "flatten".

* Add test case with annotated Coalesce.

* Add support for annotated raw SQL.

* Remove unnecessary code.

* Use as_sql instead of repr.

* Reorganize code

* Fix var name

* Improve naming: element -> expression

Co-authored-by: Dominik Bartenstein <db@zemtu.com>
Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
2021-08-21 20:55:01 -04:00
..
management Modernizes the manage.py command. 2016-07-21 10:56:23 +02:00
templates/cachalot Small fixes in the debug toolbar panel. 2014-12-09 03:17:59 +01:00
templatetags Adds Django 2.0 support. 2018-05-04 20:26:26 +02:00
tests Simplify annotation handling by using the flatten method: (#197) 2021-08-21 20:55:01 -04:00
__init__.py Bump version [ci skip] 2021-05-26 22:58:44 -04:00
api.py Fix cachalot_disabled (#174) 2021-03-30 18:44:47 -04:00
apps.py Add Django 3.2 Support and drop error dependency check (#181) 2021-05-13 00:27:14 -04:00
cache.py Drop Python 2.7 and Dj 1.11 2020-06-18 09:28:00 -04:00
jinja2ext.py Renames the Jinja2 extension for Python 2.7 compatibility. 2016-09-13 20:30:18 +02:00
models.py Looks like optional models.py are not really optional… Django is buggy… 2015-10-03 00:47:44 +02:00
monkey_patch.py Add Django 3.2 Support and drop error dependency check (#181) 2021-05-13 00:27:14 -04:00
panels.py Drop Python 2.7 and Dj 1.11 2020-06-18 09:28:00 -04:00
settings.py Add CACHALOT_ONLY_CACHABLE_APPS & CACHALOT_UNCACHABLE_APPS (Fixes #186) (#187) 2021-05-24 22:46:00 -04:00
signals.py Remove deprecated signal argument (#165) 2020-10-16 10:39:20 -04:00
transaction.py Drop Python 2.7 and Dj 1.11 2020-06-18 09:28:00 -04:00
utils.py Simplify annotation handling by using the flatten method: (#197) 2021-08-21 20:55:01 -04:00