burnstony#1975B
Convex Community11mo ago
5 replies
burnstony#1975

aggregate index

export const pageDelete = query({
args: {
index: v.number(),
pageSize: v.number()
},
handler: async (ctx, { index, pageSize }) => {
const { key } = await timeline_aggregate.at(ctx, index);
console.log(key);
let pageData = getPage(ctx, {
table: "timeline",
index: "start_index",
startIndexKey: key,
targetMaxRows: pageSize,
schema: schema
});
return (await pageData).page;
},
});

if I pass in zero and 12, the first record I get back is the record at index 1

@lee is this how get page should work? is it not supposed to include the record at startIndexKey: key?
Was this page helpful?