SQLiteIndexBackend

class of dascore.io.index.backend source

SQLiteIndexBackend(
    path ,
)

The index backend: persists the schema and answers flat-relation queries.

Everything above this layer (catalog, indexer) talks to this class. Its state is one SQLite connection, and it is safe to share across threads: statement execution is serialized on a reentrant lock, since a pandas fetch spans many cursor calls and interleaving them corrupts result frames.

Methods

Name Description
associated_coord_names Return every coord name some patch holds on a dimension not its own.
attr_names Return original attr names known to the index.
attr_stated_ids Return the ids of the patches which state a value for one attr.
attr_units Return the canonical units the index stores one attr’s kinds in.
close Close the database connection.
coord_dims_map Return each coord name’s dims string (first observed wins).
coord_meta Return distinct coordinate names, kinds, and canonical units,
coord_names Return the coord names a query may select on.
coord_runs The runs one coordinate is stored as, per patch, as envelope objects.
count Count matching patches without projecting or pivoting rows.
delete_sources Remove sources (identified by base_uri + path) and dependents.
export_records Reconstruct source records, filtering by patch row in SQL.
get_metadata Return index-level metadata.
get_sources Return the sources table.
mark_initial_update_done Persist successful completion of a directory index’s first update.
move_sources Rewrite source paths in place (filesystem renames), atomically.
patch_ids_by_key Each patch’s id, by its source patch key (a plan’s output id).
patch_runs The run records each of these patches links, in order, by patch row.
query Return the flat patch-row relation for a query (or several).
query_rows Return ordered patch ids, optionally limited after exact filtering.
renumber_ordinals_by_time Renumber source ordinals into time order.
source_stats Return only the columns incremental change detection needs.
write_sources Insert or replace sources and all dependent rows, atomically.