drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: InArray does not support using multiple columns
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Feature hasn't been suggested before.
- [X] I have verified this feature I'm about to request hasn't been suggested before.
### Describe the enhancement you want to request
I ran into a case where I need to use multiple columns with IN and drizzle does not seem to support it yet. Following would be an example usage:
```ts
db.select()
.from(usersTable)
.where(
inArray(
[usersTable.name, usersTable.age],
[
['John', 20],
['Bob', 25]
]
)
);
```
And generated query would be as follows:
```sql
SELECT * FROM users WHERE (name, age) IN (('John', 20), ('Bob', 25));
```
In this case, it would be ideal to infer the type of the 2D array as `[string, number][]` if possible. Also it would be great to see this implemented with `notInArray` too. Thanks in advance
Contributor guide
Assessment
This issue has not been assessed yet.