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

Function graph_rows

atomic-core/tests/merge_test.rs:89–103  ·  view source on GitHub ↗
(
    db: &Database,
    definition: MultimapTableDefinition<&[u8; 24], &[u8; 24]>,
)

Source from the content-addressed store, hash-verified

87}
88
89fn graph_rows(
90 db: &Database,
91 definition: MultimapTableDefinition<&[u8; 24], &[u8; 24]>,
92) -> Vec<([u8; 24], [u8; 24])> {
93 let txn = db.begin_read().unwrap();
94 let table = txn.open_multimap_table(definition).unwrap();
95 let mut rows = Vec::new();
96 for entry in table.iter().unwrap() {
97 let (key, values) = entry.unwrap();
98 for value in values {
99 rows.push((*key.value(), *value.unwrap().value()));
100 }
101 }
102 rows
103}
104
105#[test]
106fn merge_copies_both_databases_and_records_the_legacy_dir() {

Callers

nothing calls this directly

Calls 5

begin_readMethod · 0.80
valueMethod · 0.80
unwrapMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected