Opened 6 years ago

Closed 6 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: master
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 Changed 6 years ago by Loic Bistuer

Has patch: set
Status: newassigned

comment:2 Changed 6 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

comment:4 Changed 6 years ago by Loic Bistuer <loic.bistuer@…>

Resolution: fixed
Status: assignedclosed

In 4c3bfe9053766d378999d06ec34ee5fd4e39f511:

Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().

Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.

Note: See TracTickets for help on using tickets.
Back to Top