Composite Keys

22 views
Skip to first unread message

aah...@gmail.com

unread,
Jul 23, 2013, 2:49:31 PM7/23/13
to hel...@googlegroups.com
Hi,

I am using latest Cassandra's thrift client.
I need a little help for working with composite keys. Is it possible to find some examples of it? Specially how would I search/insert on one part of the compost key?

Also how can I use cli to define a composite key?

Thanks,
Arslan

Calvin French-Owen

unread,
Jul 23, 2013, 3:08:19 PM7/23/13
to aah...@gmail.com, hel...@googlegroups.com
Haven't worked with Helenus recently, but this is how we solved it in terms of updating composites:

var name = ['prefix', 'suffix']
, value = 'val'
, timestamp = new Date()
, column = new helenus.Column(name, value, timestamp);
 
cf.insert(rowKey, column, options, callback);


We'd use an array as the column name, and then create the column object manually. Russ can weigh in on whether there is some syntactic sugar in the newest version. I seem to remember not being able to pass an array directly.



--
You received this message because you are subscribed to the Google Groups "helenus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to helenus+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages