cassandra twitter ruby client

2012-08-27 Thread Yuhan Zhang
Hi all, I'm playing with cassandra's ruby client written by twitter, trying to perform a simple get. but looks like it assumed the value types to be uft8 string. however, my values are in double (keyed and column names are utf8types). The values that I got are like:

Re: cassandra twitter ruby client

2012-08-27 Thread Peter Sanford
That library requires you to serialize and deserialize the data yourself. So to insert a ruby Float you would value = 28.21 [value].pack('G') @client.insert(:somecf, 'key', {'floatval' = [value].pack('G')}) and to read it back out: value = @client.get(:somecf, 'key',

Re: cassandra twitter ruby client

2012-08-27 Thread Yuhan Zhang
Hi Peter, works well. Thanks for lot! :D will check out cassandra-cql. Yuhan On Mon, Aug 27, 2012 at 3:34 PM, Peter Sanford psanf...@nearbuysystems.comwrote: That library requires you to serialize and deserialize the data yourself. So to insert a ruby Float you would value = 28.21