Enhancement: add MultipleColumnsSearchFilter
scherbakovx opened this issue · 1 comments
Summary
There is SearchFilter
which accepts both searchField
and searchValue
. But I want to have another filter which accepts searchValue
from request and then constructs OR-query with specified value against pre-defined fields in ModelT.
Basic Example
/accounts?searchValue=Anton
should be converted to SELECT * FROM accounts WHERE first_name LIKE %Anton% OR last_name LIKE %Anton% or address.street_name LIKE %Anton%
first_name
, last_name
and address.street_name
come from attribute in Account model.
Drawbacks and Impact
No response
Unresolved questions
I'm not sure if this filter is required and there is no other way to implement what I need, but I'm 100% ready to implement it and make PR, so shall I?
Closing because it was added in v0.13.0: https://github.com/litestar-org/advanced-alchemy/releases/tag/v0.13.0