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
Sillvva
Sillvva13mo ago
Can you show the code at the line where the error is occurring?
imchihao_ur_username?
The line of code is where i use findMany
Sillvva
Sillvva13mo 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
imchihao_ur_username?
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;
}>;

Did you find this page helpful?