2026-04-23 17:46:11 -04:00
|
|
|
//! SQLite schema, on-disk open/recreate, and row-level repository helpers.
|
2026-04-21 23:00:47 -04:00
|
|
|
//!
|
2026-08-02 19:04:30 -04:00
|
|
|
//! Policy: the indexer (owner) opens via [`open::open_or_recreate`], which on
|
|
|
|
|
//! any schema mismatch — wrong version, drifted tokenizer, absent
|
|
|
|
|
//! `schema_info` — wipes the DB and rebuilds from [`schema::SCHEMA_CURRENT`].
|
|
|
|
|
//! There are no in-place migrations by design; re-indexing is accepted as the
|
|
|
|
|
//! cost of avoiding migration-path complexity. *Consumers* (search, status,
|
|
|
|
|
//! size, `clear`) instead use [`open::open_existing`], which never creates or
|
|
|
|
|
//! wipes — a tokenizer difference or stale version is an error, not data loss.
|
2026-04-21 23:00:47 -04:00
|
|
|
|
2026-08-02 20:21:19 -04:00
|
|
|
pub mod key;
|
2026-04-23 17:46:11 -04:00
|
|
|
pub mod open;
|
2026-04-21 23:00:47 -04:00
|
|
|
pub mod repo;
|
|
|
|
|
pub mod schema;
|
|
|
|
|
|
2026-08-02 20:21:19 -04:00
|
|
|
pub use key::{process_key_hex, set_process_key};
|
|
|
|
|
pub use open::{
|
2026-08-03 03:06:19 -04:00
|
|
|
index_needs_rebuild, open_existing, open_or_recreate, verify_process_key,
|
|
|
|
|
CURRENT_SCHEMA_VERSION, KEY_MISMATCH_PREFIX,
|
2026-08-02 20:21:19 -04:00
|
|
|
};
|