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

Function visit_tables

atomic-core/src/pristine/schema.rs:64–191  ·  view source on GitHub ↗

Visit every table a repository database may contain.

(visitor: &mut impl TableVisitor)

Source from the content-addressed store, hash-verified

62
63/// Visit every table a repository database may contain.
64pub(crate) fn visit_tables(visitor: &mut impl TableVisitor) -> PristineResult<()> {
65 // ID mappings
66 visitor.table(EXTERNAL)?;
67 visitor.table(INTERNAL)?;
68 visitor.table(NODE_TYPES)?;
69
70 // Graph
71 visitor.multimap(GRAPH)?;
72 visitor.multimap(INODE_GRAPH)?;
73 visitor.multimap(POSITION_ATTRS)?;
74 visitor.multimap(INODE_ATTRS)?;
75
76 // Span-backed content indexes are part of the same immutable repository
77 // state and must be copied and checked during legacy database merging.
78 visitor.table(super::span_patch_storage::FILES)?;
79 visitor.table(super::span_patch_storage::ROOTS)?;
80 visitor.table(super::span_patch_storage::SPANS)?;
81 visitor.multimap(super::span_patch_storage::EDITS)?;
82 visitor.table(super::span_patch_storage::APPLIED)?;
83
84 // Views
85 visitor.table(VIEWS)?;
86 visitor.table(WORKING_COPIES)?;
87 visitor.table(OPERATIONS)?;
88 visitor.table(OP_HEADS)?;
89 visitor.table(EFFECT_RECEIPTS)?;
90 visitor.table(VIEW_CHANGES)?;
91 visitor.table(REV_VIEW_CHANGES)?;
92 visitor.table(VIEW_SET_ID_INDEX)?;
93 visitor.table(CONFLICTS)?;
94 visitor.table(PENDING_UNTRACKS)?;
95
96 // File tree
97 visitor.table(PRISTINE_META)?;
98 visitor.multimap(PATH_CLAIMS)?;
99 visitor.table(TREE)?;
100 visitor.table(REV_TREE)?;
101 visitor.table(INODES)?;
102 visitor.table(REV_INODES)?;
103 visitor.table(DIRECTORIES)?;
104 visitor.table(FILE_INDEX)?;
105 visitor.table(FILE_INDEX_V2)?;
106
107 // Dependencies
108 visitor.multimap(DEPS)?;
109 visitor.multimap(REV_DEPS)?;
110 visitor.multimap(CHANGE_DEPS)?;
111 visitor.multimap(REV_CHANGE_DEPS)?;
112 visitor.table(CHANGE_DEPS_INDEXED)?;
113 visitor.table(APPLIED_CHANGES)?;
114
115 // State and tags
116 visitor.table(STATES)?;
117 visitor.table(MERKLE_CHAIN)?;
118 visitor.table(TAG_RECORDS)?;
119 visitor.table(TAG_NAME_INDEX)?;
120 visitor.table(GIT_SHA_INDEX)?;
121 visitor.table(GIT_COMMIT_CLOSURES)?;

Callers 3

table_namesFunction · 0.85
merge_intoMethod · 0.85
collect_digestsFunction · 0.85

Calls 2

tableMethod · 0.45
multimapMethod · 0.45

Tested by

no test coverage detected