Skip to content

LocalDataStoreCommitParams

Atomic mutations of a local record store.

Import:

import type { LocalDataStoreCommitParams } from '@mnaoumov/obsidian-lib/data-stores/local-data-store';

Signature:

export interface LocalDataStoreCommitParams

Properties

PropertyTypeDescription
entriesreadonly (readonly [string, unknown])[]Key/value pairs to write.
removedKeys?readonly string[]Keys removed in the same transaction as the writes.
shouldClear?booleanDeletes every record of this store first, in the same transaction as the writes.

Either the store is replaced by entries as a whole, or, when the transaction fails, every previous record survives.