Class DatabaseService

A singleton, non-unit service that stores and retrieves database connections by name.

Hierarchy

Constructors

Properties

connections: {
    [key: string]: Connection;
} = {}

Mapping of connection name -> connection instance for connections registered with this service.

Type declaration

logging: Logging

Accessors

Methods

  • Get the method with the given name from this class, bound to this class.

    Returns

    function

    Parameters

    • methodName: string

    Returns ((...args: any[]) => any)

      • (...args: any[]): any
      • Get the method with the given name from this class, bound to this class.

        Returns

        function

        Parameters

        • Rest ...args: any[]

        Returns any

  • Returns true if a connection is registered with the given name.

    Parameters

    • name: string

    Returns boolean

  • Call the make() method on the global container.

    Type Parameters

    • T

    Parameters

    • target: any
    • Rest ...parameters: any[]

    Returns T