drizzle-team/drizzle-orm

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

Open

#1 818 ouverte le 21 janv. 2024

Voir sur GitHub
 (11 commentaires) (2 réactions) (0 assignés)TypeScript (357 forks)batch import
good first issueimprovementpriorityqb/crud

Métriques du dépôt

Stars
 (16 414 stars)
Métriques de merge PR
 (Merge moyen 10j 10h) (9 PRs mergées en 30 j)

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

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

Guide contributeur