[ 
https://issues.apache.org/jira/browse/CASSANDRA-5708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tyler Hobbs updated CASSANDRA-5708:
-----------------------------------

    Attachment: 5708-v1.txt

5708-v1.txt (and 
[branch|https://github.com/thobbs/cassandra/tree/CASSANDRA-5708]) adds support 
for IF EXISTS in DELETE statements.  I've also created a 
[dtest|https://github.com/thobbs/cassandra-dtest/tree/CASSANDRA-5708] to 
exercise this.

I figured that we might add "IF EXISTS" support for UPDATE statements at some 
point, so I added the {{ifExists}} attribute alongside {{ifNotExists}} in 
{{ModificationStatement}}.

I'm not familiar with your grammar preferences yet, so let me know if you'd 
like the grammar changes to be done another way.

> Add DELETE ... IF EXISTS to CQL3
> --------------------------------
>
>                 Key: CASSANDRA-5708
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5708
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Tyler Hobbs
>            Priority: Minor
>             Fix For: 2.0.7
>
>         Attachments: 5708-v1.txt
>
>
> I've been slightly lazy in CASSANDRA-5443 and didn't added a {{DELETE .. IF 
> EXISTS}} syntax to CQL because it wasn't immediately clear what was the 
> correct condition to use for the "IF EXISTS". But at least for CQL3 tables, 
> this is in fact pretty easy to do using the row marker so we should probably 
> add it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to