All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
4.14.0 - Unreleased
- Add support for IPv6 addresses in JDBC URL (see PR #62).
- Add implementation for the method
CassandraPreparedStatement.setArray(int, Array)
. - Add a parameter
serialconsistency
to specify the default serial consistency level used by the connection. - Add support for the special CQL command
SERIAL CONSISTENCY [level]
inCassandraStatement
.
- Do not try to register codecs again (if already done previously) on a pre-existing session to avoid warnings in logs.
4.13.1 - 2024-09-04
- Fix implementation of
CassandraConnection.toString()
to not leak connection password (see issue #71).
4.13.0 - 2024-07-27
- Add support for switching execution profiles.
- Add implementation for the methods
CassandraResultSet.getArray(int | String)
(see PR #55). - Add support for the special CQL command
CONSISTENCY [level]
inCassandraStatement
(inspired by PR #56). - Add a method
setComplianceMode(String)
inCassandraDataSource
to specify a specific compliance mode when getting the connection from aDataSource
(see issue #68, PR #69).
- Update Java Driver for Apache Cassandra® to version 4.18.1.
- Update Apache Commons Lang to version 3.15.0.
- Update Jackson dependencies to version 2.17.2.
- Modify the scale value returned for the type
TIMESTAMP
(see PR #58). - Refactor handling of user-defined types and tuples in
CassandraResultSet.getObject(int | String)
(see PR #60). - Fully implement
CassandraDriver.getPropertyInfo(String, Properties)
(see issue #66).
- Fix implementation of the methods
CassandraStatement.execute(String)
andCassandraPreparedStatement.execute()
to returntrue
even when the result set is empty (see PR #54). - Fix fetching null values in
CassandraResultSet.getObject(int | String)
(see PR #57). - Fix handling of
VARINT
values inCassandraResultSet.getObject(int | String)
andCassandraMetadataResultSet.getObject(int | String)
(see PR #59). - Fix return value of
CassandraDatabaseMetaData.supportsBatchUpdates()
(see PR #61). - Fix implementation of
Statement.executeBatch()
(see issue #63) to conform with JDBC specifications:- throws a
BatchUpdateException
when at least one statement in the batch fails or attempts to return a result set. - the returned array contains
SUCCESS_NO_INFO
for successful statements andEXECUTE_FAILED
for statements that threw aBatchUpdateException
.
- throws a
- Fix connection issues to AstraDB when using protocol
jdbc:cassandra:dbaas
without specifying a hostname (see issue #67).
4.12.0 - 2024-05-05
- Add a parameter
fetchsize
to specify a default fetch size for all the queries returning result sets. This value is the number of rows the server will return in each network frame (see paging documentation). - Add support for Kerberos authentication provider.
- Modify the types of some columns in the result sets of the following methods of
CassandraDatabaseMetadata
to respect the JDBC API specifications:getAttributes(String, String, String, String)
getBestRowIdentifier(String, String, String, int, boolean)
getColumns(String, String, String, String)
getFunctions(String, String, String)
getFunctionColumns(String, String, String, String)
getIndexInfo(String, String, String, boolean, boolean)
getPrimaryKeys(String, String, String)
getTypeInfo()
getUDTs(String, String, String, int[])
- In prepared statements, force the page size to the configured one (from JDBC URL or configuration file if present), or the default page size.
- Update Apache Commons IO to version 2.16.1.
- Update Jackson dependencies to version 2.17.0.
- Update Semver4j to version 5.3.0.
- Remove the parameter
version
(CQL version) in JDBC URL and the deprecated constructors ofCassandraDataSource
using this parameter.
- Fix issue preventing a correct usage of
DCInferringLoadBalancingPolicy
(see PR #49).
4.11.1 - 2023-12-28
- Fix issue #50 preventing a correct execution of
multiple statements separated by semicolon characters (
;
) when at least one of the CQL queries contains a semicolon character which is not a query separator.
4.11.0 - 2023-12-03
- Add support for connections with multiple contact points using different ports (see feature request #41).
- Handle additional types and conversions in the methods
CassandraPreparedStatement.setObject()
:- JDBC types
BLOB
,CLOB
,NCLOB
and Java typesjava.sql.Blob
,java.sql.Clob
, andjava.sql.NClob
handled as arrays of bytes (CQL typeblob
) - JDBC types
LONGVARCHAR
,NCHAR
,NVARCHAR
,LONGNVARCHAR
andDATALINK
and Java typejava.net.URL
handled as string (CQL typestext
,varchar
andascii
) - JDBC type
TIME_WITH_TIMEZONE
and Java typesjava.time.OffsetTime
andjava.time.LocalTime
handled asLocalTime
(CQL typetime
) - JDBC type
TIMESTAMP_WITH_TIMEZONE
and Java typesjava.util.OffsetDateTime
,java.time.LocalDateTime
,java.util.Date
andjava.util.Calendar
handled asInstant
(CQL typetimestamp
) - Java type
java.time.LocalDate
(CQL typedate
) - JDBC type
BIT
handled as boolean (CQL typeboolean
) - JDBC type
NUMERIC
handled asBigDecimal
(CQL typedecimal
) - JDBC type
REAL
handled as float number (CQL typefloat
)
- JDBC types
- Handle
java.util.Calendar
in the methodsCassandraResultSet.getObject(int | String, Class)
. - Implement the following methods in
CassandraResultSet
:getAsciiStream(int | String)
,getCharacterStream(int | String)
,getClob(int | String)
,getNClob(int | String)
.
- 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 alwaystableIndexOther
. - Improve the accuracy of the JDBC metadata of the collection types (
list
,map
,set
andvector
). - Update the following methods of
CassandraDatabaseMetaData
:getNumericFunctions()
,getSQLKeywords()
,getSystemFunctions()
,getTimeDateFunctions()
andgetTypeInfo()
to add the new math, date/time and 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 and CEP-8)
- Fix
NullPointerException
issue #38 when a null type name pattern is specified in a call toCassandraDatabaseMetaData.getUDTs(String, String, String, int[])
. - Fix issue #39: return
false
when the methodisSearchable(int)
is called on the metadata of a result set without table or schema name (typically onCassandraMetadataResultSet
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
andCassandraMetadataResultSet
.
4.10.2 - 2023-11-01
- Fix issue #33 to handle
VARBINARY
andLONGVARBINARY
types with eitherByteArrayInputStream
orbyte[]
in the methodsCassandraPreparedStatement.setObject()
. - Fix issue #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
- Update Apache Commons IO to version 2.14.0.
- Harmonize logging.
- Fix multiple issues related to the method
findColumn(String)
ofCassandraResultSet
andCassandraMetadataResultSet
:- Fix issue #31 to return a 1-based index value.
- Return a result even if there's no row in the result set but the column exist in the statement.
- Fix the exception thrown by the method when the given column name does not exist in the result set (was an
IllegalArgumentException
instead of anSQLException
.
4.10.0 - 2023-09-30
- Add support for new
vector
CQL type defined in CEP-30. Also see PR #27. - Implement the method
getWarnings()
inCassandraResultSet
. - Implement the following methods of
CassandraDatabaseMetaData
:getBestRowIdentifier(String, String, String, int, boolean)
andgetAttributes(String, String, String, String)
.
- 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.
- Packages refactoring: utility classes, types and database metadata management have been moved to dedicated packages.
- Remove the legacy package
org.apache.cassandra2.cql.jdbc
: onlycom.ing.data.cassandra.jdbc.CassandraDriver
should be used now asjava.sql.Driver
implementation.
4.9.1 - 2023-09-03
- Fix issue #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 methodCassandraConnection.getCatalog()
is called in Liquibase compliance mode. - does not throw
SQLFeatureNotSupportedException
whenCassandraConnection.rollback()
is called in Liquibase compliance mode.
4.9.0 - 2023-04-15
- Add non-JDBC standard JSON support with the
methods
getObjectFromJson(int | String, Class)
andgetObjectFromJson(Class)
inCassandraResultSet
andsetJson(int, Object)
inCassandraPreparedStatement
. - Add query parameter
hostnameverification
to specify whether the hostname verification must be enabled or not when SSL connection is used. See the discussion #20. - Add some socket options thanks to the additional query parameters:
connecttimeout
,tcpnodelay
andkeepalive
. It fixes the issue #16 of the original project. - Implement the methods
isSigned()
andisSearchable()
in the differentResultSetMetaData
implementations. - Implement the method
isValid(int)
inCassandraConnection
. - Implement the following methods of
CassandraDatabaseMetaData
:getFunctions(String, String, String)
,getFunctionColumns(String, String, String, String)
,getNumericFunctions()
,getSQLKeywords()
,getStringFunctions()
,getSystemFunctions()
,getTimeDateFunctions()
,getTypeInfo()
andgetUDTs(String, String, String, int[])
.
- Harmonize the implementations of
Wrapper
interface. - Rewrite the tests using Testcontainers with Apache Cassandra® 4.1.0 image.
- Modify the implementation of
setQueryTimeout(int)
andgetQueryTimeout()
inCassandraStatement
to update the request timeout on a specific statement.
- Remove vulnerable Guava compile dependency and replace it by standard Java, Apache Commons libraries and Caffeine for sessions caching.
- Fix the JDBC driver version returned by the methods of the classes
CassandraDriver
andCassandraDatabaseMetaData
to be consistent with the version of the JDBC wrapper artifact (see issue #19). - Fix an issue on collections of tuples and UDTs that threw
NullPointerException
in result sets when calling methods such asgetList()
,getSet()
andgetMap()
.
4.8.0 - 2023-01-12
- Implement the methods
getMetaData()
andgetParameterMetaData()
into the implementation classCassandraPreparedStatement
ofPreparedStatement
interface. It fixes the issue #19 of the original project.
- 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).
- Fix the implementations of the methods
getInt(int)
andgetLong(int)
inMetadataRow
and used in the classCassandraMetadataResultSet
to be compliant with the JDBC API specifications (see pull request #12, issue #10).
4.7.0 - 2022-09-23
- Add a system of compliance mode with the query parameter
compliancemode
: for some usages (for example with Liquibase), some default behaviours of the JDBC implementation have to be adapted. See the readme file for details about the overridable behaviours and the available compliance modes. See pull request #8. - Add an additional
CassandraConnection
constructor using a pre-existing session (see pull request #8).
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.1.
4.6.0 - 2022-03-20
- Add support for connecting to Cassandra DBaaS cluster with secure connect bundle. See the feature request #1.
- Add query parameter
configfile
to use a configuration file instead of the settings defined in the JDBC URL. - Add query parameter
requesttimeout
to specify a non-default timeout for queries. See the feature request #5.
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.0.
- Update Apache Commons Lang to version 3.12.0.
- Remove
cassandra-all
andlibthrift
dependencies to limit exposure to vulnerable libraries (see pull request #6).
- User credentials parameters in the connection string were ignored.
4.5.0 - 2021-04-13
- Manage additional CQL types:
duration
,smallint
andtinyint
. - Add support for SSL between the driver and the Cassandra cluster.
- Implement the methods
getSchema()
,setSchema(String)
andgetTypeMap()
in the classManagedConnection
. - Implement the methods
getPrecision(int)
andgetScale(int)
into the implementations of the interfaceResultSetMetaData
for the classesCassandraResultSet
andCassandraMetadataResultSet
. - Implement the methods
getURL(int|String)
in the classesCassandraResultSet
andCassandraMetadataResultSet
. The URL values are handled asString
values. - Add codecs for conversions between
Integer
and CQL typesvarint
,smallint
andtinyint
. It also fixes the issue #33 of the original project.
- 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.
- Fix values returned by some methods in
CassandraDatabaseMetaData
according to the capabilities described into the CQL3 documentation. - Fix issue #24 of the original project
by correctly implementing JDBC API regarding the result returned by the methods
CassandraStatement.execute(String)
andCassandraPreparedStatement.execute()
. - Fix
CassandraResultSet.getLong(int | String)
implementations to return 0 when the stored value is SQLNULL
. - Add null-safety into the methods
CassandraResultSet.getString(int | String)
,CassandraMetadataResultSet.getBigDecimal(int | String, int)
,CassandraMetadataResultSet.getBinaryStream(int | String)
,CassandraMetadataResultSet.getBlob(int | String)
,CassandraMetadataResultSet.getByte(int | String)
,CassandraMetadataResultSet.getBytes(int | String)
andCassandraMetadataResultSet.getString(int | String)
. - Validate column existence when calling the methods
CassandraResultSet.getBytes(int | String)
.
For this version, the changelog lists the main changes comparatively to the latest version of the original project.
- 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 intocassandra-all
. - Manage separately the type
LocalDate
inCassandraResultSet
.
- Remove deprecated load balancing policy (
DCAwareRoundRobinPolicy
).
- Fix issue #27 of the original project
by implementing the method
CassandraResultSet.getObject(String, Class<>)
. - Fix logs in
CassandraConnection
constructor.