NitroSQLiteCursor
TypeScriptC++Source files: TypeScript · C++
Native query cursor with a private read-only connection to the main database file.
Extends
HybridObject<{android:"c++";ios:"c++"; }>
Methods
close()
close(): Promise<void>
Defined in: specs/NitroSQLiteCursor.nitro.ts:34
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: specs/NitroSQLiteCursor.nitro.ts:28
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.