Drizzle TeamDT
Drizzle Teamβ€’15mo ago
tcurdt

inArray not working as expected

This works but looks like a (sql injection)

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));
Was this page helpful?