InArray Function not Working

FFil5/10/2023
Why is the drizzle Function inArray mapping my array from ['1ed01d30-d16d-4b8f-b5d0-01b2a5d94d13', '37fdf74f-4069-4eab-8eee-5ad282c66667'] to (('1ed01d30-d16d-4b8f-b5d0-01b2a5d94d13', '37fdf74f-4069-4eab-8eee-5ad282c66667')) the Double brackets are messing everything up what is goin on
ASAndrii Sherman5/10/2023
What version of drizzle-orm are you using?
FFil5/10/2023
0.17.6
ASAndrii Sherman5/10/2023
drizzle-orm
ASAndrii Sherman5/10/2023
not drizzle-kit
FFil5/10/2023
0.25.4
ASAndrii Sherman5/10/2023
ASAndrii Sherman5/10/2023
will reopen this issue and fix asap
FFil5/10/2023
Okay thanks
FFil5/10/2023
is there a way to do the inArray function in raw SQL for now?
ASAndrii Sherman5/10/2023
yes
ASAndrii Sherman5/10/2023
.where(sql`${table.column} in (${}, ${})`)
ASAndrii Sherman5/10/2023
use column and values you need in templates
FFil5/10/2023
could I do ${(,)} or do the brackets have to be strings?
ASAndrii Sherman5/10/2023
each string should be separate template
ASAndrii Sherman5/10/2023
to make proper query parameterizing
FFil5/10/2023
aight then I wont use In cuz i need a way to search an unknown length of variables
FFil5/10/2023
oh wait u can just pass an array in the sql statement
Bbloberenober5/10/2023
yes, array param should be parens-escaped automatically