Hi Mark,

The Counter is just a a riak_object under the hood (at the Riak end of things) 
to the erlang client though it is modelled as an integer and operations on an 
integer.

We’ll get around to the README, sorry about that.

Using the counter is pretty simple. First you need to set whatever bucket you 
wish to store the counter in to allow_mult=true
Then just use the increment or fetch functions.

Here is an example session: https://gist.github.com/russelldb/7596268

Please note, you can also use the regular R,W,PR,PW etc options on increment 
and fetch.

Sorry about the lack of examples in the README, hope this makes up for it a 
little.

Cheers

Russell

On 21 Nov 2013, at 00:17, Mark Allen <mrall...@yahoo.com> wrote:

> Hi -
> 
> I'm trying to puzzle through how to use the PN counters in Riak 1.4.x via the 
> riakc client.  It *looks* like
> a 1.4 counter is a special kind of riak_obj metadata tuple.  So do you just 
> set the tuple in a riakc_obj with
> an undefined value?
> 
> The README in the client repo also doesn't seem to have an PN counter 
> examples.  Any guidance would
> be appreciated.
> 
> Thanks.
> 
> Mark
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to