(db: &Database, definition: TableDefinition<u64, V>)
| 71 | } |
| 72 | |
| 73 | fn table_rows<V>(db: &Database, definition: TableDefinition<u64, V>) -> Vec<(u64, Vec<u8>)> |
| 74 | where |
| 75 | V: for<'a> redb::Value<SelfType<'a> = &'a [u8]> + 'static, |
| 76 | { |
| 77 | let txn = db.begin_read().unwrap(); |
| 78 | let table = txn.open_table(definition).unwrap(); |
| 79 | table |
| 80 | .iter() |
| 81 | .unwrap() |
| 82 | .map(|entry| { |
| 83 | let (key, value) = entry.unwrap(); |
| 84 | (key.value(), value.value().to_vec()) |
| 85 | }) |
| 86 | .collect() |
| 87 | } |
| 88 | |
| 89 | fn graph_rows( |
| 90 | db: &Database, |
nothing calls this directly
no test coverage detected