spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
379 stars 311 forks source link

Revisit Template API return types [DATACASS-466] #635

Closed spring-projects-issues closed 7 years ago

spring-projects-issues commented 7 years ago

Mark Paluch opened DATACASS-466 and commented

CassandraTemplate and AsyncCassandraTemplate return the affected entity in modifying operations (INSERT, UPDATE, DELETE).

All other modules return either void or a UpdateResult/DeleteResult type containing a response. Returning the entity is limiting especially when it comes to lightweight transactions. Currently, a non-executed transaction (applied=false) returns null or does not emit an element using the reactive template.

It's desirable to not return null values and have an extensible model regarding the command execution


Affects: 2.0 M4 (Kay)

Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/110, and commits https://github.com/spring-projects/spring-data-cassandra/commit/1d4db2cc928dc76ed9c732965d512fb1f50c483d, https://github.com/spring-projects/spring-data-cassandra/commit/cfabc35e352b534c6bfce0cc88f4e743979d98f8, https://github.com/spring-projects/spring-data-cassandra/commit/622fe73ddb9f1ad5a68110853a74d0bf6a177ea7, https://github.com/spring-projects/spring-data-cassandra/commit/222b7667e9cd8a0d6839a71eb1274aa3e87e37dc, https://github.com/spring-projects/spring-data-cassandra/commit/f7511b4df93e3e7023c813737ef5f38dc40bcfad, https://github.com/spring-projects/spring-data-cassandra/commit/0ccb64a686445f93cc40be403e65e67e1eb2f2a2

spring-projects-issues commented 7 years ago

John Blum commented

Reviewed, polished and merged to master for Spring Data Cassandra 2.0.0.RC1 (Kay RC1)