Opened 9 years ago
Last modified 5 months ago
#24267 assigned Cleanup/optimization
Simplify Query.build_filter()
Reported by: | Anssi Kääriäinen | Owned by: | Simon Charette |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (4)
comment:1 Changed 9 years ago by
Has patch: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
comment:3 Changed 8 years ago by
Has patch: | unset |
---|---|
Patch needs improvement: | unset |
comment:4 Changed 5 months ago by
Owner: | changed from nobody to Simon Charette |
---|---|
Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.
PR (currently has a test failure)