Skip to main content

Module store

Module store 

Source
Expand description

Graph storage backends for AINL memory.

Defines the GraphStore trait and the SQLite implementation.

§Referential integrity (SQLite)

ainl_graph_edges uses real FOREIGN KEY (from_id) / FOREIGN KEY (to_id) references to ainl_graph_nodes(id) with ON DELETE CASCADE. SqliteGraphStore::open and SqliteGraphStore::from_connection run PRAGMA foreign_keys = ON on the handle.

Databases created before these constraints used a plain edges table; SqliteGraphStore::ensure_schema runs a one-time migrate_edges_add_foreign_keys rebuild. Edge rows whose endpoints are missing from ainl_graph_nodes cannot be kept under FK rules and are omitted from the migrated copy.

SQLite tables integrate with existing openfang-memory schema where applicable.

Structs§

SqliteGraphStore
SQLite implementation of GraphStore

Traits§

GraphStore
Graph memory storage trait - swappable backends