Skip to content

Commit b63a232

Browse files
committed
Merge branch 'release/next'
2 parents 71546e6 + f69ce5a commit b63a232

File tree

61 files changed

+3348
-649
lines changed

Some content is hidden

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

61 files changed

+3348
-649
lines changed

Diff for: .mvn/wrapper/maven-wrapper.properties

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

Diff for: CHANGELOG.md

+57-8
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,60 @@ 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.11.0] - 2023-12-03
8+
### Added
9+
- Add support for connections with multiple contact points using different ports (see feature request
10+
[#41](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/41)).
11+
- Handle additional types and conversions in the methods `CassandraPreparedStatement.setObject()`:
12+
- JDBC types `BLOB`, `CLOB`, `NCLOB` and Java types `java.sql.Blob`, `java.sql.Clob`, and `java.sql.NClob` handled as
13+
arrays of bytes (CQL type `blob`)
14+
- JDBC types `LONGVARCHAR`, `NCHAR`, `NVARCHAR`, `LONGNVARCHAR` and `DATALINK` and Java type `java.net.URL` handled
15+
as string (CQL types `text`, `varchar` and `ascii`)
16+
- JDBC type `TIME_WITH_TIMEZONE` and Java types `java.time.OffsetTime` and `java.time.LocalTime` handled as
17+
`LocalTime` (CQL type `time`)
18+
- JDBC type `TIMESTAMP_WITH_TIMEZONE` and Java types `java.util.OffsetDateTime`, `java.time.LocalDateTime`,
19+
`java.util.Date` and `java.util.Calendar` handled as `Instant` (CQL type `timestamp`)
20+
- Java type `java.time.LocalDate` (CQL type `date`)
21+
- JDBC type `BIT` handled as boolean (CQL type `boolean`)
22+
- JDBC type `NUMERIC` handled as `BigDecimal` (CQL type `decimal`)
23+
- JDBC type `REAL` handled as float number (CQL type `float`)
24+
- Handle `java.util.Calendar` in the methods `CassandraResultSet.getObject(int | String, Class)`.
25+
- Implement the following methods in `CassandraResultSet`: `getAsciiStream(int | String)`,
26+
`getCharacterStream(int | String)`, `getClob(int | String)`, `getNClob(int | String)`.
27+
### Changed
28+
- Deprecate the parameter `version` (CQL version) in JDBC URL because this one is purely informational and has no
29+
effect. This will be removed in the next release.
30+
- The index type returned by `CassandraDatabaseMetaData.getIndexInfo(String, String, String, boolean, boolean)` is
31+
now always `tableIndexOther`.
32+
- Improve the accuracy of the JDBC metadata of the collection types (`list`, `map`, `set` and `vector`).
33+
- Update the following methods of `CassandraDatabaseMetaData`: `getNumericFunctions()`, `getSQLKeywords()`,
34+
`getSystemFunctions()`, `getTimeDateFunctions()` and `getTypeInfo()` to add the new math, date/time and
35+
[data masking](https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-20%3A+Dynamic+Data+Masking)
36+
functions introduced in Cassandra 5.0 and take into account the version of the database the driver in connected to.
37+
- Update Apache Commons IO to version 2.15.0.
38+
- Update Apache Commons Lang to version 3.14.0.
39+
- Update Jackson dependencies to version 2.16.0.
40+
- Use Apache Cassandra® 5.0 image to run tests.
41+
- Replace references to "DataStax Java driver" by "Java Driver for Apache Cassandra®" following the transfer of the
42+
codebase to Apache Software Foundation (see:
43+
[IP clearance status](https://incubator.apache.org/ip-clearance/cassandra-java-driver.html) and
44+
[CEP-8](https://cwiki.apache.org/confluence/x/5Y1rDQ))
45+
### Fixed
46+
- Fix `NullPointerException` issue [#38](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/38) when a null
47+
type name pattern is specified in a call to `CassandraDatabaseMetaData.getUDTs(String, String, String, int[])`.
48+
- Fix issue [#39](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/39): return `false` when the method
49+
`isSearchable(int)` is called on the metadata of a result set without table or schema name (typically on
50+
`CassandraMetadataResultSet`s).
51+
- Fix incorrect consistency level used to execute simple prepared statements.
52+
- Fix issue preventing to retrieve the metadata of an empty `CassandraMetadataResultSet`.
53+
- Add null safety on some methods of `CassandraResultSet` and `CassandraMetadataResultSet`.
54+
755
## [4.10.2] - 2023-11-01
856
### Fixed
957
- Fix issue [#33](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/33) to handle `VARBINARY` and
1058
`LONGVARBINARY` types with either `ByteArrayInputStream` or `byte[]` in the methods
1159
`CassandraPreparedStatement.setObject()`.
12-
- Fix issue [#35](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/35) to fix configuration of the local
60+
- Fix issue [#35](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/35): configuration of the local
1361
datacenter using the one from the configuration file when such a file is used.
1462

1563
## [4.10.1] - 2023-10-07
@@ -33,7 +81,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3381
- Implement the following methods of `CassandraDatabaseMetaData`:
3482
`getBestRowIdentifier(String, String, String, int, boolean)` and `getAttributes(String, String, String, String)`.
3583
### Changed
36-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.17.0.
84+
- Update DataStax Java Driver for Apache Cassandra® to version 4.17.0.
3785
- Update Apache Commons IO to version 2.13.0.
3886
- Update Apache Commons Lang to version 3.13.0.
3987
- Update Jackson dependencies to version 2.15.2.
@@ -71,7 +119,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
71119
`getUDTs(String, String, String, int[])`.
72120
### Changed
73121
- Harmonize the implementations of `Wrapper` interface.
74-
- Rewrite the tests using Testcontainers with Apache Cassandra(R) 4.1.0 image.
122+
- Rewrite the tests using Testcontainers with Apache Cassandra® 4.1.0 image.
75123
- Modify the implementation of `setQueryTimeout(int)` and `getQueryTimeout()` in `CassandraStatement` to update the
76124
request timeout on a specific statement.
77125
### Removed
@@ -90,7 +138,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
90138
`CassandraPreparedStatement` of `PreparedStatement` interface. It fixes the issue
91139
[#19](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/19) of the [original project].
92140
### Changed
93-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.15.0.
141+
- Update DataStax Java Driver for Apache Cassandra® to version 4.15.0.
94142
- Fully implement methods from `Wrapper` interface for Cassandra connections, results sets and statements (see pull
95143
request [#14](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/14)).
96144
### Fixed
@@ -108,7 +156,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
108156
- Add an additional `CassandraConnection` constructor using a pre-existing session (see pull request
109157
[#8](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/8)).
110158
### Changed
111-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.1.
159+
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.1.
112160

113161
## [4.6.0] - 2022-03-20
114162
### Added
@@ -118,7 +166,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
118166
- Add query parameter `requesttimeout` to specify a non-default timeout for queries.
119167
See the feature request [#5](https://github.com/ing-bank/cassandra-jdbc-wrapper/discussions/5).
120168
### Changed
121-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.0.
169+
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.0.
122170
- Update Apache Commons Lang to version 3.12.0.
123171
### Removed
124172
- Remove `cassandra-all` and `libthrift` dependencies to limit exposure to vulnerable libraries (see pull request
@@ -138,7 +186,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
138186
- Add codecs for conversions between `Integer` and CQL types `varint`, `smallint` and `tinyint`. It also fixes the issue
139187
[#33](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/33) of the [original project].
140188
### Changed
141-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.10.0.
189+
- Update DataStax Java Driver for Apache Cassandra® to version 4.10.0.
142190
- Update `cassandra-all` to version 3.11.9.
143191
- Improve documentation and code quality (refactoring, removing dead code, adding tests, ...).
144192
- Improve the implementation of the metadata precision/size for the columns.
@@ -159,7 +207,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
159207
## 4.4.0 - 2020-12-23
160208
For this version, the changelog lists the main changes comparatively to the latest version of the [original project].
161209
### Changed
162-
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.9.0.
210+
- Update DataStax Java Driver for Apache Cassandra® to version 4.9.0.
163211
- Update `cassandra-all` to version 3.11.8.
164212
- Force using `libthrift` 0.13.0 instead of the vulnerable version included into `cassandra-all`.
165213
- Manage separately the type `LocalDate` in `CassandraResultSet`.
@@ -171,6 +219,7 @@ For this version, the changelog lists the main changes comparatively to the late
171219
- Fix logs in `CassandraConnection` constructor.
172220

173221
[original project]: https://github.com/adejanovski/cassandra-jdbc-wrapper/
222+
[4.11.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.2...v4.11.0
174223
[4.10.2]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.1...v4.10.2
175224
[4.10.1]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.0...v4.10.1
176225
[4.10.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.1...v4.10.0

Diff for: CONTRIBUTING.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ To run the tests, execute the following command:
5252
```
5353
mvn test
5454
```
55+
Regarding the tests, you need **Docker** installed on your machine.
56+
Indeed, most of the tests in this project are based on
57+
[Testcontainers for Cassandra](https://java.testcontainers.org/modules/databases/cassandra/), because testing a JDBC API
58+
implementation requires ensuring that the driver is able to connect to a database and execute queries correctly.
59+
For example, very common JDBC drivers like those for [PostgreSQL](https://github.com/pgjdbc/pgjdbc) or
60+
[MS SQL Server](https://github.com/Microsoft/mssql-jdbc/) are also tested against a real database.
5561

5662
### Submit a pull request
5763

@@ -63,12 +69,20 @@ Once your changes and tests are ready for review, submit them:
6369
to verify it or simply run `mvn clean install` and check the logs).
6470

6571
3. Rebase your changes: update your local repository with the most recent code from the original repository, and rebase
66-
your branch on top of the latest `release/next` branch. It is better that your initial changes are squashed into a
67-
single commit. If more changes are required to validate the pull request, we invite you to add them as separate commits.
72+
your branch on top of the latest `release/next` branch. It is better that your initial changes are squashed into a
73+
single commit. If more changes are required to validate the pull request, we invite you to add them as separate
74+
commits.
6875

6976
4. Finally, push your local changes to your forked repository and submit a pull request into the branch `release/next`
70-
with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details in
71-
the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123".
77+
with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details
78+
in the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123".
79+
80+
### About dependencies
81+
82+
If your changes require to add a new dependency or update an existing one, be sure to check these points first of all:
83+
* the dependency is the latest stable version of the library compatible with JDK 8
84+
* the dependency does not introduce vulnerabilities
85+
* the version of the dependency is specified in a property `<artifactId>.version` in `pom.xml`.
7286

7387
### License headers
7488

Diff for: NOTICE.txt

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
JDBC wrapper of the Java Driver for Apache Cassandra®
2+
Copyright 2020- ING Bank
3+
4+
This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
5+
6+
Apache Cassandra Java Driver
7+
Copyright 2012- The Apache Software Foundation
8+
This product includes software developed as part of the Apache Cassandra Java Driver project
9+
( https://github.com/apache/cassandra-java-driver ).
10+
11+
Apache Commons Collections
12+
Copyright 2001-2023 The Apache Software Foundation
13+
This product includes software developed as part of the Apache Commons Collections project
14+
( https://github.com/apache/commons-collections ).
15+
16+
Apache Commons IO
17+
Copyright 2002-2023 The Apache Software Foundation
18+
This product includes software developed as part of the Apache Commons IO project
19+
( https://github.com/apache/commons-io ).
20+
21+
Apache Commons Lang
22+
Copyright 2001-2023 The Apache Software Foundation
23+
This product includes software developed as part of the Apache Commons Lang project
24+
( https://github.com/apache/commons-lang ).
25+
26+
FasterXML Jackson
27+
Copyright 2012 FasterXML.com
28+
This product includes software developed as part of the Jackson project
29+
( https://github.com/FasterXML/jackson ).
30+
31+
Caffeine
32+
Copyright 2018 Ben Manes
33+
This product includes software developed as part of the Caffeine project
34+
( https://github.com/ben-manes/caffeine ).
35+
36+
Semver4j
37+
Copyright 2022-present Semver4j contributors
38+
This product includes software developed as part of the Semver4j project
39+
( https://github.com/semver4j/semver4j ), which is available under a MIT license.
40+
For details, see https://github.com/semver4j/semver4j/blob/main/LICENSE

0 commit comments

Comments
 (0)