Skip to content

CursorPage

CursorPage<T> = object

Defined in: packages/db/src/types.ts:282

A page of results from cursor-based pagination.

Use nextCursor to fetch the next page. When nextCursor is null, there are no more pages.

const page: CursorPage<Post> = await db.query(posts)
.paginate({ type: "cursor", cursor: null, limit: 20 })
.run({});
if (page.nextCursor) {
// Fetch next page with page.nextCursor
}

T

The row type.

items: T[]

Defined in: packages/db/src/types.ts:284

The items on this page.


nextCursor: string | null

Defined in: packages/db/src/types.ts:286

Opaque cursor for the next page, or null if this is the last page.