Changes between Initial Version and Version 1 of Ticket #31792, comment 1
- Timestamp:
- Jul 15, 2020, 10:50:01 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31792, comment 1
initial v1 3 3 The logic to clear the column is a bit more complex than what you've described here but it's all detailed in `Query.has_results` [https://github.com/django/django/blob/156a2138db20abc89933121e4ff2ee2ce56a173a/django/db/models/sql/query.py#L526-L535 (link)] and `SQLCompiler.has_results` [https://github.com/django/django/blob/156a2138db20abc89933121e4ff2ee2ce56a173a/django/db/models/sql/compiler.py#L1129-L1130 (link)] so it could be added to `Exists.as_sql`. 4 4 5 Ideally the logic would be encapsulated in a `Query` method so it doesn't have to be duplicated in `Query.has_results` and `Exists.as_sql` so both couldpath could benefit from optimizations such as #24296.5 Ideally the logic would be encapsulated in a `Query` method so it doesn't have to be duplicated in `Query.has_results` and `Exists.as_sql` so both path could benefit from optimizations such as #24296.