public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Column_or_supercolumn = new ColumnOrSuperColumn();
                        Column_or_supercolumn.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        Deletion = new Deletion();
                        Deletion.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           Column_or_supercolumn = new ColumnOrSuperColumn();
           Column_or_supercolumn.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Deletion = new Deletion();
           Deletion.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemple #3
0
		public static IEnumerable<Mutation> CreateDeletedSuperColumnMutation(IEnumerable<FluentMutation> mutation)
		{
			var list = new List<Mutation>();

			foreach (var col in mutation)
			{
				var superColumn = col.Column.GetPath().SuperColumn.ColumnName.TryToBigEndian();

				var deletion = new Deletion {
					Timestamp = col.ColumnTimestamp.ToCassandraTimestamp(),
					Super_column = superColumn,
					Predicate = CreateSlicePredicate(new[] { col.Column.ColumnName })
				};

				list.Add(new Mutation {
					Deletion = deletion
				});
			}

			return list;
		}
Exemple #4
0
		public static IEnumerable<Mutation> CreateDeletedColumnMutation(IEnumerable<FluentMutation> mutation)
		{
			var list = new List<Mutation>();

			foreach (var col in mutation)
			{
				var deletion = new Deletion {
					Timestamp = col.ColumnTimestamp.ToCassandraTimestamp(),
					Predicate = CreateSlicePredicate(new[] { col.Column.ColumnName })
				};

				list.Add(new Mutation {
					Deletion = deletion
				});
			}

			return list;
		}