有Cassandra的任何Ruby客户端与计数器和超列? [英] Are there any Ruby clients for Cassandra with counters and supercolumn?

查看:161
本文介绍了有Cassandra的任何Ruby客户端与计数器和超列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有支持计数器和超列的Cassandra有任何Ruby客户端吗?

Are there any Ruby clients for Cassandra with support of counters and supercolumns?

1)gem cassandra不支持计数器

1) gem cassandra doesn't support counters

2)gem cassandra-cql不支持超列(cql不支持它们)

2) gem cassandra-cql doesn't support supercolumns (cql doesn't support them)

推荐答案

'cassandra' gem支持计数器,它没有很好的文档。支持已于2011年5月添加( a1a085469 )。要增加计数器:

The 'cassandra' gem does support counters, its just not well documented. Support was added in May 2011 (a1a085469). To increment a counter:

@twitter.add(:UserCounters, 'bob', 5, 'tweet_count')

其中


  • code>:UserCounters 是列族

  • / li>
  • 5 是通过
  • 增加计数器的金额
  • tweet_count'是column_name

  • :UserCounters is the column family
  • 'bob' is the row key
  • 5 is the amount to increment the counter by
  • 'tweet_count' is the column_name

这篇关于有Cassandra的任何Ruby客户端与计数器和超列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆