Do I have to import table name type for select query?

Doing this simple query:
dbDrizzle.select({
id: user.id
}).from(user)
dbDrizzle.select({
id: user.id
}).from(user)
I get no intelisense with ts etc. after importing import { user } from "../../../drizzle/migrations/schema"; it works. This is the way or I messed up configuration?
3 Replies
tzezar
tzezarOP13mo ago
import * as schema from '../../drizzle/migrations/schema'
export const dbDrizzle = drizzle(queryClient, {schema});
import * as schema from '../../drizzle/migrations/schema'
export const dbDrizzle = drizzle(queryClient, {schema});
Angelelz
Angelelz13mo ago
Yes, you should import your tables when using the regular crud API
tzezar
tzezarOP13mo ago
oki, thanks
Want results from more Discord servers?
Add your server