Skip to content

Commit

Permalink
Prepare version 4.10.0
Browse files Browse the repository at this point in the history
Merging branch 'release/next'
  • Loading branch information
maximevw committed Sep 30, 2023
2 parents b66035e + 20a2264 commit b07d136
Show file tree
Hide file tree
Showing 118 changed files with 4,325 additions and 2,049 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
run: echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: Create GitHub release
uses: ncipollo/release-action@v1.12.0
uses: ncipollo/release-action@v1
with:
artifacts: "target/cassandra-jdbc-wrapper-${{ env.RELEASE_VERSION }}-bundle.jar"
name: "${{ env.RELEASE_VERSION }}"
Expand Down
29 changes: 24 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.10.0] - 2023-09-30
### Added
- Add support for new [`vector` CQL type](https://datastax-oss.atlassian.net/browse/JAVA-3060)
defined in [CEP-30](https://cwiki.apache.org/confluence/x/OQ40Dw)
Also see PR [#27](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/27).
- Implement the method `getWarnings()` in `CassandraResultSet`.
- Implement the following methods of `CassandraDatabaseMetaData`:
`getBestRowIdentifier(String, String, String, int, boolean)` and `getAttributes(String, String, String, String)`.
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.17.0.
- Update Apache Commons IO to version 2.13.0.
- Update Apache Commons Lang to version 3.13.0.
- Update Jackson dependencies to version 2.15.2.
- Packages refactoring: utility classes, types and database metadata management have been moved to dedicated packages.
### Removed
- Remove the legacy package `org.apache.cassandra2.cql.jdbc`: only `com.ing.data.cassandra.jdbc.CassandraDriver` should
be used now as `java.sql.Driver` implementation.

## [4.9.1] - 2023-09-03
### Fixed
- Fix issue [#25](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/25) causing failure when running with
Liquibase. The fix includes several changes:
- fixes result sets and statements closing.
- introduces a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously
(by default, they are executed asynchronously).
- returns the schema name instead of `null` when the method `CassandraConnection.getCatalog()` is called in Liquibase
- fixes result sets and statements closing.
- introduces a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously
(by default, they are executed asynchronously).
- returns the schema name instead of `null` when the method `CassandraConnection.getCatalog()` is called in Liquibase
compliance mode.
- does not throw `SQLFeatureNotSupportedException` when `CassandraConnection.rollback()` is called in Liquibase
- does not throw `SQLFeatureNotSupportedException` when `CassandraConnection.rollback()` is called in Liquibase
compliance mode.

## [4.9.0] - 2023-04-15
Expand Down Expand Up @@ -133,6 +151,7 @@ For this version, the changelog lists the main changes comparatively to the late
- Fix logs in `CassandraConnection` constructor.

[original project]: https://github.com/adejanovski/cassandra-jdbc-wrapper/
[4.10.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.1...v4.10.0
[4.9.1]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.0...v4.9.1
[4.9.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.8.0...v4.9.0
[4.8.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.7.0...v4.8.0
Expand Down
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ To compile and run tests, execute the following Maven command:
```bash
mvn clean package
```

#### Some considerations about running tests

If for some reason the tests using DataStax Enterprise server (`*DseContainerTest`) fail in your local environment, you
might disable them using the Maven profile `disableDseTests`:
```bash
mvn clean package -PdisableDseTests
```

The test suite also includes integration tests with AstraDB (`DbaasAstraIntegrationTest`). These tests require an
AstraDB token configured in the environment variable `ASTRA_DB_APPLICATION_TOKEN`, otherwise they are skipped.

### Integration in Maven projects

Expand Down Expand Up @@ -265,8 +276,11 @@ For further information about custom implementations of `SslEngineFactory`, see

### Connecting to DBaaS

In order to connect to the cloud [Cassandra-based DBaaS AstraDB](https://www.datastax.com/astra) cluster, one would
need to specify:
An alternative JDBC driver based on this one exists to ease the connection to the cloud
[Cassandra-based DBaaS AstraDB](https://www.datastax.com/astra) cluster:
[Astra JDBC driver](https://github.com/DataStax-Examples/astra-jdbc-connector/tree/main). Do not hesitate to use it if you are in this specific situation.

It's still possible to connect to AstraDB using this JDBC wrapper, so one would need to specify:
* `secureconnectbundle`: the fully qualified path of the cloud secure connect bundle file
* `keyspace`: the keyspace to connect to
* `user`: the username
Expand Down Expand Up @@ -352,14 +366,16 @@ CREATE TABLE example_table (
varint_col varint,
string_set_col set<text>,
string_list_col list<text>,
string_map_col map<text, text>
string_map_col map<text, text>,
vector_col vector<float, 5>
);
```

To insert a record into `example_table` using a prepared statement:

```java
import com.datastax.oss.driver.api.core.data.CqlDuration;
import com.datastax.oss.driver.api.core.data.CqlVector;

import java.io.ByteArrayInputStream;
import java.sql.Date;
Expand All @@ -370,8 +386,8 @@ public class HelloCassandra {
final String insertCql = "INSERT INTO example_table (bigint_col, ascii_col, blob_col, boolean_col, decimal_col, "
+ "double_col, float_col, inet_col, int_col, smallint_col, text_col, timestamp_col, time_col, date_col, "
+ "tinyint_col, duration_col, uuid_col, timeuuid_col, varchar_col, varint_col, string_set_col, "
+ "string_list_col, string_map_col) "
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?, ?);";
+ "string_list_col, string_map_col, vector_col) "
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?, ?, ?);";
final PreparedStatement preparedStatement = connection.prepareStatement(insertCql);
preparedStatement.setObject(1, 1L); // bigint
preparedStatement.setObject(2, "test"); // ascii
Expand Down Expand Up @@ -401,14 +417,16 @@ public class HelloCassandra {
sampleSet.add("test1");
sampleSet.add("test2");
preparedStatement.setObject(20, sampleSet); // set
ArrayList<String> sampleList = new ArrayList<String>();
final ArrayList<String> sampleList = new ArrayList<String>();
sampleList.add("test1");
sampleList.add("test2");
preparedStatement.setObject(21, sampleList); // list
HashMap<String, String> sampleMap = new HashMap<String, String>();
final HashMap<String, String> sampleMap = new HashMap<String, String>();
sampleMap.put("1", "test1");
sampleMap.put("2", "test2");
preparedStatement.setObject(22, sampleMap); // map
final CqlVector<Float> sampleVector = CqlVector.newInstance(1.0f, 0.0f, 1.0f, 0.5f, 0.2f);
preparedStatement.setObject(23, sampleVector); // vector
// Execute the prepare statement.
preparedStatement.execute();
}
Expand Down Expand Up @@ -696,6 +714,7 @@ We use [SemVer](http://semver.org/) for versioning.
* Madhavan Sridharan - **[@msmygit](https://github.com/msmygit)**
* Marius Jokubauskas - **[@mjok](https://github.com/mjok)**
* Sualeh Fatehi - **[@sualeh](https://github.com/sualeh)**
* Cedrick Lunven - **[@clun](https://github.com/clun)**

And special thanks to the developer of the original project on which is based this one:
* Alexander Dejanovski - **[@adejanovski](https://github.com/adejanovski)**
Expand Down
34 changes: 0 additions & 34 deletions azure-build.yaml

This file was deleted.

136 changes: 0 additions & 136 deletions azure-release.yaml

This file was deleted.

Loading

0 comments on commit b07d136

Please sign in to comment.