burying-beetle - v0.1.0
    Preparing search index...

    Interface GuardOptions

    The store, and the two ways to loosen the default. Without either, a deleted entity stays deleted forever: its tombstone is never dropped and nothing brings it back. The cost is one record per deleted entity, kept for good.

    interface GuardOptions {
        now?: () => number;
        store: Store;
        unsafeAllowRecreate?: true;
        unsafeTombstoneExpiry?: number;
    }
    Index
    now?: () => number

    Milliseconds since the epoch. Defaults to Date.now.

    store: Store

    Where records live. MemoryStore for one process, or your own.

    unsafeAllowRecreate?: true

    A write at or above a tombstone's version brings the entity back, as in Argia. For entities whose IDs are reused after a delete. Without it, a late write after a delete is dropped no matter its version.

    unsafeTombstoneExpiry?: number

    Milliseconds after which a tombstone counts as absent. Saves the storage, at a price: any event for the entity that arrives later, however old, brings it back. Set it longer than the latest any event can arrive.