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

Method list_operations

atomic-core/src/pristine/txn/read.rs:648–662  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

646 }
647
648 fn list_operations(&self) -> PristineResult<Vec<Operation>> {
649 let table = match self.txn.open_table(OPERATIONS) {
650 Ok(table) => table,
651 Err(redb::TableError::TableDoesNotExist(_)) => {
652 return Err(PristineError::OperationSchemaUnavailable);
653 }
654 Err(error) => return Err(error.into()),
655 };
656 let mut operations = Vec::new();
657 for entry in table.iter()? {
658 let (key, value) = entry?;
659 operations.push(decode_operation_row(key.value(), value.value())?);
660 }
661 Ok(operations)
662 }
663
664 fn get_operation_heads(&self, scope: OperationScope) -> PristineResult<OperationHeads> {
665 let table = match self.txn.open_table(OP_HEADS) {

Calls 4

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