[Django] #24267: Simplify Query.build_filter()

16 views
Skip to first unread message

Django

unread,
Feb 3, 2015, 3:08:31 AM2/3/15
to django-...@googlegroups.com
#24267: Simplify Query.build_filter()
-------------------------------------+-------------------------------------
Reporter: akaariai | 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 |
-------------------------------------+-------------------------------------
Now that the old way of building lookups isn't supported any more, we
could restructure build_filter(). Steps included:
- Remove related field's get_lookup_constraint(), instead write proper
lookups for relational fields, too.
- Do not use lookup_name in build_filter(), instead use Lookup flags
where needed.
- Ultimate goal could be usage of resolve_ref() in build_filter()
instead of direct use of setup_joins(). In this case build_filter() would
be simplified a lot. It is uncertain if this goal is achievable.

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

Django

unread,
Feb 3, 2015, 1:15:09 PM2/3/15
to django-...@googlegroups.com
#24267: Simplify Query.build_filter()
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: new
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: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/4036 PR] (currently has a test
failure)

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

Django

unread,
Mar 25, 2015, 8:06:06 AM3/25/15
to django-...@googlegroups.com
#24267: Simplify Query.build_filter()
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: new
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: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"b68212f539f206679580afbfd008e7d329c9cd31" b68212f]:
{{{
#!CommitTicketReference repository=""
revision="b68212f539f206679580afbfd008e7d329c9cd31"
Refs #24267 -- Implemented lookups for related fields

Previously related fields didn't implement get_lookup, instead
related fields were treated specially. This commit removed some of
the special handling. In particular, related fields return Lookup
instances now, too.

Other notable changes in this commit is removal of support for
annotations in names_to_path().
}}}

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

Django

unread,
Apr 23, 2015, 10:33:22 AM4/23/15
to django-...@googlegroups.com
#24267: Simplify Query.build_filter()
-------------------------------------+-------------------------------------
Reporter: akaariai | 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):

* needs_better_patch: 1 => 0
* has_patch: 1 => 0


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

Django

unread,
Apr 24, 2023, 10:42:27 PM4/24/23
to django-...@googlegroups.com
#24267: Simplify Query.build_filter()
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev

(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 Simon Charette):

* owner: nobody => Simon Charette
* status: new => assigned


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

Reply all
Reply to author
Forward
0 new messages