My prisma model have these 2 string list properties
names String[]
phones String[] @unique
I want to query this table and along with many other search params, I want to find all records where any name or any phone contains a given value.
This for instance work, but only for phones matching the query value exactly
if (params.query) {
whereCondition = {
phones: {
has: params.query,
},
};
}
I think one can write raw sql, but would like to avoid that and do the above along with various other criteria building up a “where condition”