Opened 7 years ago

Closed 5 years ago

#6827 closed (wontfix)

[Feature] Allow contains to work with lists

Reported by: dcramer Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A useful feature we had added in Curse's Django was a QUERY_TERM for "containswords". The more thought that I put into it, it would make more sense just to have contains allow for lists.

What this would do:

MyModel.objects.filter(name__contains=('hello', 'there'))

SELECT 1 FROM tbl WHERE (name LIKE '%hello%' AND name LIKE '%there%')

It was a pretty quick and useful feature to help with search.

Change History (4)

comment:1 Changed 7 years ago by dcramer

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from [Featured] Allow contains to work with lists to [Feature] Allow contains to work with lists

comment:2 Changed 7 years ago by anonymous

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by Simon Greenhill

Uh, that was me. Need to work out this login thing.

comment:4 Changed 5 years ago by subsume

  • Resolution set to wontfix
  • Status changed from new to closed

Closing this. There are a lot of other ways to achieve this and to me there's no reason why AND should be the default above OR.

PS: I have david's blessing

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