Opened 10 years ago
Closed 10 years ago
#24211 closed Cleanup/optimization (fixed)
Remove ValuesQuerySet() and ValuesListQuerySet().
Reported by: | Loic Bistuer | Owned by: | Loic Bistuer |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Some QuerySet
methods rely on specialized querysets, namely: ValuesQuerySet()
, and ValuesListQuerySet()
(and previously DateQuerySet
, and DateTimeQuerySet
).
When we made custom QuerySet
a public API these were a major pain point and required a clunky system with dynamically generated classes and pickle magic.
We already got rid of DateQuerySet
and DateTimeQuerySet
and now is time to remove the remaining two.
The iteration logic can be cleanly implemented through composition (ModelIterator
, ValuesIterator
, etc.) and the rest can be moved onto the main QuerySet
class.
Change History (4)
comment:1 by , 10 years ago
Has patch: | set |
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
PR https://github.com/django/django/pull/3963.