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

Method has_content_chunk

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

Check if a content chunk exists in the store (by its content hash). This is used during delta push to determine which chunks the server already has without transferring them.

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

Source from the content-addressed store, hash-verified

268 /// This is used during delta push to determine which chunks the server
269 /// already has without transferring them.
270 pub fn has_content_chunk(&self, chunk_hash: &[u8; 32]) -> RedbStoreResult<bool> {
271 let txn = self.db().begin_read()?;
272 let table = txn.open_table(tables::CONTENT_CHUNKS)?;
273 Ok(table.get(chunk_hash)?.is_some())
274 }
275
276 /// Get the chunk manifest for a change.
277 ///

Callers

nothing calls this directly

Calls 2

dbMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected