import { AnyType, CreatePostgresCredentials, CreatePostgresLikeCredentials, Metric, SupportedDbtAdapter, WarehouseCatalog, WarehouseQueryError, WarehouseResults, WarehouseTypes, type TimestampDomain, type WarehouseQueryPhase } from '@lightdash/common'; import * as pg from 'pg'; import { QueryResult } from 'pg'; import './pgProtocolGuard'; import WarehouseBaseClient from './WarehouseBaseClient'; import WarehouseBaseSqlBuilder from './WarehouseBaseSqlBuilder'; export declare enum PostgresTypes { INTEGER = "integer", INT = "int", INT2 = "int2", INT4 = "int4", INT8 = "int8", MONEY = "money", SMALLSERIAL = "smallserial", SERIAL = "serial", SERIAL2 = "serial2", SERIAL4 = "serial4", SERIAL8 = "serial8", BIGSERIAL = "bigserial", BIGINT = "bigint", SMALLINT = "smallint", BOOLEAN = "boolean", BOOL = "bool", DATE = "date", DOUBLE_PRECISION = "double precision", FLOAT = "float", FLOAT4 = "float4", FLOAT8 = "float8", JSON = "json", JSONB = "jsonb", NUMERIC = "numeric", DECIMAL = "decimal", REAL = "real", CHAR = "char", CHARACTER = "character", NCHAR = "nchar", BPCHAR = "bpchar", VARCHAR = "varchar", CHARACTER_VARYING = "character varying", NVARCHAR = "nvarchar", TEXT = "text", TIME = "time", TIME_TZ = "timetz", TIME_WITHOUT_TIME_ZONE = "time without time zone", TIMESTAMP = "timestamp", TIMESTAMP_TZ = "timestamptz", TIMESTAMP_WITHOUT_TIME_ZONE = "timestamp without time zone", TIMESTAMP_WITH_TIME_ZONE = "timestamp with time zone" } export declare const getPostgresTimestampDomain: (type: string) => TimestampDomain | undefined; export declare class PostgresSqlBuilder extends WarehouseBaseSqlBuilder { type: WarehouseTypes; getAdapterType(): SupportedDbtAdapter; getEscapeStringQuoteChar(): string; escapeString(value: string): string; getMetricSql(sql: string, metric: Metric): string; concatString(...args: string[]): string; } type CatalogQueryFilters = { databaseFilters: string[]; schemaFilters: string[]; tableFilters: string[]; values: string[] | undefined; }; export declare class PostgresClient extends WarehouseBaseClient { getSessionTimezone(): Promise; config: pg.PoolConfig; constructor(credentials: T, config: pg.PoolConfig); protected getCatalogQueryFilters(databases: Set, schemas: Set, tables: Set): CatalogQueryFilters; private getSQLWithMetadata; static convertQueryResultFields(fields: QueryResult['fields']): WarehouseResults['fields']; private static getNoticeError; streamQuery(sql: string, streamCallback: (data: WarehouseResults) => void | Promise, options: { values?: AnyType[]; tags?: Record; timezone?: string; onPhaseTiming?: (phase: WarehouseQueryPhase, durationMs: number) => void; }): Promise; getCatalog(requests: { database: string; schema: string; table: string; }[]): Promise>; private serverVersion; protected getServerVersion(): Promise; protected supportsMatviews(): Promise; protected isRedshift(): Promise; getAllTables(): Promise<{ database: any; schema: any; table: any; tableType: import("@lightdash/common").WarehouseTableType; }[]>; protected bindFieldsFilters(tableName: string, schema?: string, database?: string): { values: string[]; schemaParam: string | undefined; databaseParam: string | undefined; }; getFields(tableName: string, schema?: string, database?: string, tags?: Record): Promise; protected parsePostgresCatalog(rows: Record[]): WarehouseCatalog; parseError(error: pg.DatabaseError, query?: string): WarehouseQueryError; } export declare class PostgresWarehouseClient extends PostgresClient { protected getCatalogQueryFilters(databases: Set, schemas: Set, tables: Set): CatalogQueryFilters; constructor(credentials: CreatePostgresCredentials); } export {}; //# sourceMappingURL=PostgresWarehouseClient.d.ts.map