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