Opened 10 years ago

Closed 8 years ago

#24854 closed Cleanup/optimization (fixed)

Clean up django.db.models.query._values()

Reported by: Josh Smeaton Owned by: Ian Foote
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: josh.smeaton@…, Joseph Gordon Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The django.db.models.query._values() method looks like it does much more than it should be doing in the frontend query class. We should try to move most of the method into django.db.models.sql.query so that other backends are able to have a better chance of replacing it's functionality.

It might also be worth seeing how much of the method can be factored with sql.has_results since they both setup the query in similar ways.

This comment sparked the idea: https://github.com/django/django/pull/4706#issuecomment-105130864

Change History (7)

comment:1 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted

comment:2 by MZ, 9 years ago

Owner: changed from nobody to MZ
Status: newassigned

comment:3 by MZ, 9 years ago

Owner: MZ removed
Status: assignednew

comment:4 by Joseph Gordon, 9 years ago

Cc: Joseph Gordon added

comment:5 by Ian Foote, 8 years ago

Owner: set to Ian Foote
Status: newassigned

comment:6 by Ian Foote, 8 years ago

Has patch: set
Version 0, edited 8 years ago by Ian Foote (next)

comment:7 by Markus Holtermann <info@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 698be78:

Fixed #24854 -- Refactored QuerySet._values

Added django.db.models.sql.query.Query.set_values() method to handle
query mutation.

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