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

Method load_change

atomic-repository/src/redb_change_store/queries.rs:306–313  ·  view source on GitHub ↗

Load a full `Change` from the redb store. This reads all tables for the change and reassembles a `Change` object. Equivalent to deserializing a complete `.change` file. For layer-selective reads (e.g., graph-only), use `load_graph_sections()` or `load_semantic_sections()` instead.

(&self, hash: &[u8; 32])

Source from the content-addressed store, hash-verified

304 /// For layer-selective reads (e.g., graph-only), use `load_graph_sections()`
305 /// or `load_semantic_sections()` instead.
306 pub fn load_change(&self, hash: &[u8; 32]) -> RedbStoreResult<Change> {
307 let v3_bytes = self.export_v3_bytes(hash)?;
308 let mut cursor = Cursor::new(&v3_bytes);
309 let (change, _verified_hash) = Change::deserialize(&mut cursor).map_err(|e| {
310 RedbStoreError::Corrupt(format!("change deserialization failed: {}", e))
311 })?;
312 Ok(change)
313 }
314
315 /// Delete a change from the store.
316 ///

Calls 2

deserializeFunction · 0.85
export_v3_bytesMethod · 0.80