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
12 Replies
What version of drizzle-orm are you using?
0.17.6
drizzle-orm
not drizzle-kit
0.25.4
Seems like a regression from 0.23.6
https://github.com/drizzle-team/drizzle-orm/issues/382
GitHub
[BUG]: "inArray" operator doesn't work as expected · Issue #382 · d...
What version of drizzle-orm are you using? 0.23.5 Describe the Bug
will reopen this issue and fix asap
Okay thanks
is there a way to do the inArray function in raw SQL for now?
yes
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