Cassandra有没有任何带有计数器和超级列的Ruby客户端?

时间:2021-07-14 16:57:14

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

Cassandra是否有支持计数器和超级列的Ruby客户端?

1) gem cassandra doesn't support counters

1)gem cassandra不支持计数器

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

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

1 个解决方案

#1


3  

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

'cassandra'宝石确实支持计数器,它只是没有很好的记录。 2011年5月增加了支持(a1a085469)。增加一个计数器:

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

Where

  • :UserCounters is the column family
  • :UserCounters是列族

  • 'bob' is the row key
  • 'bob'是行键

  • 5 is the amount to increment the counter by
  • 5是增加计数器的数量

  • 'tweet_count' is the column_name
  • 'tweet_count'是column_name

#1


3  

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

'cassandra'宝石确实支持计数器,它只是没有很好的记录。 2011年5月增加了支持(a1a085469)。增加一个计数器:

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

Where

  • :UserCounters is the column family
  • :UserCounters是列族

  • 'bob' is the row key
  • 'bob'是行键

  • 5 is the amount to increment the counter by
  • 5是增加计数器的数量

  • 'tweet_count' is the column_name
  • 'tweet_count'是column_name