Return all records from the database.
(txn: lmdb.Transaction)
| 16 | |
| 17 | |
| 18 | def _dump_all(txn: lmdb.Transaction) -> list[dict[str, Any]]: |
| 19 | """Return all records from the database.""" |
| 20 | result: list[dict[str, Any]] = [] |
| 21 | for key, value in txn.cursor(): |
| 22 | result.append({"key": key.decode("utf-8"), "value": _decode_value(value)}) |
| 23 | return result |
| 24 | |
| 25 | |
| 26 | def _dump_selected(txn: lmdb.Transaction, keys: Iterable[str]) -> list[dict[str, Any]]: |
no test coverage detected