Liking cljdoc? Tell your friends :D

scriptum.metadata

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.
raw docstring

close-index!clj

(close-index! mi)

Flush and close the metadata index store.

Flush and close the metadata index store.
sourceraw docstring

create-metadata-indexclj

(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.
sourceraw docstring

find-exactclj

(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.
sourceraw docstring

find-floorclj

(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.
sourceraw docstring

flush-index!clj

(flush-index! mi)

Persist the PSS index to konserve.

Persist the PSS index to konserve.
sourceraw docstring

index!clj

(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.
sourceraw docstring

metadata-comparatorclj

Comparator for metadata entries: [:branch :key :value]

Comparator for metadata entries: [:branch :key :value]
sourceraw docstring

rebuild-from-snapshots!clj

(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).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close