Project Description

Cassandraemon is LINQ Provider for Apache Cassandra.

How To Use

See Documentation

Features

  • You can Query by LINQ
  • Support Regist, Delete Operation
  • Useful Extension Method
  • Have a variety of Convert Method
  • Support Secondary Index
  • Support CQL
  • Support Counter
  • Support TimeUUID
  • Regist with Big Endian format for interoperating with java
  • Full Text Search
  • Connection Pooling
  • Load Balancing and Failover

Sample


Query as Column

using(var context = new CassandraContext("localhost", 9160, "KeySpace1"))
{
	var entitys = from x in context.Column
      		      where x.Key == "1" &&
		            x.ColumnFamily == "Product" &&
		            x.Column == "Name"
		      select x;
				   
	foreach(CassandraEntity<Column> e in entitys)
	{
		Console.WriteLine(e.Data.Name.ToInt32());
		Console.WriteLine(e.Data.Value.ToUTF8());
	}
}

Query as Object

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());
	}
}

Last edited Dec 3, 2011 at 2:11 AM by sabro, version 15