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

Method list_registered_changes

atomic-core/src/pristine/txn/read.rs:241–257  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

239 }
240
241 fn list_registered_changes(&self) -> PristineResult<Vec<(NodeId, Hash)>> {
242 let external = self.txn.open_table(EXTERNAL)?;
243 let node_types = self.txn.open_table(NODE_TYPES)?;
244 let mut changes = Vec::new();
245 for result in external.iter()? {
246 let (key, value) = result?;
247 let node_id = NodeId::new(key.value());
248 let is_change = node_types
249 .get(node_id.get())?
250 .map(|node_type| node_type.value() == node_type::CHANGE)
251 .unwrap_or(true);
252 if is_change {
253 changes.push((node_id, Hash::from_bytes(*value.value())));
254 }
255 }
256 Ok(changes)
257 }
258
259 fn iter_adjacent(
260 &self,

Callers 6

prepare_migrationFunction · 0.45
loadMethod · 0.45

Calls 4

valueMethod · 0.80
getMethod · 0.65
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected