You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Roshni Rajagopal <ro...@hotmail.com> on 2012/09/20 07:13:36 UTC
CQL3 - collections
Hi,
CQL3, has collections support as described in this linkhttp://www.datastax.com/dev/blog/cql3_collections
So looks like when you have a column called email and you could store 1 value called abc@xyz.com, now you can store a list.would it be possible to store a name value pair, like column name is Item Id and value is a collection with 2 elements in each row like {{'name' , 'apple'}, {'Descr' , 'Granny Smith'}, {'Qty','3'} }
or would we need to have a column named Item Id and value is {'apple', 'granny smith', '3'}. and the application needs to figure out that 1st element is name, second is descr etc
Also can you store different data types in each row of the list or do all elements need to be of the same type?
Im guessing we cant do both- but can anyone confirm.
Regards,Roshni
Re: CQL3 - collections
Posted by Sylvain Lebresne <sy...@datastax.com>.
I wrote an answer on the blog post
(http://www.datastax.com/dev/blog/cql3_collections#comment-127093).
--
Sylvain
On Thu, Sep 20, 2012 at 7:13 AM, Roshni Rajagopal
<ro...@hotmail.com> wrote:
> Hi,
>
> CQL3, has collections support as described in this link
> http://www.datastax.com/dev/blog/cql3_collections
>
> So looks like when you have a column called email and you could store 1
> value called abc@xyz.com, now you can store a list.
> would it be possible to store a name value pair, like column name is Item Id
> and value is a collection with 2 elements in each row like {{'name' ,
> 'apple'}, {'Descr' , 'Granny Smith'}, {'Qty','3'} }
>
> or would we need to have a column named Item Id and value is {'apple',
> 'granny smith', '3'}. and the application needs to figure out that 1st
> element is name, second is descr etc
>
> Also can you store different data types in each row of the list or do all
> elements need to be of the same type?
>
> Im guessing we cant do both- but can anyone confirm.
>
>
>
>
> Regards,
> Roshni