import { ConnectionOptionsReader } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";
Reads connection options from the ormconfig. Can read from multiple file extensions including env, json, js, xml and yml.
Methods
protected
load(): Promise<ConnectionOptions[] | undefined>Loads all connection options from a configuration file.
todo: get in count NODE_ENV somehow
protected
loadJson(path: string): Promise<ConnectionOptions>protected
normalizeConnectionOptions(connectionOptions: ConnectionOptions | ConnectionOptions[]): ConnectionOptions[]Normalize connection options.
all(): Promise<ConnectionOptions[]>
Returns all connection options read from the ormconfig.
get(name: string): Promise<ConnectionOptions>
Gets a connection with a given name read from ormconfig. If connection with such name would not be found then it throw error.
has(name: string): Promise<boolean>
Checks if there is a TypeORM configuration file.