drizzle-team / drizzle-team/drizzle-orm

[BUG]: `not` type doesn't work with `and` and `or`

Open
#1,818 13 comments 2 reactions 0 assignees View on GitHub
good first issue improvement priority qb/crud
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?

0.29.3

### What version of `drizzle-kit` are you using?

0.20.9

### Describe the Bug

```ts
await db.query.users.findMany({
where: not(and(ilike(users.name, '%asdf%')))
})
```
This gives a type error. If you cast the `and` expression as `SQLWrapper` it works properly.

### Expected behavior

`not` should accept SQL

### Environment & setup

_No response_

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.