Skip to content

Commit

Permalink
Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Oct 13, 2024
1 parent 9c25e22 commit fdb62fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.8.0] - unreleased

- [PR #27](https://github.com/itsallcode/simple-jdbc/pull/27): Update dependencies
- [PR #28](https://github.com/itsallcode/simple-jdbc/pull/28): Refactored batch inserts (**Breaking change**)

## [0.7.1] - 2024-09-01

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add dependency to your gradle project:

```groovy
dependencies {
implementation 'org.itsallcode:simple-jdbc:0.7.1'
implementation 'org.itsallcode:simple-jdbc:0.8.0'
}
```

Expand All @@ -43,8 +43,11 @@ import org.itsallcode.jdbc.resultset.SimpleResultSet;
ConnectionFactory connectionFactory = ConnectionFactory.create();
try (SimpleConnection connection = connectionFactory.create("jdbc:h2:mem:", "user", "password")) {
connection.executeScript(readResource("/schema.sql"));
connection.insert("NAMES", List.of("ID", "NAME"), Name::toRow,
Stream.of(new Name(1, "a"), new Name(2, "b"), new Name(3, "c")));
connection.batchInsert(Name.class)
.into("NAMES", List.of("ID", "NAME"))
.rows(Stream.of(new Name(1, "a"), new Name(2, "b"), new Name(3, "c")))
.mapping(Name::setPreparedStatement)
.start();
try (SimpleResultSet<Row> rs = connection.query("select * from names order by id")) {
List<Row> result = rs.stream().toList();
assertEquals(3, result.size());
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group 'org.itsallcode'
version = '0.7.1'
version = '0.8.0'

dependencies {
}
Expand Down

0 comments on commit fdb62fa

Please sign in to comment.