SQLiteIndexBackend
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 |
|---|---|
| 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 coord names known to the index. |
| 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 id 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. |
| query | Return the flat patch-row relation for a query (or several). |
| query_ids | Return matching patch ids in presentation order (ids only). |
| 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. |