This project demonstrates some of my ideas for a SQL transplilation (conversion between Postgres and T-SQL dialects):
- Implement a parser that understands a couple of SQL dialects (Postgres and T-SQL).
- Implement a builder that converts AST into an internal representation of a SQL statement.
- Implement the output statement generator in the desired dialect.
For example, the Transpiler is able to convert a T-SQL statement such as
SELECT TOP 10 max([dbo].[col1]) FROM [dbo].[tbl]into an equivalent Postgres statement
SELECT max("dbo"."col1") FROM "dbo"."tbl" LIMIT 10and vice versa.
Requirement: Visual Studio 2022 Community Edition.
Detailed description of the development process is available in my blog.
I will appreciate feedback and suggestions for the project improvement (phoenicyan at gmail dot com).