inArray not working as expected
This works but looks like a (sql injection)
const tagsArray = selectedTags.map((tag) =>
where.push(sql
Why doesn't this just work (tm)?
where.push(inArray(tagData.tags, selectedTags));
const tagsArray = selectedTags.map((tag) =>
'${tag}').join(', ');where.push(sql
${tagData.tags} @> ARRAY[${sql.raw(tagsArray)}]::text[]);Why doesn't this just work (tm)?
where.push(inArray(tagData.tags, selectedTags));