Skip to content
This repository
Browse code

added the ability to delete a column

  • Loading branch information...
commit 9da35f5c030b66cc204336fd259a6ce84180ccf5 1 parent e5a7795
gillotte authored September 09, 2012

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. 11  src/FluentColumnFamily.cs
11  src/FluentColumnFamily.cs
@@ -249,6 +249,17 @@ public override bool TrySetColumn(object name, object value)
249 249
 			return true;
250 250
 		}
251 251
 
  252
+        public void DeleteColumn(object name)
  253
+        {
  254
+            var schema = GetSchema().Columns.First(c => c.Name == name);
  255
+
  256
+            FluentColumn col = new FluentColumn(schema);
  257
+            col.ColumnName = CassandraObject.GetCassandraObjectFromObject(name, schema.NameType);
  258
+            col.SetParent(GetSelf());
  259
+
  260
+            MutationTracker.ColumnMutated(MutationType.Removed, col);
  261
+        }
  262
+
252 263
 		public override string ToString()
253 264
 		{
254 265
 			return String.Format("{0} - {1}", FamilyName, Key);

0 notes on commit 9da35f5

Please sign in to comment.
Something went wrong with that request. Please try again.