NitroSQLite
react-native-nitro-sqliteInterfaces

LazyQueryRows

TypeScript

Source files: TypeScript

Rows of a completed query, converted to JavaScript on demand. Only length, item() and toArray() are available. Numeric indexing, iteration and _array are unsupported. JSON serialization includes length but no row values. Serialize toArray() to include the rows.

Type Parameters

Row

Row extends QueryResultRow = QueryResultRow

Properties

length

readonly length: number

Defined in: packages/react-native-nitro-sqlite/src/specs/NativeLazyQueryResult.ts:12

Number of rows in the completed result. Reading it does not convert rows.

Methods

item()

item(index): Row | undefined

Defined in: packages/react-native-nitro-sqlite/src/specs/NativeLazyQueryResult.ts:18

Return the row at a zero-based index, converting and caching it on first access. An invalid or out-of-range index returns undefined.

Parameters

index

number

Zero-based row index.

Returns

Row | undefined


toArray()

toArray(): Row[]

Defined in: packages/react-native-nitro-sqlite/src/specs/NativeLazyQueryResult.ts:25

Return all rows in SQL result order in a new array. Each element is the same object that item returns for that index. Conversion runs synchronously and may throw.

Returns

Row[]

A new array containing every cached row.

On this page