How to use findMany?

I'm using supabase. I'm going to show a sample which doesnt necessarily need findMany to work but I would like to know how to use it as I'm unable to do it.
5 Replies
Chi Hao
Chi HaoOP8mo ago
Sillvva
Sillvva8mo ago
Can you show the code at the line where the error is occurring?
Chi Hao
Chi HaoOP8mo ago
The line of code is where i use findMany
Sillvva
Sillvva8mo ago
Ah, it's a download. I believe you need to make db.query.Restaurants lowercase: db.query.restaurants Same as the export const variable name for your pgTable
Chi Hao
Chi HaoOP8mo ago
thanks @Sillvva ! I also need to make sure my types in the schema are matching the casing of the pgtable name
export type MyDatabase = NodePgDatabase<{
users: typeof users;
vendors: typeof vendors;
restaurants: typeof restaurants;
}>;
export type MyDatabase = NodePgDatabase<{
users: typeof users;
vendors: typeof vendors;
restaurants: typeof restaurants;
}>;
Want results from more Discord servers?
Add your server