Search on user's fullname

I have a user's table that stores first, middle and last names, I want to create another field named search that can be automatically calculated from these three fields. I saw something on the docs about something called full-text search, but I don't think that is is needed for my case, I just to be able to find users based on any part of their name provided. I am not a postgres expert, so I will appreciate any advice if I am wrong.
3 Replies
TOSL
TOSL3w ago
Probably use a combination of and/or and ilike filters in your where
Anas Badran
Anas BadranOP3w ago
that's an option, but I don't want to repeat that for every table and query, I want to create a searchable column that combines the parts of the row that can be searched for. How do I create such column with drizzle
TOSL
TOSL3w ago
Drizzle ORM - Generated Columns
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.

Did you find this page helpful?