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

Method list_session_heads

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

Read every mutable session head for index rebuilds.

(&self)

Source from the content-addressed store, hash-verified

640
641 /// Read every mutable session head for index rebuilds.
642 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {
643 let table = self.txn.open_table(SESSION_HEADS)?;
644 let mut heads = Vec::new();
645 for result in table.iter()? {
646 let (session_id, hash) = result?;
647 heads.push((
648 session_id.value().to_string(),
649 crate::types::Hash::from_bytes(*hash.value()),
650 ));
651 }
652 Ok(heads)
653 }
654
655 /// Get all session events for a provenance graph.
656 ///

Callers 1

rebuild_session_indexMethod · 0.80

Calls 2

iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected