Interface IKeyValueDatabaseConnector

The key-value database connector interface.

interface IKeyValueDatabaseConnector {
    close(): void;
    createTable(tableName: string): void;
    getTableConnector<T>(tableName: string): IKeyValueDatabaseTableConnector<T>;
    hasTable(tableName: string): boolean;
    open(): Promise<void>;
}

Methods

  • Close the database.

    Returns void

  • Create a table in the database.

    Parameters

    • tableName: string

      The name of the table to create.

    Returns void

  • Check if a table exists in the database.

    Parameters

    • tableName: string

    Returns boolean

    True if the table exists, false otherwise.

  • Open the database and run a migration on it if necessary.

    Returns Promise<void>