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

Method init_kg

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

Initialize the knowledge graph tables.

(&self)

Source from the content-addressed store, hash-verified

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

Calls 2

write_txnMethod · 0.80
commitMethod · 0.80