Get a single KG node by ID.
(&self, id: &str)
| 485 | |
| 486 | /// Get a single KG node by ID. |
| 487 | pub fn vault_kg_node(&self, id: &str) -> Result<Option<KgNode>, RepositoryError> { |
| 488 | let txn = self |
| 489 | .pristine |
| 490 | .read_txn() |
| 491 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 492 | txn.get_kg_node(id) |
| 493 | .map_err(|e| RepositoryError::Database(e.to_string())) |
| 494 | } |
| 495 | |
| 496 | /// Count total KG nodes. |
| 497 | pub fn vault_kg_node_count(&self) -> Result<usize, RepositoryError> { |