PatchCatalog

class of dascore.io.index.catalog source

PatchCatalog(
    resolver ,
    backend = None,
    syncer = None,
    queries = (),
    residuals = (),
    revision = None,
    order = None,
    ids = None,
    default_order = None,
)

Query-composable metadata catalog over the spool index tables.

Instances are lightweight views: select returns a new catalog sharing the backend and resolver with composed predicates. Mutation (add, update, remove) is only allowed on the root view.

Methods

Name Description
add Add live patches to the catalog.
attr_names Attr names known to the index.
close Close the backend (root and all views share it).
coord_names Coord names known to the index.
from_directory Catalog over a directory of fiber files.
get_metadata Index-level metadata.
get_patch Materialize one patch: resolve, then exact two-stage trim.
order_by Return a view presenting rows ordered by an attribute or coord.
ordered_ids The view’s patch ids in presentation order (ids only, cheap).
remove Remove sources (and their patches) from the catalog.
resolve_row Resolve one flat-relation row and apply exact residual selects.
restrict Return a view keeping the presented rows an array selects.
select Compose a selection; validation is eager, execution is lazy.
sources The sources table.
to_df The spool-facing flat patch-row relation under the selection.
transfer_is_lossy Whether a table-level transfer of this view would lose state.
from_file Catalog over a single fiber file.
update Sync a directory-backed catalog with the filesystem.
window Return a view restricted to a slice of the presented rows.