Permalink
Browse files

added the ability to delete a column

  • Loading branch information...
1 parent e5a7795 commit 9da35f5c030b66cc204336fd259a6ce84180ccf5 @gillotte gillotte committed Sep 9, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/FluentColumnFamily.cs
@@ -249,6 +249,17 @@ public override bool TrySetColumn(object name, object value)
return true;
}
+ public void DeleteColumn(object name)
+ {
+ var schema = GetSchema().Columns.First(c => c.Name == name);
+
+ FluentColumn col = new FluentColumn(schema);
+ col.ColumnName = CassandraObject.GetCassandraObjectFromObject(name, schema.NameType);
+ col.SetParent(GetSelf());
+
+ MutationTracker.ColumnMutated(MutationType.Removed, col);
+ }
+
public override string ToString()
{
return String.Format("{0} - {1}", FamilyName, Key);

0 comments on commit 9da35f5

Please sign in to comment.