rachpradhan
rachpradhan5mo ago

Is there any way to query and return all the id's here

No description
3 Replies
jamalsoueidan
jamalsoueidan5mo ago
export const list = query({
args: {},
handler: async (ctx) => {
const rows = await ctx.db.query("table").collect();
return rows.map((row) => row._id));
},
});
export const list = query({
args: {},
handler: async (ctx) => {
const rows = await ctx.db.query("table").collect();
return rows.map((row) => row._id));
},
});
rachpradhan
rachpradhanOP5mo ago
is there a way to run this locally? like without a function
ballingt
ballingt5mo ago
@rachpradhan see https://docs.convex.dev/database/import-export/ But since you said "query" it sounds like you want to write a function Why don't you want to write a function?

Did you find this page helpful?