/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type ConnectionVisitor, Connection } from '../../../connection/Connection.js'; import type { DatasourceSpecification } from './DatasourceSpecification.js'; import type { AuthenticationStrategy } from './AuthenticationStrategy.js'; import type { Database } from '../model/Database.js'; import type { PackageableElementReference } from '../../../PackageableElementReference.js'; import type { PostProcessor } from './postprocessor/PostProcessor.js'; import type { RelationalQueryGenerationConfig } from './RelationalQueryGenerationConfig.js'; /** * TODO: to be modularized or handled differently * * @modularize * See https://github.com/finos/legend-studio/issues/946 * See https://github.com/finos/legend-studio/issues/65 */ export declare enum DatabaseType { DB2 = "DB2", H2 = "H2", MemSQL = "MemSQL", Sybase = "Sybase", SybaseIQ = "SybaseIQ", Composite = "Composite", Postgres = "Postgres", SqlServer = "SqlServer", Hive = "Hive", Snowflake = "Snowflake", Databricks = "Databricks", Presto = "Presto", Redshift = "Redshift", BigQuery = "BigQuery", Spanner = "Spanner", Trino = "Trino", DuckDB = "DuckDB" } export declare abstract class DatabaseConnection extends Connection { store: PackageableElementReference | undefined; /** * For convenience, we use a Typescript enum instead of the native * Pure enumeration meta::relational::runtime::DatabaseType * * @discrepancy model */ type: string; timeZone?: string | undefined; quoteIdentifiers?: boolean | undefined; queryTimeOutInSeconds?: number | undefined; postProcessorWithParameter: unknown[]; queryGenerationConfigs: RelationalQueryGenerationConfig[]; constructor(store: PackageableElementReference | undefined, type: string); } export declare class RelationalDatabaseConnection extends DatabaseConnection { datasourceSpecification: DatasourceSpecification; authenticationStrategy: AuthenticationStrategy; postProcessors: PostProcessor[]; /** * HACKY: this is done to quickly add support for local connection * See https://github.com/finos/legend-engine/pull/1807 */ localMode?: boolean | undefined; constructor(store: PackageableElementReference | undefined, type: string, datasourceSpecification: DatasourceSpecification, authenticationStrategy: AuthenticationStrategy); get hashCode(): string; accept_ConnectionVisitor(visitor: ConnectionVisitor): T; } //# sourceMappingURL=RelationalDatabaseConnection.d.ts.map