can't execute basic pg cmnds in drizzle orm .

I have written my schema and generated the table. I can use pg client to interact with the db but not with drizzle orm for some reason i am executing a simple command
const result = await db.select().from('auth_key')
const result = await db.select().from('auth_key')
it gives an error stating that
e: ReferenceError: auth_key is not defined
e: ReferenceError: auth_key is not defined
2 Replies
Andrii Sherman
Andrii Sherman16mo ago
You need to provide a table instance inside .from() and not string
chidam
chidam16mo ago
I actually uncovered the error . I didn't import the instances frm the schema . Thank you
Want results from more Discord servers?
Add your server