DT
Drizzle TeamSuji
Doent infer type in Callback syntax for query
Im querying the users table like this
db.query.user.findFirst({
where: (user, { eq }) => {
return eq(user.email, whereArgs?.email);
},
})
in the where callback param user is typed as never ??
ive setup drizzle like this
import * as schema from '@/db/schema';
const db = drizzle(pool, { schema });
any idea why this is the case??Suji•355d ago
nvm, i expected relations to get inferred somehow from foreign keys, creations relations in drizzle worked
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsBug When Trying To Increment A Fieldthis set the field to 0 instead of increasing by one it used to work in other routes
```
await Maximum call stack exceeded with relation to selfI have the following table
```
export const category = pgTable('categories', {
id: serial('id').importing into schema.ts fileHi,
I am using turborepo and I have defined my schema in `packages/schema/user.ts` and in my main AWhat versions of MySQL are supported? I have JSON_ARRAYAGG issues with 5.7 and AWS Aurora ServerlessCan you confirm what versions of MySQL you intend on supporting? Relational queries with joins use J