Interface IZDatabaseServer<TDatabase>

Represents a server that runs an in-memory database.

The implementation of the server acts as a factory to construct the client connections to the in memory database.

interface IZDatabaseServer<TDatabase> {
    running(): Promise<boolean>;
    start(options?: IZDatabaseOptions): Promise<TDatabase>;
    stop(): Promise<boolean>;
}

Type Parameters

  • TDatabase

    The type of database that will be returned when the server is started.

Implemented by

Methods

  • Gets whether the database server is running.

    Returns Promise<boolean>

    True if the server is running. False otherwise.

  • Stops the server.

    Returns Promise<boolean>

    True if the server is stopped. False otherwise.