Fake Mirrors
    Preparing search index...

    Interface DatabaseConnector

    Represents a database connector.

    interface DatabaseConnector {
        close(): Promise<void>;
        connect(): Promise<void>;
        getConnection<T>(): T;
    }

    Implemented by

    Methods

    • Establishes the database connection.

      Returns Promise<void>

      A promise that resolves when the connection is established

    • Retrieves the underlying connection object.

      This method uses a type assertion to return the connection as the requested type. It is the caller's responsibility to ensure the correct type is used.

      Type Parameters

      • T

        The expected type of the connection

      Returns T

      The database connection cast to type T