Skip to main content

STORE_OBJECT

Constant STORE_OBJECT 

Source
pub const STORE_OBJECT: &str = "\
INSERT INTO objects(hash, size, refcount) VALUES(:hash, :size, 0) \
ON CONFLICT(hash) DO UPDATE SET size = excluded.size";
Expand description

Indexes an object by its content hash at refcount 0; re-storing a known hash only refreshes its size, since the count belongs to ADJUST_REFCOUNT.