drizzle-team/drizzle-orm

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

Open

#1818 aperta il 21 gen 2024

Vedi su GitHub
 (11 commenti) (2 reazioni) (0 assegnatari)TypeScript (357 fork)batch import
good first issueimprovementpriorityqb/crud

Metriche repository

Star
 (16.414 star)
Metriche merge PR
 (Merge medio 10g 10h) (9 PR mergiate in 30 g)

Descrizione

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

Guida contributor