333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Connection } from "./Connection";
import { ConnectionOptions } from "./ConnectionOptions";
/**
 * ConnectionManager is used to store and manage multiple orm connections.
 * It also provides useful factory methods to simplify connection creation.
 */
export declare class ConnectionManager {
    /**
     * List of connections registered in this connection manager.
     */
    readonly connections: Connection[];
    /**
     * Checks if connection with the given name exist in the manager.
     */
    has(name: string): boolean;
    /**
     * 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.
     */
    get(name?: string): 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.
     */
    create(options: ConnectionOptions): Connection;
}