db: migrate from lmdb-zero to heed

This commit is contained in:
ardocrat
2026-04-16 12:12:34 +03:00
parent 90dab5fcc6
commit 1036ca6ac1
16 changed files with 594 additions and 532 deletions
+4 -4
View File
@@ -76,7 +76,7 @@ fn test_exists() -> Result<(), store::Error> {
let value = [1, 1, 1, 1];
// Start new batch and insert a new key/value entry.
let batch = store.batch()?;
let mut batch = store.batch()?;
batch.put(&key, &value)?;
// Check we can see the new entry in uncommitted batch.
@@ -105,7 +105,7 @@ fn test_iter() -> Result<(), store::Error> {
let value = [1, 1, 1, 1];
// Start new batch and insert a new key/value entry.
let batch = store.batch()?;
let mut batch = store.batch()?;
batch.put(&key, &value)?;
// TODO - This is not currently possible (and we need to be aware of this).
@@ -144,7 +144,7 @@ fn lmdb_allocate() -> Result<(), store::Error> {
println!("Allocating chunk: {}", i);
let chunk = PhatChunkStruct::new();
let key_val = format!("phat_chunk_set_1_{}", i);
let batch = store.batch()?;
let mut batch = store.batch()?;
let key = store::to_key(b'P', &key_val);
batch.put_ser(&key, &chunk)?;
batch.commit()?;
@@ -160,7 +160,7 @@ fn lmdb_allocate() -> Result<(), store::Error> {
println!("Allocating chunk: {}", i);
let chunk = PhatChunkStruct::new();
let key_val = format!("phat_chunk_set_2_{}", i);
let batch = store.batch()?;
let mut batch = store.batch()?;
let key = store::to_key(b'P', &key_val);
batch.put_ser(&key, &chunk)?;
batch.commit()?;