Opened 4 years ago

Closed 14 months ago

#18931 closed New feature (wontfix)

Add predicate functionality to Q objects

Reported by: Preston Holmes Owned by: Preston Holmes
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

A predicate is condition that can be matched against some item to determine whether that item meets the condition.

Django has a relatively rich set of lookup terms that can be used in filtering a queryset.

What is proposed is a new behavior of a Q object, that allows the conditions described in the formation of a Q instance, to be tested agains a model instance.

The initial implementation of this was released separately:

https://github.com/ptone/django-predicate

Current work-in-progress to bring this into Django is here:

https://github.com/ptone/django/compare/master...q-predicate

Change History (3)

comment:1 Changed 4 years ago by Preston Holmes

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

This is now ready for more eyes to review

https://github.com/django/django/pull/388

comment:2 Changed 2 years ago by Tomek Paczkowski

Patch needs improvement: set

comment:3 Changed 14 months ago by Tim Graham

Resolution: wontfix
Status: newclosed

It seems like the improved lookups API has superseded this, at least for now.

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