[Django] #24854: Clean up django.db.models.query._values()

15 views
Skip to first unread message

Django

unread,
May 25, 2015, 8:28:25 PM5/25/15
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/24854>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 25, 2015, 8:36:38 PM5/25/15
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:1>

Django

unread,
Jun 5, 2015, 6:20:31 AM6/5/15
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner:
Type: | marissazhou
Cleanup/optimization | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by marissazhou):

* owner: nobody => marissazhou
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:2>

Django

unread,
Jun 5, 2015, 10:03:04 AM6/5/15
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner:
Type: | Status: new
Cleanup/optimization |

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by marissazhou):

* owner: marissazhou =>
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:3>

Django

unread,
Jul 26, 2015, 3:45:45 AM7/26/15
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner:
Type: | Status: new
Cleanup/optimization |

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by JMGordon):

* cc: JMGordon (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:4>

Django

unread,
Aug 15, 2016, 1:10:45 AM8/15/16
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: Ian-Foote
Type: | Status: assigned

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ian-Foote):

* owner: => Ian-Foote


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:5>

Django

unread,
Aug 15, 2016, 1:54:50 AM8/15/16
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: Ian-Foote
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ian-Foote):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24854#comment:6>

Django

unread,
Aug 15, 2016, 8:04:35 PM8/15/16
to django-...@googlegroups.com
#24854: Clean up django.db.models.query._values()
-------------------------------------+-------------------------------------
Reporter: jarshwah | Owner: Ian-Foote
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Markus Holtermann <info@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages