UNPKG

orbitdbconnector

Version:

Database connection provider based on Typeorm with a bunch of tweak to be able to connect to a DB dynamically with or without entities plus perf gains.

23 lines (22 loc) โ€ข 954 B
import { DataSource, DataSourceOptions, EntitySchema } from 'typeorm'; import { EntityClassOrSchema } from './definitions/types'; /** * ๐Ÿ’จ Project Name : Array-Querier * ๐Ÿ’จ Project Repo : https://github.com/orbitturner/OrbiDbConnector * ๐Ÿ’จ My GitHub : https://github.com/orbitturner * ๐Ÿ’จ My LinkedIn : https://linkedin.com/in/orbitturner * ๐Ÿ’จ My Twitter : https://twitter.com/orbitturner */ export declare class OrbitDbConnector { private logger; constructor(); /** * ================================== * ๐ŸŸกโš™ CLASS PUBLIC FACADE โš™๐ŸŸก * ================================== * Gateway used to execute the Orbit Connector * and returns the new Connection data to the caller. * @return TypeOrmDatasource: DataSource; */ doConnection(connectionProps: DataSourceOptions, entities?: (string | EntitySchema<any> | EntityClassOrSchema)[]): Promise<DataSource>; }