class StreamingQueryResult
extends QueryResult
import { StreamingQueryResult } from "https://deno.land/x/pgc4d@v1.3.6/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>)Properties
private
optional
_unconsumed: AsyncGenerator<IndexedRow, CompletionInfo>completionInfo: CompletionInfo | undefined
readonly
indexedRowsIterator: AsyncIterableIterator<IndexedRow>Methods
buffer(): Promise<BufferedQueryResult>
Reads the result to completion and returns a BufferedQueryResult
.