[ 
https://issues.apache.org/jira/browse/CASSANDRA-5633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848238#comment-13848238
 ] 

Sebastian Schmidt commented on CASSANDRA-5633:
----------------------------------------------

We are pretty much stuck with Hector right now and would like to move to CQL 
once this gets implemented. Our use case is not very specific, but we are 
trying to model data that contains relationships that need to be updated 
atomically. Using CAS through CQL makes it impossible for us to use atomic 
updates, which can easily break our constraints. We believe that any data model 
that contains dependencies or relationships requires such a functionality 
should CAS be used as an op-lock mechanism.

As a suggestion for syntax, we have the following to offer:

update cf set c='a', d='b' where foo='a' and bar = 'b', set c='x', d='y' where 
foo='a' and bar = 'c' if (bar='b' and c='d’), (bar='g' and c='h’);

where the table is:

CREATE TABLE cf (
  foo text,
  bar text,
  c text,
  d text,
  PRIMARY KEY (foo, bar)
)

> CQL support for updating multiple rows in a partition using CAS
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-5633
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5633
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 2.0 beta 1
>            Reporter: sankalp kohli
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: cql3
>             Fix For: 2.0.4
>
>
> This is currently supported via Thrift but not via CQL. 



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to