Skip to content

Commit b07d136

Browse files
committed
Prepare version 4.10.0
Merging branch 'release/next'
2 parents b66035e + 20a2264 commit b07d136

File tree

118 files changed

+4325
-2049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+4325
-2049
lines changed

Diff for: .github/workflows/ci-workflow.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: Set up JDK 8
1919
uses: actions/setup-java@v3

Diff for: .github/workflows/release-workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

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

4141
- name: Create GitHub release
42-
uses: ncipollo/release-action@v1.12.0
42+
uses: ncipollo/release-action@v1
4343
with:
4444
artifacts: "target/cassandra-jdbc-wrapper-${{ env.RELEASE_VERSION }}-bundle.jar"
4545
name: "${{ env.RELEASE_VERSION }}"

Diff for: CHANGELOG.md

+24-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,34 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to
55
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [4.10.0] - 2023-09-30
8+
### Added
9+
- Add support for new [`vector` CQL type](https://datastax-oss.atlassian.net/browse/JAVA-3060)
10+
defined in [CEP-30](https://cwiki.apache.org/confluence/x/OQ40Dw)
11+
Also see PR [#27](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/27).
12+
- Implement the method `getWarnings()` in `CassandraResultSet`.
13+
- Implement the following methods of `CassandraDatabaseMetaData`:
14+
`getBestRowIdentifier(String, String, String, int, boolean)` and `getAttributes(String, String, String, String)`.
15+
### Changed
16+
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.17.0.
17+
- Update Apache Commons IO to version 2.13.0.
18+
- Update Apache Commons Lang to version 3.13.0.
19+
- Update Jackson dependencies to version 2.15.2.
20+
- Packages refactoring: utility classes, types and database metadata management have been moved to dedicated packages.
21+
### Removed
22+
- Remove the legacy package `org.apache.cassandra2.cql.jdbc`: only `com.ing.data.cassandra.jdbc.CassandraDriver` should
23+
be used now as `java.sql.Driver` implementation.
24+
725
## [4.9.1] - 2023-09-03
826
### Fixed
927
- Fix issue [#25](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/25) causing failure when running with
1028
Liquibase. The fix includes several changes:
11-
- fixes result sets and statements closing.
12-
- introduces a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously
13-
(by default, they are executed asynchronously).
14-
- returns the schema name instead of `null` when the method `CassandraConnection.getCatalog()` is called in Liquibase
29+
- fixes result sets and statements closing.
30+
- introduces a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously
31+
(by default, they are executed asynchronously).
32+
- returns the schema name instead of `null` when the method `CassandraConnection.getCatalog()` is called in Liquibase
1533
compliance mode.
16-
- does not throw `SQLFeatureNotSupportedException` when `CassandraConnection.rollback()` is called in Liquibase
34+
- does not throw `SQLFeatureNotSupportedException` when `CassandraConnection.rollback()` is called in Liquibase
1735
compliance mode.
1836

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

135153
[original project]: https://github.com/adejanovski/cassandra-jdbc-wrapper/
154+
[4.10.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.1...v4.10.0
136155
[4.9.1]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.0...v4.9.1
137156
[4.9.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.8.0...v4.9.0
138157
[4.8.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.7.0...v4.8.0

Diff for: README.md

+26-7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ To compile and run tests, execute the following Maven command:
4949
```bash
5050
mvn clean package
5151
```
52+
53+
#### Some considerations about running tests
54+
55+
If for some reason the tests using DataStax Enterprise server (`*DseContainerTest`) fail in your local environment, you
56+
might disable them using the Maven profile `disableDseTests`:
57+
```bash
58+
mvn clean package -PdisableDseTests
59+
```
60+
61+
The test suite also includes integration tests with AstraDB (`DbaasAstraIntegrationTest`). These tests require an
62+
AstraDB token configured in the environment variable `ASTRA_DB_APPLICATION_TOKEN`, otherwise they are skipped.
5263

5364
### Integration in Maven projects
5465

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

266277
### Connecting to DBaaS
267278

268-
In order to connect to the cloud [Cassandra-based DBaaS AstraDB](https://www.datastax.com/astra) cluster, one would
269-
need to specify:
279+
An alternative JDBC driver based on this one exists to ease the connection to the cloud
280+
[Cassandra-based DBaaS AstraDB](https://www.datastax.com/astra) cluster:
281+
[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.
282+
283+
It's still possible to connect to AstraDB using this JDBC wrapper, so one would need to specify:
270284
* `secureconnectbundle`: the fully qualified path of the cloud secure connect bundle file
271285
* `keyspace`: the keyspace to connect to
272286
* `user`: the username
@@ -352,14 +366,16 @@ CREATE TABLE example_table (
352366
varint_col varint,
353367
string_set_col set<text>,
354368
string_list_col list<text>,
355-
string_map_col map<text, text>
369+
string_map_col map<text, text>,
370+
vector_col vector<float, 5>
356371
);
357372
```
358373

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

361376
```java
362377
import com.datastax.oss.driver.api.core.data.CqlDuration;
378+
import com.datastax.oss.driver.api.core.data.CqlVector;
363379

364380
import java.io.ByteArrayInputStream;
365381
import java.sql.Date;
@@ -370,8 +386,8 @@ public class HelloCassandra {
370386
final String insertCql = "INSERT INTO example_table (bigint_col, ascii_col, blob_col, boolean_col, decimal_col, "
371387
+ "double_col, float_col, inet_col, int_col, smallint_col, text_col, timestamp_col, time_col, date_col, "
372388
+ "tinyint_col, duration_col, uuid_col, timeuuid_col, varchar_col, varint_col, string_set_col, "
373-
+ "string_list_col, string_map_col) "
374-
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?, ?);";
389+
+ "string_list_col, string_map_col, vector_col) "
390+
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?, ?, ?);";
375391
final PreparedStatement preparedStatement = connection.prepareStatement(insertCql);
376392
preparedStatement.setObject(1, 1L); // bigint
377393
preparedStatement.setObject(2, "test"); // ascii
@@ -401,14 +417,16 @@ public class HelloCassandra {
401417
sampleSet.add("test1");
402418
sampleSet.add("test2");
403419
preparedStatement.setObject(20, sampleSet); // set
404-
ArrayList<String> sampleList = new ArrayList<String>();
420+
final ArrayList<String> sampleList = new ArrayList<String>();
405421
sampleList.add("test1");
406422
sampleList.add("test2");
407423
preparedStatement.setObject(21, sampleList); // list
408-
HashMap<String, String> sampleMap = new HashMap<String, String>();
424+
final HashMap<String, String> sampleMap = new HashMap<String, String>();
409425
sampleMap.put("1", "test1");
410426
sampleMap.put("2", "test2");
411427
preparedStatement.setObject(22, sampleMap); // map
428+
final CqlVector<Float> sampleVector = CqlVector.newInstance(1.0f, 0.0f, 1.0f, 0.5f, 0.2f);
429+
preparedStatement.setObject(23, sampleVector); // vector
412430
// Execute the prepare statement.
413431
preparedStatement.execute();
414432
}
@@ -696,6 +714,7 @@ We use [SemVer](http://semver.org/) for versioning.
696714
* Madhavan Sridharan - **[@msmygit](https://github.com/msmygit)**
697715
* Marius Jokubauskas - **[@mjok](https://github.com/mjok)**
698716
* Sualeh Fatehi - **[@sualeh](https://github.com/sualeh)**
717+
* Cedrick Lunven - **[@clun](https://github.com/clun)**
699718

700719
And special thanks to the developer of the original project on which is based this one:
701720
* Alexander Dejanovski - **[@adejanovski](https://github.com/adejanovski)**

Diff for: azure-build.yaml

-34
This file was deleted.

Diff for: azure-release.yaml

-136
This file was deleted.

0 commit comments

Comments
 (0)