import { type LogWriter, type ConnOperation, ClickHouseLogLevel } from '@clickhouse/client-common'; import type Stream from 'stream'; export interface Context { op: ConnOperation; log_level: ClickHouseLogLevel; log_writer: LogWriter; query_id: string; } /** Drains the response stream, as calling `destroy` on a {@link Stream.Readable} response stream * will result in closing the underlying socket, and negate the KeepAlive feature benefits. * See https://github.com/ClickHouse/clickhouse-js/pull/203 * @deprecated This method is not intended to be used outside of the client implementation anymore. Use `client.command()` instead, which will handle draining the stream internally when needed. * */ export declare function drainStream(stream: Stream.Readable): Promise; /** Drains the response stream, as calling `destroy` on a {@link Stream.Readable} response stream * will result in closing the underlying socket, and negate the KeepAlive feature benefits. * Also, provides additional internal logging for debugging stream issues. Not intended to be used outside of the client implementation. * See https://github.com/ClickHouse/clickhouse-js/pull/203 */ export declare function drainStreamInternal(ctx: Context, stream: Stream.Readable): Promise;