Skip to content

@sqlrooms/duckdb / UseSqlQueryResult

Interface: UseSqlQueryResult<T>

A wrapper interface that exposes the underlying Arrow table, a typed row accessor, and the number of rows.

Extends

Type Parameters

Type Parameter
T

Properties

length

length: number

Number of rows in the table

Inherited from

TypedRowAccessor.length


arrowTable

arrowTable: Table

The underlying Arrow table

Methods

[iterator]()

[iterator](): Iterator<T, any, any>

Returns

Iterator<T, any, any>

Inherited from

TypedRowAccessor.[iterator]


getRow()

getRow(index): T

Returns a typed row at the specified index by converting on demand

Parameters

ParameterType
indexnumber

Returns

T

Inherited from

TypedRowAccessor.getRow


rows()

rows(): IterableIterator<T>

Returns an iterator that yields each row in the table

Returns

IterableIterator<T>

Inherited from

TypedRowAccessor.rows


toArray()

toArray(): T[]

Returns an array containing all rows in the table. The array is cached and reused.

Returns

T[]

Inherited from

TypedRowAccessor.toArray