`null` is not assignable to nullable string column?

I'm trying to write a simple query but seem to be missing something. See the of my table in the attachment. key_2 and key_3 are marked as nullable in my drizzle schema. However in the where clause it still doesn't allow me to pass null values Argument of type 'null' is not assignable to parameter of type 'string | SQLWrapper'. Overload 2 of 3, '(left: Aliased<null>, right: SQLWrapper | null): SQL<unknown>', gave the following error.
No description
No description
2 Replies
Sillvva
Sillvva8mo ago
Use the isNull filter, rather than the eq filter.
Sillvva
Sillvva8mo ago
admin
PostgreSQL Tutorial
PostgreSQL IS NULL
In this tutorial, you will learn how to use the PostgreSQL IS NULL operator to check if a value is NULL or not.
Drizzle ORM - Filters
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Want results from more Discord servers?
Add your server