Skip to main content

Crate gonzalo_graph_sqlite

Crate gonzalo_graph_sqlite 

Source
Expand description

A persistent, SQLite-backed [GraphStore] (ticket B).

Resolves the scalable-backend spike in favour of SQLite (rusqlite, bundled): FOSS/local, a natural fit for the sync [GraphStore] trait, and able to persist a view built once at index time rather than re-assembling it into memory on every query. Symbols and references live in two path-keyed tables; insert replaces a path’s rows transactionally, so re-indexing a file never duplicates its symbols. callees/impact use the trait defaults.

The GraphStore trait is infallible, so query methods expect on the embedded database — a failure there is corruption/programmer error, not a recoverable condition. The connection is held behind a Mutex (rusqlite’s Connection is Send but not Sync, and GraphStore requires Sync); read concurrency via a connection pool is a follow-on.

Structs§

SqliteGraphStore
A [GraphStore] backed by a SQLite database.

Functions§

view_db_path
The database file for a view’s graph under graph_root: <graph_root>/<repo>/<view_id>.db, with repo/view_id made filesystem-safe. Writer (indexer) and reader (server) must agree on this.