CursorParams
CursorParams =
object
Defined in: packages/db/src/types.ts:226
Parsed cursor-based pagination parameters from a request URL.
Produced by parseCursorParams. Pass to db.query(table).paginate() for
keyset pagination that avoids the offset performance cliff on large datasets.
Example
Section titled “Example”const params = parseCursorParams(request, { defaultLimit: 20 });const page = await db.query(posts).paginate(params).run({});Properties
Section titled “Properties”cursor
Section titled “cursor”cursor:
string|null
Defined in: packages/db/src/types.ts:230
The opaque cursor string from the previous page, or null for the first page.
limit:
number
Defined in: packages/db/src/types.ts:232
Maximum items per page (clamped between 1 and maxLimit).
type:
"cursor"
Defined in: packages/db/src/types.ts:228
Discriminant for cursor-based pagination. Always "cursor".