Re: Mixing CAS UPDATE and non-CAS DELETE

2013-06-29 Thread Blair Zajac
On 6/26/13 10:26 AM, Sylvain Lebresne wrote: On Tue, Jun 25, 2013 at 5:30 AM, Blair Zajac bl...@orcaware.com mailto:bl...@orcaware.com wrote: But if I want to delete it regardless of v1, then this doesn't work: DELETE FROM test WHERE k = 0 IF EXISTS That's correct, though we

Re: Mixing CAS UPDATE and non-CAS DELETE

2013-06-26 Thread Sylvain Lebresne
On Tue, Jun 25, 2013 at 5:30 AM, Blair Zajac bl...@orcaware.com wrote: But if I want to delete it regardless of v1, then this doesn't work: DELETE FROM test WHERE k = 0 IF EXISTS That's correct, though we should probably fix that at some point. I've opened

Mixing CAS UPDATE and non-CAS DELETE

2013-06-24 Thread Blair Zajac
Looking at the CAS unit tests [1], if one does a CAS UPDATE to create a ROW: UPDATE test SET v1 = 2, v2 = 'foo' WHERE k = 0 IF NOT EXISTS there isn't a CAS DELETE FROM that only uses the partition key. You can do this to delete the row using CAS: DELETE FROM test WHERE k = 0 IF v1 =