Opened 10 years ago
Closed 10 years ago
#24268 closed Cleanup/optimization (fixed)
Remove Query.having
Reported by: | Anssi Kääriäinen | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Instead of Query.having and Query.where we could instead use Query.where only, and then split that to where and having parts in the compiler.
The main reason for doing the split in compiler is that we gain a bit simpler Query class without any significant complications to the where class.
There are other cases, too, where such a split would be needed. For example, window aggregates can't be filtered on the same query level. So, qs.filter(row_num__lte=10)
would need to be splitted into an outer query's where clause.
Change History (3)
comment:1 by , 10 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
PR