import type { CommandParams, CommandResult, DataFormat, ExecParams, ExecResult, InputJSON, InputJSONObjectEachRow, InsertParams, InsertResult, IsSame, QueryParamsWithFormat } from "./common/index"; import { ClickHouseClient } from "./common/index"; import type { WebClickHouseClientConfigOptions } from "./config"; import type { ResultSet } from "./result_set"; /** If the Format is not a literal type, fall back to the default behavior of the ResultSet, * allowing to call all methods with all data shapes variants, * and avoiding generated types that include all possible DataFormat literal values. */ export type QueryResult = IsSame extends true ? ResultSet : ResultSet; export type WebClickHouseClient = Omit & { /** See {@link ClickHouseClient.insert}. * * ReadableStream is removed from possible insert values * until it is supported by all major web platforms. */ insert(params: Omit, "values"> & { values: ReadonlyArray | InputJSON | InputJSONObjectEachRow; }): Promise; /** See {@link ClickHouseClient.exec}. * * Custom values are currently not supported in the web versions. * The `ignore_error_response` parameter is not supported in the Web version. */ exec(params: Omit): Promise>; /** See {@link ClickHouseClient.command}. * * The `ignore_error_response` parameter is not supported in the Web version. */ command(params: Omit): Promise; }; declare class WebClickHouseClientImpl extends ClickHouseClient { /** See {@link ClickHouseClient.query}. */ query(params: QueryParamsWithFormat): Promise>; } export declare function createClient(config?: WebClickHouseClientConfigOptions): WebClickHouseClient; export {};