Changes between Initial Version and Version 2 of Ticket #23662
- Timestamp:
- Oct 16, 2014, 4:04:56 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23662
- Property Component Uncategorized → Database layer (models, ORM)
- Property Has patch set
- Property Type Uncategorized → Cleanup/optimization
- Property UI/UX set
-
Ticket #23662 – Description
initial v2 1 1 Current implementation: 2 2 https://github.com/django/django/blob/master/django/db/models/query.py 3 4 {{{ 3 5 class QuerySet(object): 4 6 ... … … 10 12 self._fetch_all() 11 13 return len(self._result_cache) 14 }}} 12 15 13 16 These methods call self._fetch_all(), thus evaluating the queryset. Although, this behaviour is documented (https://docs.djangoproject.com/en/1.7/ref/models/querysets/#when-querysets-are-evaluated), it is not obvious.