Skip to content

Commit

Permalink
Merge branch 'release/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
maximevw committed Dec 3, 2023
2 parents 71546e6 + f69ce5a commit b63a232
Show file tree
Hide file tree
Showing 61 changed files with 3,348 additions and 649 deletions.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
65 changes: 57 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,60 @@ 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.11.0] - 2023-12-03
### Added
- Add support for connections with multiple contact points using different ports (see feature request
[#41](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/41)).
- Handle additional types and conversions in the methods `CassandraPreparedStatement.setObject()`:
- JDBC types `BLOB`, `CLOB`, `NCLOB` and Java types `java.sql.Blob`, `java.sql.Clob`, and `java.sql.NClob` handled as
arrays of bytes (CQL type `blob`)
- JDBC types `LONGVARCHAR`, `NCHAR`, `NVARCHAR`, `LONGNVARCHAR` and `DATALINK` and Java type `java.net.URL` handled
as string (CQL types `text`, `varchar` and `ascii`)
- JDBC type `TIME_WITH_TIMEZONE` and Java types `java.time.OffsetTime` and `java.time.LocalTime` handled as
`LocalTime` (CQL type `time`)
- JDBC type `TIMESTAMP_WITH_TIMEZONE` and Java types `java.util.OffsetDateTime`, `java.time.LocalDateTime`,
`java.util.Date` and `java.util.Calendar` handled as `Instant` (CQL type `timestamp`)
- Java type `java.time.LocalDate` (CQL type `date`)
- JDBC type `BIT` handled as boolean (CQL type `boolean`)
- JDBC type `NUMERIC` handled as `BigDecimal` (CQL type `decimal`)
- JDBC type `REAL` handled as float number (CQL type `float`)
- Handle `java.util.Calendar` in the methods `CassandraResultSet.getObject(int | String, Class)`.
- Implement the following methods in `CassandraResultSet`: `getAsciiStream(int | String)`,
`getCharacterStream(int | String)`, `getClob(int | String)`, `getNClob(int | String)`.
### Changed
- Deprecate the parameter `version` (CQL version) in JDBC URL because this one is purely informational and has no
effect. This will be removed in the next release.
- The index type returned by `CassandraDatabaseMetaData.getIndexInfo(String, String, String, boolean, boolean)` is
now always `tableIndexOther`.
- Improve the accuracy of the JDBC metadata of the collection types (`list`, `map`, `set` and `vector`).
- Update the following methods of `CassandraDatabaseMetaData`: `getNumericFunctions()`, `getSQLKeywords()`,
`getSystemFunctions()`, `getTimeDateFunctions()` and `getTypeInfo()` to add the new math, date/time and
[data masking](https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-20%3A+Dynamic+Data+Masking)
functions introduced in Cassandra 5.0 and take into account the version of the database the driver in connected to.
- Update Apache Commons IO to version 2.15.0.
- Update Apache Commons Lang to version 3.14.0.
- Update Jackson dependencies to version 2.16.0.
- Use Apache Cassandra® 5.0 image to run tests.
- Replace references to "DataStax Java driver" by "Java Driver for Apache Cassandra®" following the transfer of the
codebase to Apache Software Foundation (see:
[IP clearance status](https://incubator.apache.org/ip-clearance/cassandra-java-driver.html) and
[CEP-8](https://cwiki.apache.org/confluence/x/5Y1rDQ))
### Fixed
- Fix `NullPointerException` issue [#38](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/38) when a null
type name pattern is specified in a call to `CassandraDatabaseMetaData.getUDTs(String, String, String, int[])`.
- Fix issue [#39](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/39): return `false` when the method
`isSearchable(int)` is called on the metadata of a result set without table or schema name (typically on
`CassandraMetadataResultSet`s).
- Fix incorrect consistency level used to execute simple prepared statements.
- Fix issue preventing to retrieve the metadata of an empty `CassandraMetadataResultSet`.
- Add null safety on some methods of `CassandraResultSet` and `CassandraMetadataResultSet`.

## [4.10.2] - 2023-11-01
### Fixed
- Fix issue [#33](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/33) to handle `VARBINARY` and
`LONGVARBINARY` types with either `ByteArrayInputStream` or `byte[]` in the methods
`CassandraPreparedStatement.setObject()`.
- Fix issue [#35](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/35) to fix configuration of the local
- Fix issue [#35](https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/35): configuration of the local
datacenter using the one from the configuration file when such a file is used.

## [4.10.1] - 2023-10-07
Expand All @@ -33,7 +81,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- 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 DataStax Java Driver for Apache Cassandra® 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.
Expand Down Expand Up @@ -71,7 +119,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
`getUDTs(String, String, String, int[])`.
### Changed
- Harmonize the implementations of `Wrapper` interface.
- Rewrite the tests using Testcontainers with Apache Cassandra(R) 4.1.0 image.
- Rewrite the tests using Testcontainers with Apache Cassandra® 4.1.0 image.
- Modify the implementation of `setQueryTimeout(int)` and `getQueryTimeout()` in `CassandraStatement` to update the
request timeout on a specific statement.
### Removed
Expand All @@ -90,7 +138,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
`CassandraPreparedStatement` of `PreparedStatement` interface. It fixes the issue
[#19](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/19) of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.15.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.15.0.
- Fully implement methods from `Wrapper` interface for Cassandra connections, results sets and statements (see pull
request [#14](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/14)).
### Fixed
Expand All @@ -108,7 +156,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add an additional `CassandraConnection` constructor using a pre-existing session (see pull request
[#8](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/8)).
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.1.
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.1.

## [4.6.0] - 2022-03-20
### Added
Expand All @@ -118,7 +166,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add query parameter `requesttimeout` to specify a non-default timeout for queries.
See the feature request [#5](https://github.com/ing-bank/cassandra-jdbc-wrapper/discussions/5).
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.0.
- Update Apache Commons Lang to version 3.12.0.
### Removed
- Remove `cassandra-all` and `libthrift` dependencies to limit exposure to vulnerable libraries (see pull request
Expand All @@ -138,7 +186,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add codecs for conversions between `Integer` and CQL types `varint`, `smallint` and `tinyint`. It also fixes the issue
[#33](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/33) of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.10.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.10.0.
- Update `cassandra-all` to version 3.11.9.
- Improve documentation and code quality (refactoring, removing dead code, adding tests, ...).
- Improve the implementation of the metadata precision/size for the columns.
Expand All @@ -159,7 +207,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## 4.4.0 - 2020-12-23
For this version, the changelog lists the main changes comparatively to the latest version of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.9.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.9.0.
- Update `cassandra-all` to version 3.11.8.
- Force using `libthrift` 0.13.0 instead of the vulnerable version included into `cassandra-all`.
- Manage separately the type `LocalDate` in `CassandraResultSet`.
Expand All @@ -171,6 +219,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.11.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.2...v4.11.0
[4.10.2]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.1...v4.10.2
[4.10.1]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.10.0...v4.10.1
[4.10.0]: https://github.com/ing-bank/cassandra-jdbc-wrapper/compare/v4.9.1...v4.10.0
Expand Down
22 changes: 18 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ To run the tests, execute the following command:
```
mvn test
```
Regarding the tests, you need **Docker** installed on your machine.
Indeed, most of the tests in this project are based on
[Testcontainers for Cassandra](https://java.testcontainers.org/modules/databases/cassandra/), because testing a JDBC API
implementation requires ensuring that the driver is able to connect to a database and execute queries correctly.
For example, very common JDBC drivers like those for [PostgreSQL](https://github.com/pgjdbc/pgjdbc) or
[MS SQL Server](https://github.com/Microsoft/mssql-jdbc/) are also tested against a real database.

### Submit a pull request

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

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

4. Finally, push your local changes to your forked repository and submit a pull request into the branch `release/next`
with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details in
the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123".
with a title which sums up the changes that you have made (try to not exceed 50 characters), and provide more details
in the body. If necessary, also mention the number of the issue solved by your changes, e.g. "Closes #123".

### About dependencies

If your changes require to add a new dependency or update an existing one, be sure to check these points first of all:
* the dependency is the latest stable version of the library compatible with JDK 8
* the dependency does not introduce vulnerabilities
* the version of the dependency is specified in a property `<artifactId>.version` in `pom.xml`.

### License headers

Expand Down
40 changes: 40 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
JDBC wrapper of the Java Driver for Apache Cassandra®
Copyright 2020- ING Bank

This product includes software developed by The Apache Software Foundation (http://www.apache.org/).

Apache Cassandra Java Driver
Copyright 2012- The Apache Software Foundation
This product includes software developed as part of the Apache Cassandra Java Driver project
( https://github.com/apache/cassandra-java-driver ).

Apache Commons Collections
Copyright 2001-2023 The Apache Software Foundation
This product includes software developed as part of the Apache Commons Collections project
( https://github.com/apache/commons-collections ).

Apache Commons IO
Copyright 2002-2023 The Apache Software Foundation
This product includes software developed as part of the Apache Commons IO project
( https://github.com/apache/commons-io ).

Apache Commons Lang
Copyright 2001-2023 The Apache Software Foundation
This product includes software developed as part of the Apache Commons Lang project
( https://github.com/apache/commons-lang ).

FasterXML Jackson
Copyright 2012 FasterXML.com
This product includes software developed as part of the Jackson project
( https://github.com/FasterXML/jackson ).

Caffeine
Copyright 2018 Ben Manes
This product includes software developed as part of the Caffeine project
( https://github.com/ben-manes/caffeine ).

Semver4j
Copyright 2022-present Semver4j contributors
This product includes software developed as part of the Semver4j project
( https://github.com/semver4j/semver4j ), which is available under a MIT license.
For details, see https://github.com/semver4j/semver4j/blob/main/LICENSE
Loading

0 comments on commit b63a232

Please sign in to comment.