Skip to main content

Crate ublx_catalog

Crate ublx_catalog 

Source
Expand description

Catalog paths, SQLite schema/ops, and headless open/read (THI-155 Phase 2).

Layers, bottom up:

  • paths: names, user dirs, and UblxPaths for an indexed root.
  • db_ops: .ublx schema plus snapshot / settings / delta_log / lens reads and writes.
  • open / read: resolve a directory to a read connection and run shared list/detail queries.

Nothing here depends on the TUI, UblxOpts, or the ublx serve feature: nefaxer / zahirscan types are used directly (nefax, zahir) and callers pass plain data (UblxSettings) or closures instead of app options.

Re-exports§

pub use nefax::NefaxDiff;
pub use nefax::NefaxPathMeta;
pub use nefax::NefaxResult;
pub use paths::UBLX_NAMES;
pub use paths::UblxNames;
pub use paths::UblxPaths;
pub use paths::cache_dir;
pub use paths::config_dir;
pub use paths::db_dir;
pub use paths::get_log_path;
pub use paths::global_config_toml;
pub use paths::hash_suffix_from_db_stem;
pub use paths::is_hex_hash16;
pub use paths::last_applied_config_path;
pub use paths::normalize_rel_path_for_policy;
pub use paths::path_is_under_or_equal;
pub use paths::path_to_hex;
pub use paths::rel_path_is_exact_local_config_toml;
pub use settings::UblxSettings;
pub use util::canonicalize_dir_to_ublx;
pub use util::expand_home_dir_arg;
pub use util::get_created_ns;
pub use util::normalize_snapshot_rel_path_str;
pub use util::snapshot_rel_path_buf;
pub use util::try_validate_dir;
pub use zahir::ZahirFT;
pub use zahir::ZahirOutput;
pub use zahir::ZahirResult;
pub use zahir::file_type_from_metadata_name;
pub use zahir::get_zahir_output_by_path;
pub use zahir::zahir_metadata_name_from_indexed_file;
pub use zahir::zahir_metadata_name_from_path_hint;
pub use zahir::zahir_output_to_json;
pub use zahir::zahir_output_to_json_for_path;

Modules§

db_ops
SQLite .ublx database (per ublx root / working tree): schema DDL and statement constants, open/create, and read/write of snapshot rows (paths, mtimes, hashes, category, zahir_json), settings, delta_log (per-index run: added / modified / removed), lens / lens_path, and related helpers (live snapshot wiring, path resolution, duplicate extraction, zahir export).
nefax
Nefaxer type aliases used by the snapshot tables (no runner: nefax_dir stays in ublx).
open
Resolve indexed DIR → .ublx path and open a read connection for headless subcommands.
paths
On-disk paths for indexed roots: names, user dirs, and UblxPaths.
read
Shared read-only catalog queries for ublx query and ublx serve.
settings
Cached tuning settings persisted in the settings table.
util
Small path / time helpers used by catalog resolve, db_ops, and headless open.
zahir
Pure zahirscan helpers the snapshot tables need: file-type labels for category and zahir_json serialization. The extract_zahir runners stay in ublx (integrations::zahir_ops).