- Notifications
You must be signed in to change notification settings - Fork 310
Description
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
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") -
DATACASS-285 Add support for counter columns
-
DATACASS-281 Use wrapped query types
("supersedes")
Referenced from: pull request #101