drizzle-team/drizzle-orm

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

Open

#1,818 建立於 2024年1月21日

在 GitHub 查看
 (11 留言) (2 反應) (0 負責人)TypeScript (16,414 star) (357 fork)batch import
good first issueimprovementpriorityqb/crud

描述

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

貢獻者指南