This is a PostgresSQL driver which extends the PostgreSQL JDBC driver from https://jdbc.postgresql.org/ to handle SQL Server constructs. Basically, the intention here is to reduce the effort of migrating from SQL Server to PostgreSQL. We intend to cover as many cases as possible, but we know that there are certain limitations and not all MSSQL queries can directly be converted to PostgreSQL compatible ones.
The project builds upon Antlr grammars available here: https://github.com/antlr/grammars-v4/tree/master/tsql and traverses through the parse tree to generate the Postgres compatible SQL.
- The test cases use TestContainers and therefore docker must be installed
- Run
./gradlew clean build -x signArchives
to compile the project, generate the jar, and run tests
- The library releases can be downloaded from Maven Central. The groupId and artifactId are io.github.kislaykishore and mssqlpgbridge respectively.
- In order to load the driver, execute
Class.forName("mssqlpgbridge.driver.PgAdapterDriver");
- JDBC URLs have similar construct as that of the Postgres JDBC driver, just that, instead of jdbc:postgresql://, here we have jdbc:mssqlpgbridge://
- Refer to the test cases for samples
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md file for details