Changes between Initial Version and Version 1 of Ticket #31792, comment 1


Ignore:
Timestamp:
Jul 15, 2020, 10:50:01 AM (4 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31792, comment 1

    initial v1  
    33The 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`.
    44
    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 could path could benefit from optimizations such as #24296.
     5Ideally 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.
Back to Top