UNPKG

@sqb/connect

Version:

Multi-dialect database connection framework written with TypeScript

29 lines (28 loc) 763 B
import { Readable } from 'stream'; import type { Cursor } from './cursor.js'; export interface CursorStreamOptions { objectMode?: boolean; limit?: number; } declare const inspect: unique symbol; export declare class CursorStream extends Readable { private readonly _cursor; private readonly _objectMode?; private readonly _limit; private _rowNum; private _eof; constructor(cursor: Cursor, options?: CursorStreamOptions); /** * Returns if stream is closed. */ get isClosed(): boolean; /** * Closes stream and releases the cursor */ close(): Promise<void>; toString(): string; [inspect](): string; _read(): void; emit(event: string | symbol, ...args: any[]): boolean; } export {};