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.
Spring Data Cassandra's Template API accepts plain, static CQL and Datastax' Statement types on various method calls. This requires any payload to be already converted to a Cassandra-readable representation. Statement are encapsulated quite well so they don't allow introspection and mapping into different structures.
Introducing Query and Update objects could leverage the mapping issue and reduce method overloads as various options could be integrated into Query (see Spring Data MongoDB). Using Update introduces a wide range of possibilities to partially update data stored inside Cassandra.
User user = …;
UserId userId = …;
Update u = new Update().set("directory", "/Users/Test/Desktop")
.add("list", user);
.remove("set", userId);
Update u = new Update().increment("counter", 5);
Query q = new Query(where("name")
.is("Mark")
.and("age").lt(80))
.and("map").containsKey(userId)
.and("set").contains(user);
Issue Links:
DATACASS-511 Limiting query results does not work
("is duplicated by")
Mark Paluch opened DATACASS-343 and commented
Spring Data Cassandra's Template API accepts plain, static CQL and Datastax'
Statement
types on various method calls. This requires any payload to be already converted to a Cassandra-readable representation.Statement
are encapsulated quite well so they don't allow introspection and mapping into different structures.Introducing
Query
andUpdate
objects could leverage the mapping issue and reduce method overloads as various options could be integrated intoQuery
(see Spring Data MongoDB). UsingUpdate
introduces a wide range of possibilities to partially update data stored inside Cassandra.Issue Links:
DATACASS-511 Limiting query results does not work ("is duplicated by")
DATACASS-285 Add support for counter columns
DATACASS-281 Use wrapped query types ("supersedes")
Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/101