method DBAdapter.stream
DBAdapter.stream<T extends Record<string, any> = Record<string, any>>(
sql: string,
params?: unknown[],
): AsyncIterable<T>

Stream rows from a SELECT query using a cursor. If not implemented, the DB class falls back to buffering the full result.

Type Parameters

T extends Record<string, any> = Record<string, any>

Parameters

sql: string
optional
params: unknown[]

Return Type

AsyncIterable<T>

Usage

import { type DBAdapter } from ".";