MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / vault_kg_node

Method vault_kg_node

atomic-repository/src/repository/vault_triples.rs:747–754  ·  view source on GitHub ↗

Get a single KG node by ID.

(&self, id: &str)

Source from the content-addressed store, hash-verified

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> {

Callers 1

Calls 2

read_txnMethod · 0.80
get_kg_nodeMethod · 0.45

Tested by 1