UNPKG

@aequum/typeorm

Version:

aequum TypeORM tools for repository, pagination, CRUD/CRUDL, configs and utils

25 lines (24 loc) 1.12 kB
import { DataSourceOptions } from 'typeorm'; /** * SchemedDataSources are the data sources that support schemas * and will be parsed as `database/schema` in `URIToDataSourceOptions` * if there are a custom DataSource driver and schema need to be parsed * in the URI, add the DataSource name to this array. * * @see {@link URIToDataSourceOptions} */ export declare const SchemedDataSources: string[]; /** * Translate a database URI to TypeORM DataSourceOptions, protocol must be * the TypeORM DataSource type (e.g. 'mysql', 'postgres', 'sqlite', etc.), * the host, port, username, password, database and schema (If applies) * will be extracted from the URI and all the query string parameters will * be added to the options. * * @see [TypeORM Docs: DataSource API](https://orkhan.gitbook.io/typeorm/docs/data-source-api) * @see [TypeORM Docs: Data source options](https://orkhan.gitbook.io/typeorm/docs/data-source-options) * @see {@link SchemedDataSources} * @param uri DataSource URI * @returns TypeORM DataSourceOptions */ export declare function URIToDataSourceOptions(uri: string): DataSourceOptions;