Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

inq filter with case insensitive #4360

Open
engrwaqasali opened this issue May 14, 2023 · 1 comment
Open

inq filter with case insensitive #4360

engrwaqasali opened this issue May 14, 2023 · 1 comment
Labels

Comments

@engrwaqasali
Copy link

engrwaqasali commented May 14, 2023

whereBuilder.inq('country', ["Pakistan", "india"]);
how do i make this work for case insensitive so that i can get pakistan and Pakistan and INDIA and inDia you get the idea
something we do for like filter where we use ilike for case insensitive

@engrwaqasali
Copy link
Author

engrwaqasali commented May 14, 2023

currently I did it with regexp


const regex = new RegExp(countries.join('|'), 'i');    
whereBuilder.regexp('country', regex);


this seems more powerfull

cause it can match for United States, India

with input
["united", "India"]
["United STATEs", "ndia"]
["united sta", "ind"]
["states", "INDIA"]
["STates", "DIA"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant