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

Method has_change_in_graph

atomic-core/src/pristine/txn/write/graph.rs:267–276  ·  view source on GitHub ↗
(&self, change_id: NodeId)

Source from the content-addressed store, hash-verified

265 }
266
267 fn has_change_in_graph(&self, change_id: NodeId) -> PristineResult<bool> {
268 let table = self.txn.open_multimap_table(GRAPH)?;
269 let start_key = encode_vertex(change_id.get(), 0, 0);
270 let end_key = encode_vertex(change_id.get(), u64::MAX, u64::MAX);
271 let has = table
272 .range::<&[u8; 24]>(&start_key..=&end_key)?
273 .next()
274 .is_some();
275 Ok(has)
276 }
277}

Callers

nothing calls this directly

Calls 3

encode_vertexFunction · 0.85
getMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected