drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: Multiple union / unionAll

Open
#2,490 3 comments 5 reactions 1 assignee Claimed by @Angelelz View on GitHub
enhancement 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

Currently only 2 queries are corretly combined to a union.

When you add a third query, the first two are wrapped with () and all wrapped too, that doesn't work.

Example (current result of drizzle), when `unionAll(query1, query2, query3)`

```
(
(
SELECT ...
)
UNION ALL
(
SELECT ...
)
)
UNION ALL
(
SELECT ...
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.