How to check if is not null
Hello,
i want to find all users where name is not null. How to do in this situation?
i want to find all users where name is not null. How to do in this situation?
await db.query.users.findFirst({where: (users, { eq }) => eq(users.name, 'test')});SQL part:users.name = 'test' while also checking if the users.name is not null. The first query should be enough (since test != null)await db.query.users.findFirst({where: (users, { eq }) => and(eq(users.name, 'test'), isNotNull(users.name)});SQLawait db.query.users.findFirst({ where: and(eq(users.name, 'test'), isNotNull(users.name)) });users.name = 'test'users.nameawait db.query.users.findFirst({ where: eq(users.name, "test") });