Hi i'm using the cassandra-cql gem for Ruby on Rails.
I need to count all users. In my case users are rows in the users column family. Users have (id, first_name, last_name, email) The code below returns a value that is in a kind of binary encoding. Does anybody know how i can return the right counter value as integer?
Or is it possible to return the biggest id without fetching all users? In CQL?
Or is there any kind of index_length when i create an index?
def self.counter
count = @@db.execute("SELECT count(*) FROM users")
count.fetch do |f|
puts f.row.columns.first.value
end
end