Spring boot 弹簧靴&x2B;cassandra轻量级事务更新

Spring boot 弹簧靴&x2B;cassandra轻量级事务更新,spring-boot,cassandra,spring-data-cassandra,Spring Boot,Cassandra,Spring Data Cassandra,有没有办法不用编写查询就用轻量级事务实现更新?如何实现来自casandra的示例 UPDATE cycling.cyclist_name SET firstname = ‘Roxane’ WHERE id = 4647f6d3-7bd2-4085-8d6c-1229351b5498 IF firstname = ‘Roxxane’; 借 或 插入选项可以很好地与 InsertOptions .builder() .ifNotExists(true) .build(); 从2.2开始,他们有

有没有办法不用编写查询就用轻量级事务实现更新?如何实现来自casandra的示例

UPDATE cycling.cyclist_name
SET firstname = ‘Roxane’
WHERE id = 4647f6d3-7bd2-4085-8d6c-1229351b5498
IF firstname = ‘Roxxane’;

插入选项可以很好地与

 InsertOptions
.builder()
.ifNotExists(true)
.build();

从2.2开始,他们有一个api来指定条件检查


Apache Cassandra的Spring数据现在只支持
如果存在
/
如果不存在
条件。有关将条件扩展到条件查询的信息,请参见。
cops.batchOps()
 InsertOptions
.builder()
.ifNotExists(true)
.build();
public UpdateOptions.UpdateOptionsBuilder ifCondition(Filter condition)
Use light-weight transactions by applying IF condition. Replaces a previous ifCondition(Filter) and ifExists(boolean).
Parameters:
condition - the condition to apply for conditional updates, must not be null.
Returns:
this UpdateOptions.UpdateOptionsBuilder
Since:
2.2