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:
parent
6c8da70122
commit
5e52438b6f
6 changed files with 69 additions and 16 deletions
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue