1

I am trying Cassandra with Spring

I have the Table and Persistence Object, Works Well.

With Cassandra (CQL script) I can make a sentence with: update ...,set ..., where, .. if ..,

My question is If I can use Spring Cassandra Operation (org.springframework.data.cassandra.core.CassandraOperation) with an Additional "If Sentence".

I want to have a version column and Work with Optimistic Locking (I dont Know yet if this is the best way)

jrey
  • 2,163
  • 1
  • 32
  • 48

1 Answers1

3

Spring Data does not support lightweight transactions (IF clauses). You'll have to build com.datastax.driver.core.Statements and execute them with CqlOperations.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207