Need Help: `ilike` Function Not Returning Expected Results in Drizzle ORM
Hello Drizzle ORM Community!
I'm currently working with Drizzle ORM in a TypeScript environment using PostgreSQL (specifically, Neon PostgreSQL) and I've encountered a small issue with querying user data using the
Here's the snippet of my code where I implement the query:
I pass the query parameter as jack expecting to retrieve users with names like Jackson Kasi, but instead, I receive an empty array. According to the Drizzle ORM documentation, the
However, my current implementation doesn't seem to function as expected. Does anyone have experience with this function or can spot what I might be doing wrong? Any suggestions on how to properly use
Thank you in advance for your help!
I'm currently working with Drizzle ORM in a TypeScript environment using PostgreSQL (specifically, Neon PostgreSQL) and I've encountered a small issue with querying user data using the
ilike function for case-insensitive matching. I'm attempting to query tbl_users based on partial user names, but I'm not getting the expected results.Here's the snippet of my code where I implement the query:
I pass the query parameter as jack expecting to retrieve users with names like Jackson Kasi, but instead, I receive an empty array. According to the Drizzle ORM documentation, the
ilike should work for PostgreSQL like so:However, my current implementation doesn't seem to function as expected. Does anyone have experience with this function or can spot what I might be doing wrong? Any suggestions on how to properly use
ilike with findMany or corrections to my approach would be greatly appreciated!Thank you in advance for your help!