Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ilike operator breaks with numeric column #918

Open
natoszme opened this issue May 6, 2024 · 4 comments
Open

ilike operator breaks with numeric column #918

natoszme opened this issue May 6, 2024 · 4 comments
Labels
bug Something isn't working will accept PR

Comments

@natoszme
Copy link

natoszme commented May 6, 2024

Hi there!

First of all, thank you for such a great library!

I started to use it a couple of days ago and I'd like to know whether it's possible to add operators to the search param.

My use case is as follows: I want to be able to search by a string with several words, and since search doesn't support $in operator, it's doing the default like with %{string}% comparison but with the full string (with spaces). Each word is a sub-string I want to search in a different column (that's why supporting $in operator in search would be a possible solution).

I tried manually doing the filter in the client, specifying each searchableColumn as a separate filter query param, but the numeric columns break (I want my search input to support id's, which works great with the search feature) .

Maybe there is a different approach to this problem using already existing features?

Thanks!

@ppetzold
Copy link
Owner

.Oh I see - would consider this a bug of the $ilike operator then. should add string/text cast.

happy to accept PR :)

@ppetzold ppetzold changed the title Search operators ilike operator breaks with numeric column May 17, 2024
@ppetzold ppetzold added bug Something isn't working will accept PR labels May 17, 2024
@bountyhub-bot
Copy link

🚀 Bounty Alert!

💰 A bounty of $10.00 has been created by omarsoufiane on BountyHub.

🔗 Claim this bounty by submitting a pull request that solves the issue!

Good luck, and happy coding! 💻

@sambhavnoobcoder
Copy link
Contributor

Notification: This issue has been resolved with a Pull Request and a corresponding claim has been submitted on BountyHub. Kindly review and process the claim at your earliest convenience.

Thank you for your prompt attention to this matter.

@omarsoufiane
Copy link

@sambhavnoobcoder thanks for your contribution, it's now working

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working will accept PR
Projects
None yet
Development

No branches or pull requests

5 participants