Skip to main content
Module

x/typeorm/src/index.ts>ConnectionManager

Forked from https://github.com/typeorm/typeorm
Latest
class ConnectionManager
Re-export
import { ConnectionManager } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

ConnectionManager is used to store and manage multiple orm connections. It also provides useful factory methods to simplify connection creation.

Properties

readonly
connections: Connection[]

List of connections registered in this connection manager.

Methods

create(options: ConnectionOptions): Connection

Creates a new connection based on the given connection options and registers it in the manager. Connection won't be established, you'll need to manually call connect method to establish connection.

get(name?: string): Connection

Gets registered connection with the given name. If connection name is not given then it will get a default connection. Throws error if connection with the given name was not found.

has(name: string): boolean

Checks if connection with the given name exist in the manager.