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 (357 fork)batch import
good first issueimprovementpriorityqb/crud

仓库指标

Star
 (16,414 star)
PR 合并指标
 (平均合并 10天 10小时) (30 天内合并 9 个 PR)

描述

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

贡献者指南