Opened 17 years ago
Closed 17 years ago
#5499 closed (wontfix)
INTERSECT Query in DB-API
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | db api intersect | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In my example, I have a model called Event. I have a search box and want to search against 3 fields of the model: title, tags and text. When the user types "keg" in the box, all events that have "keg" in their title OR tags OR text will be displayed. If the user types "keg" and "ger" in the box, then all events that both have "keg" and "ger" in their title OR tags OR text will be displayed.
As a result, the queries must be intersected to do achieve this. It would be nice if we could have a intersect() function in the DB-API.
I think you're well into the custom SQL zone here...