On Wed, Aug 7, 2013 at 10:47 AM, Aaron Morton <aa...@thelastpickle.com>wrote:

> As for the atomic increment, I take the answer is 'no, there is no atomic
> increment, I have to pull the value to the client and send an update with
> the new value'.
>
> Saying "atomic increment" is probably confusing.
> You cannot have Counters, the thing most people would think about when you
> say "increment", in a collection type.
>
> You can update the values in a map server side.
>
> If you can provide a concrete example of what you want to do it may be
> easier.
>
>

I think the OP is asking if the following op is atomic:

UPDATE users SET favs['posts'] = favs['post'] + 1 WHERE id = 'smith'


:- a)

Cheers
>
> -----------------
> Aaron Morton
> Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 6/08/2013, at 10:05 PM, Andy Twigg <andy.tw...@gmail.com> wrote:
>
> Counters can be atomically incremented (
> http://wiki.apache.org/cassandra/Counters). Pick a UUID for the counter,
> and use that: c=map.get(k); c.incr()
>
>
> On 6 August 2013 11:01, Jan Algermissen <jan.algermis...@nordsc.com>wrote:
>
>>
>> On 06.08.2013, at 11:36, Andy Twigg <andy.tw...@gmail.com> wrote:
>>
>> > Store pointers to counters as map values?
>>
>> Sorry, but this fits into nothing I know about C* so far - can you
>> explain?
>>
>> Jan
>>
>>
>
>
> --
> Dr Andy Twigg
> Junior Research Fellow, St Johns College, Oxford
> Room 351, Department of Computer Science
> http://www.cs.ox.ac.uk/people/andy.twigg/
> andy.tw...@cs.ox.ac.uk | +447799647538
>
>
>


-- 

:- a)


Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru

Reply via email to