pub struct SqliteGraphStore { /* private fields */ }Expand description
SQLite-backed graph store.
§Temp-table invariant
Several methods — replace_projection_with_version, upsert_projection,
edges_between_nodes, and breadth_first_search — create connection-scoped
TEMP TABLE staging areas inside the underlying SQLite connection. Two
concurrent calls on the same SqliteGraphStore (or sharing the same
connection through SqliteReadOnlyConnection) would collide on those temp
table names and produce incorrect results or errors.
Only one temp-table-using method may be active at a time per connection.
Implementations§
Source§impl SqliteGraphStore
impl SqliteGraphStore
pub fn open(db_path: &Path) -> Result<Self>
pub fn in_memory() -> Result<Self>
pub fn open_read_only(db_path: &Path) -> Result<Self>
pub fn open_read_only_resilient(db_path: &Path) -> Result<Self>
pub fn read_only_recovery(&self) -> Option<ReadOnlyRecovery>
pub fn has_user_triggers(&self) -> Result<bool>
pub fn replace_projection(&mut self, projection: &GraphProjection) -> Result<()>
pub fn replace_projection_with_version( &mut self, scope: impl Into<String>, projection: &GraphProjection, projection_version: Option<&str>, source_watermark: Option<String>, ) -> Result<SqliteProjectionRefresh>
Sourcepub fn derive_ontology(&self) -> Result<GraphProjection>
pub fn derive_ontology(&self) -> Result<GraphProjection>
Derive a Semantic Ontology Graph (#memgraphrag-ont, MemGraphRAG arxiv
2606.00610 third layer) from the instance graph: one ontology_type node
per distinct node kind, and one ontology_relation:<edge_kind> edge per
observed (from_kind, edge_kind, to_kind) triple, each carrying an
instance_count. This data-driven schema lets retrieval start from
abstract types and prune by permitted inter-type relations. Existing
ontology rows are excluded so the derivation is idempotent and never folds
the ontology layer into itself.