mblarsen/laravel-repository

Find syntax for exact match for filters

mblarsen opened this issue · 1 comments

E.g:

  1. filters[name!]=joe ! mark after key
  2. filters[Name]=joe capital key name
  3. exactFilters[name]=joe Different array
  4. filters[name]=joe*' Be exact by default and require *` to match with LIKE

§1 is my current favourite a close second is §2.

§3 requires too much duplication of code that has to pass through all implementations.

§4 this is the inverted solution. My gut tells me that most of the time filtering is done as a search and not a perfect match.

§2 can be troublesome as some string-handling is being done along the way, which would require to be sensitive to the TitleCase.