Initialize the knowledge graph tables.
(&self)
| 12 | impl Repository { |
| 13 | /// Initialize the knowledge graph tables. |
| 14 | pub fn init_kg(&self) -> Result<(), RepositoryError> { |
| 15 | let mut txn = self |
| 16 | .pristine |
| 17 | .write_txn() |
| 18 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 19 | txn.init_kg() |
| 20 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 21 | txn.commit() |
| 22 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 23 | Ok(()) |
| 24 | } |
| 25 | |
| 26 | /// Extract KG nodes and edges from a vault entry. |
| 27 | /// |