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

Method list_session_heads

atomic-core/src/pristine/txn/read.rs:687–698  ·  view source on GitHub ↗

Read every mutable session head for index rebuilds.

(&self)

Source from the content-addressed store, hash-verified

685
686 /// Read every mutable session head for index rebuilds.
687 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {
688 let table = self.txn.open_table(SESSION_HEADS)?;
689 let mut heads = Vec::new();
690 for result in table.iter()? {
691 let (session_id, hash) = result?;
692 heads.push((
693 session_id.value().to_string(),
694 crate::types::Hash::from_bytes(*hash.value()),
695 ));
696 }
697 Ok(heads)
698 }
699
700 /// Get all session events for a provenance graph.
701 ///

Callers 1

rebuild_session_indexMethod · 0.80

Calls 2

iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected