memongo
    Preparing search index...

    Interface Database

    interface Database {
        collection(name: string): Collection | null;
        createCollection(name: string): Collection;
        flush(): Promise<void>;
        init(): Promise<void>;
        removeCollection(name: string): void;
    }
    Index

    Methods

    • Waits for all pending writes to complete and reports any accumulated errors.

      Returns Promise<void>

      • Resolves only after all scheduled writes have finished.
      • If any write errors occurred, they are aggregated and thrown as an AggregateError.
      • After throwing, the internal error state is cleared and the database is marked as uninitialized.

      If one or more write operations failed.

    • Should be called before any operation on the database.

      Returns Promise<void>