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

Sylvain Lebresne commented on CASSANDRA-5443:
---------------------------------------------

So, here's my suggestion for a syntax:
{noformat}
UPDATE foo ATOMICALLY SET x = 3, y = 5, z = 'bar' IF x = 4, y = null WHERE k = 
'mykey'
{noformat}

This would return a result set, and that result set might look like:
{noformat}
result
------
  true
{noformat}
where 'result' might be replaced by something more appropriate if someone has 
an idea.

There is the question of whether we'd want to allow that in batches (in which 
case we would need to number the results or something), but I wonder if it's 
really worth bothering with that.

Also, I think we might want to support a DELETE version, because otherwise I 
don't think one can delete a row conditionally. So something like:
{noformat}
DELETE ATOMICALLY FROM foo IF x = 3 WHERE k = 'key';
DELETE ATOMICALLY y, z FROM foo IF x = 3 WHERE k = 'key';
{noformat}

                
> Add CAS CQL support
> -------------------
>
>                 Key: CASSANDRA-5443
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5443
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>             Fix For: 2.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to