()
| 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'); |
nothing calls this directly
no test coverage detected