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

Method list_session_heads

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

Read every mutable session head for index rebuilds.

(&self)

Source from the content-addressed store, hash-verified

1133
1134 /// Read every mutable session head for index rebuilds.
1135 pub fn list_session_heads(&self) -> PristineResult<Vec<(String, crate::types::Hash)>> {
1136 let table = self.txn.open_table(SESSION_HEADS)?;
1137 let mut heads = Vec::new();
1138 for result in table.iter()? {
1139 let (session_id, hash) = result?;
1140 heads.push((
1141 session_id.value().to_string(),
1142 crate::types::Hash::from_bytes(*hash.value()),
1143 ));
1144 }
1145 Ok(heads)
1146 }
1147
1148 /// Get all session events for a provenance graph.
1149 ///

Callers 1

rebuild_session_indexMethod · 0.80

Calls 3

valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected