StorageKey: string[]

A storage key is an array of strings that represents a path to a value in a StorageAdapter.

Remarks

Storage keys are arrays because they are hierarchical and they allow the storage subsystem to do range queries for all keys that have a particular prefix. For example, incremental changes for a given document might be stored under [<documentId>, "incremental", <SHA256>].

automerge-repo mostly uses keys in the following form:

[documentId, "snapshot", hash]  // OR
[documentId, "incremental", hash]

However, the storage adapter implementation should be agnostic to the meaning of the key and should not assume any particular structure.

Generated using TypeDoc