sigildocs

(sigil store db)

Exports

init-store-dbprocedure

Initialize the store database schema.

Creates the items, refs, and roots tables if they don't exist.

db-add-itemprocedure

Add an item record to the database.

db-get-itemprocedure

Get an item record by store path.

Returns an alist with item fields, or #f if not found.

Get an item record by its full content hash. Output hashes are not unique in principle (two derivations may produce identical bytes), so callers receive every matching row in stable path order and can apply their own provenance policy.

Get the item produced by an exact full derivation hash. Seal derivation hashes identify one output item for the current single-output store schema.

Check if an item exists in the database.

db-list-itemsprocedure

List all item store paths.

Delete an item record from the database.

Also removes any reference edges involving this item.

db-add-refprocedure

Add a reference edge: referrer depends on reference.

db-get-refsprocedure

Get the store paths that an item references (its dependencies).

Get the store paths that reference a given item (its reverse deps).

db-add-rootprocedure

Register a GC root pointing to a store path.

Remove a GC root by name.

db-list-rootsprocedure

List all GC roots as alists with name and item_path.

db-root-itemsprocedure

Get all unique item paths referenced by roots.

(No description)

(No description)