/** * Backpressure-safe incremental stdout writer. * * Used for streaming ndjson and csv output of large result sets * without buffering everything in memory. */ /** * Write a string to stdout, handling backpressure. * * Returns a promise that resolves when the data has been flushed * or the stream has drained. */ export declare function writeStdout(data: string): Promise; /** * Stream ndjson records — one JSON object per line. * Memory-efficient for large result sets. */ export declare function streamNdjson(records: Record[]): Promise; /** * Stream CSV rows incrementally. * Caller is responsible for writing the header first. */ export declare function streamCsvRows(rows: string[][], separator?: string): Promise; /** * Escape a single CSV cell value. * Wraps in quotes if the value contains comma, quote, or newline. */ export declare function toCsvCell(value: unknown): string; /** * Format a row of values as a CSV line (no trailing newline). */ export declare function toCsvRow(cells: unknown[], separator?: string): string; //# sourceMappingURL=stream-writer.d.ts.map