StreamingQueryResult
import { StreamingQueryResult } from "https://raw.githubusercontent.com/jakajancar/pgc4d/master/src/mod.ts";
A streaming result.
To free up the connection, an iterator should be retrieved from the
response object and either next()
called enough times to reach
done: true
or return()
/throw()
called to cancel the query.
The for-await-of
loop handles this for you automatically.
§Constructors
§
new StreamingQueryResult(columns: ColumnMetadata[], stream: AsyncGenerator<IndexedRow, CompletionInfo>)
[src]§Properties
§
_unconsumed: AsyncGenerator<IndexedRow, CompletionInfo>
[src]§
completionInfo: CompletionInfo | undefined
[src]§
indexedRowsIterator: AsyncIterableIterator<IndexedRow> readonly
[src]§Methods
§
buffer(): Promise<BufferedQueryResult>
[src]Reads the result to completion and returns a BufferedQueryResult
.