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

Method has_change_in_graph

atomic-core/src/pristine/txn/read.rs:296–305  ·  view source on GitHub ↗
(&self, change_id: NodeId)

Source from the content-addressed store, hash-verified

294 }
295
296 fn has_change_in_graph(&self, change_id: NodeId) -> PristineResult<bool> {
297 let table = self.txn.open_multimap_table(GRAPH)?;
298 let start_key = encode_vertex(change_id.get(), 0, 0);
299 let end_key = encode_vertex(change_id.get(), u64::MAX, u64::MAX);
300 let has = table
301 .range::<&[u8; 24]>(&start_key..=&end_key)?
302 .next()
303 .is_some();
304 Ok(has)
305 }
306}
307
308// ViewTxnT Implementation

Callers

nothing calls this directly

Calls 4

encode_vertexFunction · 0.85
getMethod · 0.65
nextMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected