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

Method init_kg

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

Initialize the knowledge graph tables.

(&self)

Source from the content-addressed store, hash-verified

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

Calls 2

write_txnMethod · 0.80
commitMethod · 0.80