We now support prepared statement usage through CassandraTemplate and its asynchronous and reactive variants. All statements created or received by CassandraTemplate will be prepared. CassandraTemplate is an infrastructure class for repositories so prepared statements will affect repositories, too.
We now use positional parameters when building SimpleStatement through StatementBuilder by default to access the individual parameters later on for prepared statement usage.
We now consider the contextual ColumnType that applies when using particular update operations within the context of a property reference. Query and Update objects reference properties in their criteria/assignments using operators that are related either to the entire property, the key-, value- or component-type aspect (querying whether map contains a key, updating a list at an index).
Previously, we considered the contextual column type only for criteria operators and updating a list with a mapped UDT failed as the column type of the property was used. By using a ColumnTypeTransformer abstraction we resolve the correct contextual column type so that subsequent mapping/conversion operations use the appropriate type hint.
We now allow configuring a DriverConfigLoaderBuilderConfigurer and specifying a driver configuration file through AbstractSessionConfiguration to improve configuration possibilities. The DriverConfigLoaderBuilderConfigurer gets applied after applying the configuration to DriverConfigLoaderBuilder. The driver config file acts as a fallback config if the configuration property cannot be looked up from system properties or from the configuration in DriverConfigLoaderBuilder.
We now resolve property names pointing to a composite key property into its individual column names to be applies in a SELECT projection or for ordering.
Removed the language of oppression and violence
and replaced it with more neutral language.
Note that problematic words in the code have
to remain in the docs until the code changes.
Original pull request: #176.
We now correctly use the CQL text to cache prepared statements. Previously, we used toString() which was a leftover from the driver migration that now defaults to Object.toString() and so the cache key was not stable.
Original pull request: #180.
DataClassRowMapper can map Cassandra results onto a class following the data class pattern (using constructor properties) or by setting bean properties.
data class Person(val firstname: String, val age: Int)
cqlTemplate.query("SELECT * FROM person", DataClassRowMapper<Person>())
We now attempt to extract the CQL query from various Statement and CqlProvider objects to log the CQL query.
Previously, the logger used the statement object with didn't render the query.