/** * @copyright Cube Dev, Inc. * @license Apache-2.0 * @fileoverview The `MaterializeDriver` and related types declaration. */ import { PostgresDriver, PostgresDriverConfiguration, PgClient } from '@cubejs-backend/postgres-driver'; import { DatabaseStructure, DownloadTableMemoryData, IndexesSQL, StreamOptions, StreamTableDataWithTypes, TableStructure } from '@cubejs-backend/base-driver'; import { Readable } from 'stream'; export type ReadableStreamTableDataWithTypes = StreamTableDataWithTypes & { /** * Compatibility with streamToArray method from '@cubejs-backend/shared' */ rowStream: Readable; }; /** * Materialize driver class. */ export declare class MaterializeDriver extends PostgresDriver { /** * Returns default concurrency value. */ static getDefaultConcurrency(): number; /** * Class constructor. */ constructor(options?: PostgresDriverConfiguration & { /** * Data source name. */ dataSource?: string; /** * Max pool size value for the [cube]<-->[db] pool. */ maxPoolSize?: number; /** * Time to wait for a response from a connection after validation * request before determining it as not valid. Default - 10000 ms. */ testConnectionTimeout?: number; /** * Optional cluster name to set for the connection. */ cluster?: string; /** * SSL is enabled by default. Set to false to disable. */ ssl?: boolean | { rejectUnauthorized: boolean; }; /** * Application name to set for the connection. */ application_name?: string; }); protected prepareConnection(conn: PgClient): Promise; protected loadUserDefinedTypes(): Promise; /** * @param {string} schemaName * @return {Promise>} */ createSchemaIfNotExists(schemaName: string): Promise; uploadTableWithIndexes(table: string, columns: TableStructure, tableData: DownloadTableMemoryData, indexesSql: IndexesSQL): Promise; /** * Materialize queryable schema * Returns materialized sources, materialized views, and tables * @returns {string} schemaQuery */ informationSchemaQueryWithFilter(version: string): string; /** * Materialize instance version * @returns {Promise} version */ getMaterializeVersion(): Promise; tablesSchema(): Promise; protected asyncFetcher(conn: PgClient, cursorId: string): AsyncGenerator; private releaseStream; stream(query: string, values: unknown[], { highWaterMark }: StreamOptions): Promise; } //# sourceMappingURL=MaterializeDriver.d.ts.map