pchalamet/cassandra-sharp — pull request #71 by Virus-X (2014-02-27 12:31:33+00:00)
Title: Huge improvements

Hi! Thank you for this awesome lib. I'm using it in own project and I made some improvements to it.
Maybe it's too much changes for one pull request.. if so, I can create few smaller ones.

Generally, all this changes make data binding much more flexible. And POCO, well.. now it's more like Entity. But you can use it in old way, if you wish, no code is necessary to be changed.

* I've added attributes CqlColumn("") and CqlIgnore for object to be able to have different field/property names from mapped columns. Also, object now can have ignored columns - this needed for future improvements.

* Added transparent serialization for embedded objects. For example, you might want to store Shapes in Cassandra table and you need them to have list of points. You could create poco and serialize each Point manually:
```
public class Shape
{
public long Id {get;set;}
public List Points {get;set;}
}
```
But now you have only to define CassandraTypeSerializer for Point class, and embed Point inside Shape. Data will be serialized transparently to blob and deserialized back, which leads to cleaner code and less frustration ;)
```
public class Shape
{
public long Id {get;set;}
public List Points {get;set;}
}

[CassandraTypeSerializer(typeof(PointSerializer))]
public class Point
{
public int X {get;set;}
public int Y {get;set;}
}

public class PointSerializer : ICassandraTypeSerializer ...
```

* Also, library only supported List, HashSet and Dictionary collections. Now you can use any collection, that implements IList, ISet and IDictionary and have public parameterless constructor.

* As result of changes, introduced in 2 and 3, I refactored Ordinal and ParamBag data mappers too and removed InstanceBuilder and DataSource classes. Now all mapping functionality is obviously inside DataMapper classes.

* Added DefaultKeyspace configuration. Most applications use single keyspace inside Cassandra. With this setting, you don't have to specify keyspace each time you query the database. This archived by invoking SET KEYSPACE command on each connection.

So, I think, that's all for now.
I have plans to implement small library with Repository pattern in near future, that uses your library as backend (actually I have it, but it needs some cleanup).