import type { SQLSourceRequest } from '../lang/translate-response'; import type { MalloyQueryData, QueryRunStats, SQLSourceDef, StructDef, TableSourceDef } from '../model/malloy_types'; import type { RunSQLOptions } from '../run_sql_options'; import type { Connection, FetchSchemaOptions, PersistSQLResults, PooledConnection, StreamingConnection } from './types'; export interface SchemaFound { schema: T; error?: undefined; timestamp: number; } export interface SchemaNotFound { schema?: undefined; error: string; } export type CachedSchema = SchemaFound | SchemaNotFound; export declare abstract class BaseConnection implements Connection { abstract runSQL(sql: string, options?: RunSQLOptions | undefined): Promise; abstract get name(): string; abstract get dialectName(): string; abstract fetchTableSchema(tableName: string, tablePath: string): Promise; abstract fetchSelectSchema(sqlSource: SQLSourceRequest): Promise; protected schemaCache: Record>; protected checkSchemaCache(schemaKey: string, schemaType: 'table' | 'sql_select', fillCache: () => Promise, refreshTimestamp: number | undefined): Promise>; fetchSchemaForTables(missing: Record, { refreshTimestamp }: FetchSchemaOptions): Promise<{ schemas: Record; errors: Record; }>; fetchSchemaForSQLStruct(sqlRef: SQLSourceRequest, { refreshTimestamp }: FetchSchemaOptions): Promise<{ structDef: SQLSourceDef; error?: undefined; } | { error: string; structDef?: undefined; }>; isPool(): this is PooledConnection; canPersist(): this is PersistSQLResults; canStream(): this is StreamingConnection; close(): Promise; estimateQueryCost(_sqlCommand: string): Promise; fetchMetadata(): Promise<{}>; fetchTableMetadata(_tablePath: string): Promise<{}>; }