drizzle-team / drizzle-team/drizzle-orm
[BUG]: Array being passed as multiple params
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
latest
### What version of `drizzle-kit` are you using?
_No response_
### Describe the Bug
```ts
const selectedCategories = ['1', '2', '3']
db.query.transaction.findMany({
where: and(
eq(transaction.end_user_id, me.id),
sql`${transaction.category} = ANY(${selectedCategories}))`
),
})
```
Selected categories will be passed in as for separate params, rather than a single varchar array parameter into postgres, resulting in query failure. There doesn't seem to be a way to pass array param into drizzle at all
### Expected behavior
_No response_
### Environment & setup
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.