Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
added the ability to delete a column
Browse files Browse the repository at this point in the history
  • Loading branch information
gillotte committed Sep 9, 2012
1 parent e5a7795 commit 9da35f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/FluentColumnFamily.cs
Expand Up @@ -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);
Expand Down

0 comments on commit 9da35f5

Please sign in to comment.