Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-core-jdk8</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-rowwriter-jdk8</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-jpa-jdk8</artifactId>
<version>6.0.0</version>
</dependency>
```

For Java11 you have to use the following dependencies:

```java
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-core</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-rowwriter</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-jpa</artifactId>
<version>6.0.0</version>
</dependency>
```

### 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!
Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/deployment/deploy_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/pgbulkinsert-bulkprocessor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-parent</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/pgbulkinsert-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-parent</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/pgbulkinsert-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-parent</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/pgbulkinsert-rowwriter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-parent</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion PgBulkInsert/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-parent</artifactId>
<packaging>pom</packaging>
<version>5.1.0</version>
<version>6.0.0</version>
<name>pgbulkinsert</name>
<description>PgBulkInsert is a Java library for Bulk Inserts with PostgreSQL.</description>
<url>http://www.github.com/bytefish/PgBulkInsert</url>
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,35 @@ You can add the following dependencies to your pom.xml to include [PgBulkInsert]
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-core</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
</dependency>

<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-rowwriter</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
</dependency>
```

If you are working with Java8 you have to add a ``-jdk8`` to the package names:


```xml
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-core-jdk8</artifactId>
<version>6.0.0</version>
</dependency>

<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-rowwriter-jdk8</artifactId>
<version>6.0.0</version>
</dependency>
```



## Supported PostgreSQL Types ##

* [Numeric Types](http://www.postgresql.org/docs/current/static/datatype-numeric.html)
Expand Down Expand Up @@ -339,7 +358,7 @@ add it as a dependency to your application:
<dependency>
<groupId>de.bytefish.pgbulkinsert</groupId>
<artifactId>pgbulkinsert-jpa</artifactId>
<version>5.1.0</version>
<version>6.0.0</version>
</dependency>
```

Expand Down