Fake Mirrors
    Preparing search index...

    Class RedisDatabaseConnector

    Redis-based database connector implementation.

    Uses the official node-redis client with custom Redis Functions.

    https://github.com/redis/node-redis - Node Redis client

    Implements

    • Gracefully closes a connection to the database.

      This method should be called during application shutdown to ensure all pending operations are completed and resources are released.

      Returns Promise<void>

      LifecycleError If the connection cannot be closed properly.

    • Establishes a connection to the database.

      This method should be called during application bootstrap to ensure the connection is ready before any operations are performed.

      Returns Promise<void>

      LifecycleError If the database connection cannot be established.

    • Retrieves the underlying database connection.

      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 database connection.

      Returns T

      The database connection cast to type T.

    • Registers the connector as a singleton in the DI container.

      Parameters

      • container: DIContainer

        The DI container to register in.

      Returns void