Hey HN, OP here.
I've spent the last few months building a tool to help migrate legacy Oracle systems, specifically the heavy business logic trapped in PL/SQL packages.
The Problem: Most migration tools fail on complex logic like CONNECT BY (recursion), SELECT FOR UPDATE (locking), or extensive cursor loops. LLMs alone hallucinate variables or forget context.
The Solution: I built a pipeline that mixes AST parsing with LLMs (Claude Sonnet/Gemini). It works in stages:
Pre-Analysis: Maps the schema and detects complexity patterns.
Planning: Decides the architecture (Services, DTOs).
Generation: Converts SQL to Java 17/Spring Boot 3.3.
Self-Healing: A feedback loop that tries to compile the code in a Docker sandbox and fixes syntax errors automatically before delivering.
It handles recursive queries by converting them to WITH RECURSIVE CTEs in JPQL/Native Query, and maps FOR UPDATE to JPA Pessimistic Locks.
It's running on Node.js with BullMQ/Redis for the async processing queue.
I'd love to hear your feedback on the generated code quality.
Link to demo: https://blog.thalesouza.com.br/en/blog/logic-migration/
trsthales•1h ago