NitroSQLiteCursor
TypeScriptC++Source files: TypeScript · C++
Native query cursor with a private read-only connection to the main database file.
Extends
NativeHybridObject
Methods
close()
close(): Promise<void>
Defined in: packages/nitro-sqlite/src/specs/NitroSQLiteCursor.nitro.ts:51
Release the reader after any submitted page finishes. Subsequent reads fail.
Returns
Promise<void>
A promise that resolves after cleanup. Repeated calls are safe. If submission fails, retry close; rejection does not guarantee the reader was released.
readPage()
readPage(): Promise<NitroSQLiteCursorPage>
Defined in: packages/nitro-sqlite/src/specs/NitroSQLiteCursor.nitro.ts:45
Step the statement for up to one page. The first step establishes the snapshot.
Returns
Promise<NitroSQLiteCursorPage>
The rows and column metadata for the current page.
Throws
If a read is running, the cursor is closed or exhausted, or SQLite fails.
A SQLite page error releases the reader and closes the cursor. Native SQLite failures
include their result code in the exception message as [SQLiteCode=N].
Managed wrappers expose that code as NitroSQLiteError.sqliteCode.
A submission failure can leave the reader open; always close in a finally block.