DT
Join ServerDrizzle Team
help
InArray Function not Working
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
What version of drizzle-orm are you using?
0.17.6
drizzle-orm
not drizzle-kit
0.25.4
will reopen this issue and fix asap
Okay thanks
is there a way to do the inArray function in raw SQL for now?
yes
.where(sql`${table.column} in (${}, ${})`)
use column and values you need in templates
could I do ${(,)} or do the brackets have to be strings?
each string should be separate template
to make proper query parameterizing
aight then I wont use In cuz i need a way to search an unknown length of variables
oh wait u can just pass an array in the sql statement
yes, array param should be parens-escaped automatically