drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Allow undefined inside union()
Open
improvement
qb/crud
qb/set-operators
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
It should be possible to do `union(query1, query2, undefined)`.
This would enable conditional logic in the same vein it's possible to use it in filters (e.g. `where(and(eq(id, 1), undefined))`
A side requirement of allowing `undefined` inside `union()` would be to allow passing just 1 argument to `union()`. Right now, it expects 2.
Contributor guide
Assessment
This issue has not been assessed yet.