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
--
Ticket URL: <https://code.djangoproject.com/ticket/24854>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:1>
* owner: nobody => marissazhou
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:2>
* owner: marissazhou =>
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:3>
* cc: JMGordon (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:4>
* owner: => Ian-Foote
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:5>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"698be78d7438aade49d3cac5ea1f9de219d33e42" 698be78]:
{{{
#!CommitTicketReference repository=""
revision="698be78d7438aade49d3cac5ea1f9de219d33e42"
Fixed #24854 -- Refactored QuerySet._values
Added django.db.models.sql.query.Query.set_values() method to handle
query mutation.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:7>