diff --git a/CHANGELOG.md b/CHANGELOG.md index f7464e5..854e068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,116 @@ # CHANGELOG # +## 6.0.0 ## + +This release saw major improvements and some breaking changes. The release is +a dramatic improvement of the library, because it adds: + +* Java11 support +* Improved Type Safety +* Internal Refactorings to improve maintainability +* Build Pipelines +* Code Coverage +* Dependency updates + +All of this great work was done by [@jonfreedman](https://github.com/jonfreedman). + +### Packages ### + +There is a major change in how the library is released. The project now +targets both Java8 and Java11. You are able to use the JDK8 version by +appending "-jdk8" to the Maven Package name. + +So for Java8 you have to use the following dependencies: + +```java + + de.bytefish.pgbulkinsert + pgbulkinsert-core-jdk8 + 6.0.0 + + + de.bytefish.pgbulkinsert + pgbulkinsert-rowwriter-jdk8 + 6.0.0 + + + de.bytefish.pgbulkinsert + pgbulkinsert-jpa-jdk8 + 6.0.0 + +``` + +For Java11 you have to use the following dependencies: + +```java + + de.bytefish.pgbulkinsert + pgbulkinsert-core + 6.0.0 + + + de.bytefish.pgbulkinsert + pgbulkinsert-rowwriter + 6.0.0 + + + de.bytefish.pgbulkinsert + pgbulkinsert-jpa + 6.0.0 + +``` + +### Breaking Changes ### + +* ``PgBinaryWriter#open`` removed and now opened in constructor +* ``SimpleRowWriter#open`` removed and now opened in constructor +* ``SimpleRowWriter`` now implements the ``AutoClosable`` interface, so it can be used in try-with-resources blocks. +* ``PostgreSqlUtils#tryGetPGConnection`` now returns an ``Optional`` +* ``BulkProcessor#cancel`` static method removed + +### Additional Information ### + +* Static Analysis has been added to the project using [Error Prone](https://github.com/google/error-prone) +* Integration Tests are now run on every commit using Github Pipelines and the Postgres image. +* There have been a lot of refactorings internally, so the overall maintainability is improved. +* The project now has a Code Coverage report, so you get a feeling about the test coverage. +* The README now has badges, so it is easier to see the latest stable release. + +### Project development ### + +* The project has been moved to an organization structure, so it easier to assign rights and collaborate. + +## 5.1.0 ## + +This release saw additions and refactorings of the JPA module. It now supports a lot more +data types and is easier to configure by using annotations. If you want control over how +the data is written to the database, you can use the ``@PostgresDataType`` annotation, +which overrides the default values. + +Here is an example for mapping a ``short`` value to an ``int4`` Postgres data type. + + +```java +@Entity +@Table(name = "unit_test", schema = "public") +public static class SampleEntity { + + // ... + + @Column(name = "some_field_name") + @PostgresDataType(columnName = "some_field_name", dataType = DataType.Int4) + private Short shortField; + + public Short getShortField() { + return shortField; + } + + public void setShortField(Short shortField) { + this.shortField = shortField; + } +} +``` + ## 5.0.0 ## A lot of thanks to the great efforts of user [@cheffe](https://github.com/cheffe) in this release! diff --git a/PgBulkInsert/deployment/deploy_release.bat b/PgBulkInsert/deployment/deploy_release.bat index 8f0101b..d549e49 100644 --- a/PgBulkInsert/deployment/deploy_release.bat +++ b/PgBulkInsert/deployment/deploy_release.bat @@ -8,7 +8,7 @@ echo - Bundling Artifacts for OSSRH Repository Upload - echo --------------------------------------------------- :: Define the Executables, so we don't have to rely on pathes: -set MVN_EXECUTABLE="C:\Program Files (x86)\Maven\apache-maven-3.3.9\bin\mvn.cmd" +set MVN_EXECUTABLE="C:\Program Files (x86)\Maven\apache-maven-3.6.3\bin\mvn.cmd" set GPG_EXECUTABLE="C:\Program Files (x86)\GNU\GnuPG\pub\gpg.exe" :: GPG Key ID used for signing: diff --git a/PgBulkInsert/pgbulkinsert-bulkprocessor/pom.xml b/PgBulkInsert/pgbulkinsert-bulkprocessor/pom.xml index 6b4307d..fd2c01c 100644 --- a/PgBulkInsert/pgbulkinsert-bulkprocessor/pom.xml +++ b/PgBulkInsert/pgbulkinsert-bulkprocessor/pom.xml @@ -8,7 +8,7 @@ de.bytefish.pgbulkinsert pgbulkinsert-parent - 5.1.0 + 6.0.0 .. diff --git a/PgBulkInsert/pgbulkinsert-core/pom.xml b/PgBulkInsert/pgbulkinsert-core/pom.xml index dccb541..9b0cf99 100644 --- a/PgBulkInsert/pgbulkinsert-core/pom.xml +++ b/PgBulkInsert/pgbulkinsert-core/pom.xml @@ -8,7 +8,7 @@ de.bytefish.pgbulkinsert pgbulkinsert-parent - 5.1.0 + 6.0.0 .. diff --git a/PgBulkInsert/pgbulkinsert-jpa/pom.xml b/PgBulkInsert/pgbulkinsert-jpa/pom.xml index 8938a1e..9ecfe40 100644 --- a/PgBulkInsert/pgbulkinsert-jpa/pom.xml +++ b/PgBulkInsert/pgbulkinsert-jpa/pom.xml @@ -8,7 +8,7 @@ de.bytefish.pgbulkinsert pgbulkinsert-parent - 5.1.0 + 6.0.0 .. diff --git a/PgBulkInsert/pgbulkinsert-rowwriter/pom.xml b/PgBulkInsert/pgbulkinsert-rowwriter/pom.xml index 17a3f2b..36853e0 100644 --- a/PgBulkInsert/pgbulkinsert-rowwriter/pom.xml +++ b/PgBulkInsert/pgbulkinsert-rowwriter/pom.xml @@ -8,7 +8,7 @@ de.bytefish.pgbulkinsert pgbulkinsert-parent - 5.1.0 + 6.0.0 .. diff --git a/PgBulkInsert/pom.xml b/PgBulkInsert/pom.xml index baa1c82..05cb5e1 100644 --- a/PgBulkInsert/pom.xml +++ b/PgBulkInsert/pom.xml @@ -7,7 +7,7 @@ de.bytefish.pgbulkinsert pgbulkinsert-parent pom - 5.1.0 + 6.0.0 pgbulkinsert PgBulkInsert is a Java library for Bulk Inserts with PostgreSQL. http://www.github.com/bytefish/PgBulkInsert diff --git a/README.md b/README.md index ad9c28b..22f8614 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,35 @@ You can add the following dependencies to your pom.xml to include [PgBulkInsert] de.bytefish.pgbulkinsert pgbulkinsert-core - 5.1.0 + 6.0.0 de.bytefish.pgbulkinsert pgbulkinsert-rowwriter - 5.1.0 + 6.0.0 ``` +If you are working with Java8 you have to add a ``-jdk8`` to the package names: + + +```xml + + de.bytefish.pgbulkinsert + pgbulkinsert-core-jdk8 + 6.0.0 + + + + de.bytefish.pgbulkinsert + pgbulkinsert-rowwriter-jdk8 + 6.0.0 + +``` + + + ## Supported PostgreSQL Types ## * [Numeric Types](http://www.postgresql.org/docs/current/static/datatype-numeric.html) @@ -339,7 +358,7 @@ add it as a dependency to your application: de.bytefish.pgbulkinsert pgbulkinsert-jpa - 5.1.0 + 6.0.0 ```