Support CompositeTypes?

Apr 24, 2012 at 8:52 PM

Do you support the use of CompositeTypes in Cassandraemon yet?

If not, do you have a timeframe in mind when you will?

 

Thanks.

Coordinator
Apr 25, 2012 at 12:24 AM

We had supported CompositeType.

Enjoy!

 

// Insert

using(var context = new CassandraContext("localhost", 9160, "KeySpace1"))
{
	var product = new Product { ID = 1, Name = "Product1" };
	
	var entity = new CassandraEntity<List<Column>>()
		        .SetKey(product.ID.ToString())
		        .SetDataAndColumnFamily(product);
	
	context.ColumnList.InsertOnSubmit(entity);
	context.SubmitChanges();
}

//Query
using(var context = new CassandraContext("localhost", 9160, "KeySpace1"))
{
	var products = from x in context.ColumnList
		       where x.Key == "1" &&
			     x.ColumnFamily == "Product"
		       select x.ToObject<Product>();
				   
	foreach(Product p in products)
	{
		Console.WriteLine(p.ToString());
	}
}
Apr 30, 2012 at 7:25 PM

Does this also include the use of Composite Keys?

Coordinator
May 3, 2012 at 3:34 AM

No.

Cassandra don't support Composite Key.

If you want to use Composite Key, you should concat keys.

 

	var entity = new CassandraEntity<List<Column>>()
		        .SetKey(product.ID + "-" + product.Name)
		        .SetDataAndColumnFamily(product);

 

 

Jun 29, 2012 at 10:23 AM

I want to do a slice on Composite columns (by specifying multiple components), is it implemented or will it be soon?

 

Thanks

Coordinator
Jul 1, 2012 at 4:30 AM

Sorry, Cassandraemon doesn't support Composite Column.

Above reply is my mistake.

I'd like to support Composite Column some day.