MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / extract

Method extract

src/extraction/mybatis-extractor.ts:79–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 }
78
79 extract(): ExtractionResult {
80 const startTime = Date.now();
81
82 const fileNode = this.createFileNode();
83
84 try {
85 const root = this.findMapperRoot();
86 if (root) {
87 this.extractMapper(fileNode.id, root.namespace, root.dialect, root.bodyStart, root.bodyEnd);
88 }
89 } catch (error) {
90 this.errors.push({
91 message: `MyBatis extraction error: ${error instanceof Error ? error.message : String(error)}`,
92 severity: 'error',
93 code: 'parse_error',
94 });
95 }
96
97 return {
98 nodes: this.nodes,
99 edges: this.edges,
100 unresolvedReferences: this.unresolvedReferences,
101 errors: this.errors,
102 durationMs: Date.now() - startTime,
103 };
104 }
105
106 private createFileNode(): Node {
107 const lines = this.source.split('\n');

Callers

nothing calls this directly

Calls 3

createFileNodeMethod · 0.95
findMapperRootMethod · 0.95
extractMapperMethod · 0.95

Tested by

no test coverage detected