NitroSQLite
react-native-nitro-sqliteInterfaces

QueryCursor

TypeScript

Source 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: packages/react-native-nitro-sqlite/src/types.ts:230

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: packages/react-native-nitro-sqlite/src/types.ts:226

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

SQLiteError if another page is pending, the cursor is closed or exhausted, or SQLite fails. A SQLite page error closes the cursor and exposes SQLiteError.sqliteCode. A submission failure can leave the reader open; always close in a finally block.

On this page