diff --git a/README.md b/README.md index 35fdab1..b6bb151 100644 --- a/README.md +++ b/README.md @@ -1 +1,67 @@ -# sqlschema2java \ No newline at end of file +# SQLSchema2Java [![Publish package to GitHub Packages](https://github.com/Sassine/sqlschema2java/actions/workflows/deploy.yml/badge.svg)](https://github.com/Sassine/sqlschema2java/actions/workflows/deploy.yml) [![CodeQL main](https://github.com/Sassine/sqlschema2java/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/Sassine/sqlschema2java/actions/workflows/codeql-analysis.yml) + +![Logo SQL2JAVA and website adress sassine.dev/sqlschema2java](https://sassine.dev/assets/images/SQLSchema2Java_Logo2.png) + + +_sqlschema2java_ generates Java types from SQLSchema and annotate those types for data-binding with Jackson 2.x, Javax Persistence and Spring Repository. + +You can use sqlschema2java as a Maven plugin. +[**Try at the sample project exemple**](https://github.com/Sassine/sqlschema2java/tree/main/sqlschema2java-example) + +## Implementation + +#### A very simple Maven example: +```xml +pom.xml + + + dev.sassine.api + sqlschema2java-maven-plugin + 1.0.0 + + + + sqlschema2java + + + + + /user/home/example.sql + dev.sassine.api + true + false + + + + + + + github + GitHub Packages SQLSchema2Java + https://maven.pkg.github.com/Sassine/sqlschema2java + + +``` +### Parameters +| Name | required | type | description | +|--|--|--|--| +| sourceDirectory | true | String | SQL file path | +| packageName | true | String | package name with points that will be generated | +| useAutoIncrement| false | Boolean| disable or enable whether the primary key will have its value generated automatically | +| isPostgres| true | Boolean | disable or enable query conversion compatible with postgres database | + + +##### Run command +```bash +mvn dev.sassine.api:sqlschema2java-maven-plugin:generate +``` +Successful ✨ + +## Contributing +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License + +[MIT ](https://github.com/Sassine/sqlschema2java/blob/main/LICENSE) \ No newline at end of file