import { type ClickHouseClient } from '@clickhouse/client'; import { AnyType, CreateClickhouseCredentials, DimensionType, Metric, SupportedDbtAdapter, TimeIntervalUnit, WarehouseResults, WarehouseTypes, type ResultNumericKind, type TimestampDomain } from '@lightdash/common'; import { WarehouseCatalog } from '../types'; import WarehouseBaseClient from './WarehouseBaseClient'; import WarehouseBaseSqlBuilder from './WarehouseBaseSqlBuilder'; export declare enum ClickhouseTypes { UINT8 = "UInt8", UINT16 = "UInt16", UINT32 = "UInt32", UINT64 = "UInt64", INT8 = "Int8", INT16 = "Int16", INT32 = "Int32", INT64 = "Int64", FLOAT32 = "Float32", FLOAT64 = "Float64", DECIMAL = "Decimal", DECIMAL32 = "Decimal32", DECIMAL64 = "Decimal64", DECIMAL128 = "Decimal128", DECIMAL256 = "Decimal256", BOOL = "Bool", STRING = "String", FIXEDSTRING = "FixedString", UUID = "UUID", DATE = "Date", DATE32 = "Date32", DATETIME = "DateTime", DATETIME64 = "DateTime64", ENUM8 = "Enum8", ENUM16 = "Enum16", ARRAY = "Array", TUPLE = "Tuple", MAP = "Map", NULLABLE = "Nullable", LOWCARDINALITY = "LowCardinality", IPV4 = "IPv4", IPV6 = "IPv6" } interface TableInfo { database: string; schema?: string; table: string; } export declare const getClickhouseTimestampDomain: (type: ClickhouseTypes | string) => TimestampDomain | undefined; export declare const getClickhouseNumericKind: (type: ClickhouseTypes | string) => ResultNumericKind | null; export declare const convertDataTypeToDimensionType: (type: ClickhouseTypes | string) => DimensionType; export declare class ClickhouseSqlBuilder extends WarehouseBaseSqlBuilder { readonly type = WarehouseTypes.CLICKHOUSE; getAdapterType(): SupportedDbtAdapter; getEscapeStringQuoteChar(): string; getMetricSql(sql: string, metric: Metric): string; escapeString(value: string): string; castToTimestamp(date: Date): string; getIntervalSql(value: number, unit: TimeIntervalUnit): string; getTimestampDiffSeconds(startTimestampSql: string, endTimestampSql: string): string; getMedianSql(valueSql: string): string; getNullSafeEqualJoinSql(left: string, right: string): string; buildArray(elements: string[]): string; } export declare const getMaxOpenConnections: (maxOpenConnections?: number) => number; export type ClickhouseWarehouseClientOptions = { /** Upper bound of concurrent queries sharing this client; sizes the HTTP socket pool. */ maxOpenConnections?: number; }; export declare class ClickhouseWarehouseClient extends WarehouseBaseClient { client: ClickHouseClient; constructor(credentials: CreateClickhouseCredentials, options?: ClickhouseWarehouseClientOptions); streamQuery(sql: string, streamCallback: (data: WarehouseResults) => void | Promise, options: { queryParams?: Record; tags?: Record; timezone?: string; }): Promise; getCatalog(requests: TableInfo[]): Promise; getTables(schema?: string, tags?: Record): Promise; getFields(tableName: string, schema?: string, database?: string, // always empty string in clickhouse tags?: Record): Promise; getAllTables(): Promise<{ database: any; schema: any; table: any; tableType: import("@lightdash/common").WarehouseTableType; }[]>; test(): Promise; } export {}; //# sourceMappingURL=ClickhouseWarehouseClient.d.ts.map