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.
- Add implementation for the methods
CassandraResultSet.getArray(int | String)(see PR #55).
- 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).
- Fix implementation of the methods
CassandraStatement.execute(String)andCassandraPreparedStatement.execute()to returntrueeven when the result set is empty (see PR #54). - Fix fetching null values in
CassandraResultSet.getObject(int | String)(see PR #57). - Fix handling of
VARINTvalues inCassandraResultSet.getObject(int | String)andCassandraMetadataResultSet.getObject(int | String)(see PR #59). - Fix return value of
CassandraDatabaseMetaData.supportsBatchUpdates()(see PR #61).
4.12.0 - 2024-05-05
- Add a parameter
fetchsizeto 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
CassandraDatabaseMetadatato 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 ofCassandraDataSourceusing 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,NCLOBand Java typesjava.sql.Blob,java.sql.Clob, andjava.sql.NClobhandled as arrays of bytes (CQL typeblob) - JDBC types
LONGVARCHAR,NCHAR,NVARCHAR,LONGNVARCHARandDATALINKand Java typejava.net.URLhandled as string (CQL typestext,varcharandascii) - JDBC type
TIME_WITH_TIMEZONEand Java typesjava.time.OffsetTimeandjava.time.LocalTimehandled asLocalTime(CQL typetime) - JDBC type
TIMESTAMP_WITH_TIMEZONEand Java typesjava.util.OffsetDateTime,java.time.LocalDateTime,java.util.Dateandjava.util.Calendarhandled asInstant(CQL typetimestamp) - Java type
java.time.LocalDate(CQL typedate) - JDBC type
BIThandled as boolean (CQL typeboolean) - JDBC type
NUMERIChandled asBigDecimal(CQL typedecimal) - JDBC type
REALhandled as float number (CQL typefloat)
- JDBC types
- Handle
java.util.Calendarin 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,setandvector). - 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
NullPointerExceptionissue #38 when a null type name pattern is specified in a call toCassandraDatabaseMetaData.getUDTs(String, String, String, int[]). - Fix issue #39: return
falsewhen the methodisSearchable(int)is called on the metadata of a result set without table or schema name (typically onCassandraMetadataResultSets). - 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
CassandraResultSetandCassandraMetadataResultSet.
4.10.2 - 2023-11-01
- Fix issue #33 to handle
VARBINARYandLONGVARBINARYtypes with eitherByteArrayInputStreamorbyte[]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)ofCassandraResultSetandCassandraMetadataResultSet:- 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
IllegalArgumentExceptioninstead of anSQLException.
4.10.0 - 2023-09-30
- Add support for new
vectorCQL 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.CassandraDrivershould be used now asjava.sql.Driverimplementation.
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
nullwhen the methodCassandraConnection.getCatalog()is called in Liquibase compliance mode. - does not throw
SQLFeatureNotSupportedExceptionwhenCassandraConnection.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)inCassandraResultSetandsetJson(int, Object)inCassandraPreparedStatement. - Add query parameter
hostnameverificationto 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,tcpnodelayandkeepalive. It fixes the issue #16 of the original project. - Implement the methods
isSigned()andisSearchable()in the differentResultSetMetaDataimplementations. - 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
Wrapperinterface. - Rewrite the tests using Testcontainers with Apache Cassandra® 4.1.0 image.
- Modify the implementation of
setQueryTimeout(int)andgetQueryTimeout()inCassandraStatementto 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
CassandraDriverandCassandraDatabaseMetaDatato be consistent with the version of the JDBC wrapper artifact (see issue #19). - Fix an issue on collections of tuples and UDTs that threw
NullPointerExceptionin result sets when calling methods such asgetList(),getSet()andgetMap().
4.8.0 - 2023-01-12
- Implement the methods
getMetaData()andgetParameterMetaData()into the implementation classCassandraPreparedStatementofPreparedStatementinterface. 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
Wrapperinterface for Cassandra connections, results sets and statements (see pull request #14).
- Fix the implementations of the methods
getInt(int)andgetLong(int)inMetadataRowand used in the classCassandraMetadataResultSetto 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
CassandraConnectionconstructor 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
configfileto use a configuration file instead of the settings defined in the JDBC URL. - Add query parameter
requesttimeoutto 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-allandlibthriftdependencies 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,smallintandtinyint. - 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 interfaceResultSetMetaDatafor the classesCassandraResultSetandCassandraMetadataResultSet. - Implement the methods
getURL(int|String)in the classesCassandraResultSetandCassandraMetadataResultSet. The URL values are handled asStringvalues. - Add codecs for conversions between
Integerand CQL typesvarint,smallintandtinyint. It also fixes the issue #33 of the original project.
- Update DataStax Java Driver for Apache Cassandra® to version 4.10.0.
- Update
cassandra-allto 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
CassandraDatabaseMetaDataaccording 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-allto version 3.11.8. - Force using
libthrift0.13.0 instead of the vulnerable version included intocassandra-all. - Manage separately the type
LocalDateinCassandraResultSet.
- Remove deprecated load balancing policy (
DCAwareRoundRobinPolicy).
- Fix issue #27 of the original project
by implementing the method
CassandraResultSet.getObject(String, Class<>). - Fix logs in
CassandraConnectionconstructor.