Get a single KG node by ID.
(&self, id: &str)
| 745 | |
| 746 | /// Get a single KG node by ID. |
| 747 | pub fn vault_kg_node(&self, id: &str) -> Result<Option<KgNode>, RepositoryError> { |
| 748 | let txn = self |
| 749 | .pristine |
| 750 | .read_txn() |
| 751 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 752 | txn.get_kg_node(id) |
| 753 | .map_err(|e| RepositoryError::Database(e.to_string())) |
| 754 | } |
| 755 | |
| 756 | /// Count total KG nodes. |
| 757 | pub fn vault_kg_node_count(&self) -> Result<usize, RepositoryError> { |