Durable metadata index backed by persistent-sorted-set + konserve.
Provides O(log n) lookup of commit generations by custom metadata keys, with lazy loading from disk (O(1) startup) and incremental updates.
Each entry is {:branch b :key k :value v :generation g}. Sorted by [:branch :key :value] enabling efficient exact and floor queries.
Durable metadata index backed by persistent-sorted-set + konserve.
Provides O(log n) lookup of commit generations by custom metadata keys,
with lazy loading from disk (O(1) startup) and incremental updates.
Each entry is {:branch b :key k :value v :generation g}.
Sorted by [:branch :key :value] enabling efficient exact and floor queries.(close-index! mi)Flush and close the metadata index store.
Flush and close the metadata index store.
(create-metadata-index base-path)Create or restore a metadata index at base-path/scriptum-metadata/. Returns a MetadataIndex record.
Create or restore a metadata index at base-path/scriptum-metadata/. Returns a MetadataIndex record.
(find-exact mi branch key value)Find exact match for branch+key+value. Returns {:generation n} or nil.
Find exact match for branch+key+value. Returns {:generation n} or nil.
(find-floor mi branch key value)Find floor match: latest entry where value <= target for branch+key. Returns {:generation n :indexed-value v} or nil.
Find floor match: latest entry where value <= target for branch+key.
Returns {:generation n :indexed-value v} or nil.(flush-index! mi)Persist the PSS index to konserve.
Persist the PSS index to konserve.
(index! mi branch-name custom-metadata generation)Index custom metadata entries for a commit. branch-name: string, custom-metadata: map of key->value strings, generation: long.
Index custom metadata entries for a commit. branch-name: string, custom-metadata: map of key->value strings, generation: long.
Comparator for metadata entries: [:branch :key :value]
Comparator for metadata entries: [:branch :key :value]
(rebuild-from-snapshots! mi snapshots-by-branch)Rebuild the metadata index from surviving snapshots after GC. snapshots-by-branch: map of branch-name -> seq of snapshot maps (each with :custom-metadata and :generation).
Rebuild the metadata index from surviving snapshots after GC. snapshots-by-branch: map of branch-name -> seq of snapshot maps (each with :custom-metadata and :generation).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |