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 HaoOP9mo ago
Sillvva
Sillvva9mo ago
Can you show the code at the line where the error is occurring?
Chi Hao
Chi HaoOP9mo ago
The line of code is where i use findMany
Sillvva
Sillvva9mo 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 HaoOP9mo 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