Skip to content

T-SQL to Postgres and back SQL converter POC

License

phoenicyan/sql_transpiler

Repository files navigation

This project demonstrates some of my ideas for a SQL transplilation (conversion between Postgres and T-SQL dialects):

  1. Implement a parser that understands a couple of SQL dialects (Postgres and T-SQL).
  2. Implement a builder that converts AST into an internal representation of a SQL statement.
  3. 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 10

and 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).

About

T-SQL to Postgres and back SQL converter POC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published