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

贡献者指南

[BUG]: `not` type doesn't work with `and` and `or` · drizzle-team/drizzle-orm#1818 | Good First Issue