MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_operations

Method list_operations

atomic-core/src/pristine/txn/write/operation.rs:65–79  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 4

valueMethod · 0.80
decode_operation_rowFunction · 0.70
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected