1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-08-06 17:40:59 +00:00

feat: additional implementation of export logic

This commit is contained in:
Tglman 2023-08-27 16:32:17 +01:00
parent 6c8da70122
commit 5e52438b6f
6 changed files with 69 additions and 16 deletions

View file

@ -50,14 +50,14 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
let snapshot = self.persy.snapshot()?;
let indexes = snapshot.list_indexes()?;
for (index, _) in indexes {
exporter.start_index(&index)?;
exporter.start_tree(&index)?;
let data = snapshot.range::<ByteVec, ByteVec, _>(&index, ..)?;
for (key, values) in data {
for value in values {
exporter.key_value(&key, &value)?;
}
}
exporter.end_index(&index)?;
exporter.end_tree(&index)?;
}
Ok(())
}