QueryCursor
TypeScriptSource files: TypeScript
A paged read over one SQLite snapshot. Consume or close it to release the reader.
Type Parameters
Row
Row extends QueryResultRow = QueryResultRow
Methods
close()
close(): Promise<void>
Defined in: types.ts:227
Wait for any pending read and release the cursor. Safe to call more than once. If submission fails, retry close; rejection does not guarantee the reader was released.
Returns
Promise<void>
readPage()
readPage(): Promise<QueryCursorPage<Row>>
Defined in: types.ts:223
Read the next page. If a page fills exactly, the next page can be empty with done: true.
Returns
Promise<QueryCursorPage<Row>>
Up to pageSize rows, column metadata, and whether SQLite reached the end.
Throws
NitroSQLiteError if another page is pending, the cursor is closed or exhausted, or SQLite fails.
A SQLite page error closes the cursor and exposes NitroSQLiteError.sqliteCode.
A submission failure can leave the reader open; always close in a finally block.