Update stores one column name as key and one operation as value.
|
private final Map<ColumnName, AssignmentOp> updateOperations; |
Because of this it is not possible to update several keys for column with map type.
Example of code:
CREATE TABLE data (fields map<VARCHAR, VARCHAR>);
List<Update.AssignmentOp> updateOperations = new LinkedList<>();
updateOperations.add(new Update.SetAtKeyOp(ColumnName.from("map"), "key1", "value1"));
updateOperations.add(new Update.SetAtKeyOp(ColumnName.from("map"), "key2", "value2"));
Update update = Update.of(updateOperations);
OR
Update update = Update.empty()
.set("map").atKey("key1").to("value1")
.set("map").atKey("key2").to("value2");
only one of operations will be present in update object.
Update stores one column name as key and one operation as value.
spring-data-cassandra/spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/query/Update.java
Line 49 in 67d8e59
Because of this it is not possible to update several keys for column with map type.
Example of code:
only one of operations will be present in update object.