(&self)
| 63 | } |
| 64 | |
| 65 | fn list_operations(&self) -> PristineResult<Vec<Operation>> { |
| 66 | let table = match self.txn.open_table(OPERATIONS) { |
| 67 | Ok(table) => table, |
| 68 | Err(redb::TableError::TableDoesNotExist(_)) => { |
| 69 | return Err(PristineError::OperationSchemaUnavailable); |
| 70 | } |
| 71 | Err(error) => return Err(error.into()), |
| 72 | }; |
| 73 | let mut operations = Vec::new(); |
| 74 | for entry in table.iter()? { |
| 75 | let (key, value) = entry?; |
| 76 | operations.push(decode_operation_row(key.value(), value.value())?); |
| 77 | } |
| 78 | Ok(operations) |
| 79 | } |
| 80 | |
| 81 | fn get_operation_heads(&self, scope: OperationScope) -> PristineResult<OperationHeads> { |
| 82 | let table = match self.txn.open_table(OP_HEADS) { |
nothing calls this directly
no test coverage detected