Remove Google Guava as dependency so it can be pulled in as transitive dependency of cassandra-driver-core. We are no longer in charge of managing the actual Guava version.
Introduce ReactiveResultSet.availableRows() to fetch rows without transparent paging. Refactor QueryUtils to extract a Slice from an Iterable. Add slice(Query, Class) to ReactiveCassandraOperations to expose a consistent API. Convert space indentation to tab indentation. Add tests. Add since tags. Add documentation. Reformat code.
Original pull request: #128.
We now support Slice queries using reactive Cassandra repositories. Repository query methods can declare Mono<Slice<T>> as their return type to query for slices without applying transparent paging. The resulting Mono always completes with a value. An empty query result returns a Mono emitting an empty Slice.
interface UserRepository extends CrudRepository<User, String> {
Mono<Slice<User>> findByLastname(String firstname, Pageable pageable);
}
Mono<Slice<User>> result =repository.findByLastname("White", CassandraPageRequest.first(1));
Original pull request: #128.
We now check whether the inspected property type is a AnnotatedParameterizedType one before attempting to extract type parameters. Map-like and Collection-like properties can be generic typed, untyped or subtype of either one and we restrict annotation scanning to generic typed ones.
Previously, we applied a downcast without checking for the actual type which lead to a ClassCastException.
We now allow the configuration whether null values of entity objects should be inserted as tombstones using INSERT statements. By default, this option is disable. Enabling tombstones allows upsert usage through INSERT statements as null values get inserted in Cassandra. This option is useful if an object should be persisted in its whole state. Inserting nulls causes tombstones to be created and can have a negative impact on performance.
This change allows SimpleRepository and SimpleCassandraRepository to use CassandraTemplate directly allowing emission of lifecycle events.
We now provide Kotlin extensions for imperative, asynchronous, and reactive Template API interfaces.
CqlOperations and CassandraOperations expose Kotlin-friendly methods accepting KClasses and leveraging reified generics. We also provide Kotlin-friendly method renames for methods such as in that do not require quoting in Kotlin code.
operations.query(Person::class).inTable("my_table").asType<User>().all()
operations.select<Person>(query(where("firstname").isEqualTo("Walter") and where("lastname").isEqualTo("White")))
We now consider user-type dependencies while dropping user-defined types. User types can utilize other user-defined types and dropping a type that is in use causes the drop operation to fail. We're introspecting user types reported by Cassandra and construct a dependency graph that is used to determine the proper drop order.
We now support Cassandra time columns via LocalTime types (JSR-310, Joda and ThreeTenBackport) in domain classes, queries and updates.
@Table
class Schedule {
@Id String id;
LocalTime scheduledAt;
}