Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DatabaseManager

Index

Properties

clients

Gets a database client by name.

returns

The database clients map.

Methods

add

  • Adds a named database client with the provided config.

    Parameters

    Returns void

    The created client.

connect

  • connect(name: string): Promise<Connection>
  • Connects a named client to the database.

    Parameters

    • name: string

      The client name.

    Returns Promise<Connection>

    The current client connection.

connection

  • connection(name: string): Connection
  • Retrieves a client's connection.

    Parameters

    • name: string

      The client name.

    Returns Connection

    The client's connection if any.

disconnect

  • disconnect(name: string, force?: boolean): Promise<void>
  • Disconnects a named client from the database.

    Parameters

    • name: string

      The client name.

    • Optional force: boolean

      Whether to force disconnection.

    Returns Promise<void>

    A promise to the disconnection.

disconnectAll

  • disconnectAll(force?: boolean): Promise<void>
  • Disconnects all clients from their databases.

    Parameters

    • Optional force: boolean

      Whether to force disconnection.

    Returns Promise<void>

Legend

  • Property
  • Method

Generated using TypeDoc