drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: sql.append() should accept undefined
Open
enhancement
priority
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
It's currently not possible to do something like this:
```
let whereStatement = sql.empty()
whereStatement.append(or(eq(profile.id, "1"),eq(profile.slug, "jon"))
```
That is because `append()` only accepts `SQL` whereas `or()` and `and()` return `SQL | undefined`.
Expected behavior: Pass `undefined` to `append()` and that value will be ignored.
Contributor guide
Assessment
This issue has not been assessed yet.