Skip to content

Introduce Query and Update objects [DATACASS-343] #514

@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: pull request #101

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supportin: mappingMapping and conversion infrastructuretype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions