db: migrate from lmdb-zero to heed
This commit is contained in:
+4
-4
@@ -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()?;
|
||||
|
||||
Reference in New Issue
Block a user