(sigil store db)
Exports
init-store-dbprocedureInitialize the store database schema.
Creates the items, refs, and roots tables if they don't exist.
db-add-itemprocedureAdd an item record to the database.
db-get-itemprocedureGet an item record by store path.
Returns an alist with item fields, or #f if not found.
db-get-item-by-hashprocedureGet 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.
db-get-item-by-deriverprocedureGet the item produced by an exact full derivation hash. Seal derivation hashes identify one output item for the current single-output store schema.
db-item-exists?procedureCheck if an item exists in the database.
db-list-itemsprocedureList all item store paths.
db-delete-itemprocedureDelete an item record from the database.
Also removes any reference edges involving this item.
db-add-refprocedureAdd a reference edge: referrer depends on reference.
db-get-refsprocedureGet the store paths that an item references (its dependencies).
db-get-referrersprocedureGet the store paths that reference a given item (its reverse deps).
db-add-rootprocedureRegister a GC root pointing to a store path.
db-remove-rootprocedureRemove a GC root by name.
db-list-rootsprocedureList all GC roots as alists with name and item_path.
db-root-itemsprocedureGet all unique item paths referenced by roots.
db-set-metadatavariable(No description)
db-get-metadatavariable(No description)