drizzle-team/drizzle-orm

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

Open

#1.818 geöffnet am 21. Jan. 2024

Auf GitHub ansehen
 (11 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)TypeScript (16.414 Stars) (357 Forks)batch import
good first issueimprovementpriorityqb/crud

Beschreibung

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

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