Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/pgc4d/src/mod.ts>StreamingQueryResult

A full-featured PostgreSQL Client for Deno
Latest
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

Reads the result to completion and returns a BufferedQueryResult.