thevahidal / soul

🕉 A SQLite REST and realtime server
https://thevahidal.github.io/soul/
MIT License
1.45k stars 50 forks source link

Introduce `_like` filter #112

Open IanMayo opened 1 year ago

IanMayo commented 1 year ago

Is your feature request related to a problem? Please describe. No.

The original implementation of _filter was ambiguous. The spec reported that it did an equals match, but the code (and jsdoc) performed a like "%q%" match.

A previous PR (#102) resolved the issue, switching _filter to use equals. But @thevahidal recommended introducing an issue to restore the capability of text-based wildcard searches.

Describe the solution you'd like Introduce a new _like filter that performs a ILIKE match (case independent wildcard search), to allow wildcard text-based searches.

The url will look like:

/api/tables/customers/rows?_like=FirstName:Franc

Note: the param should accept multiple specified matches, like the _filters query param does.

Describe alternatives you've considered Did not identify any.

thevahidal commented 12 months ago

As we talked earlier it's a good-to-have feature for Soul, and we can add it to our queue.