Exemplo n.º 1
0
 public void Read (TProtocol iprot)
 {
   bool isset_column_parent = false;
   bool isset_index_clause = false;
   bool isset_column_predicate = false;
   bool isset_consistency_level = false;
   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_parent = new ColumnParent();
           Column_parent.Read(iprot);
           isset_column_parent = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Index_clause = new IndexClause();
           Index_clause.Read(iprot);
           isset_index_clause = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column_predicate = new SlicePredicate();
           Column_predicate.Read(iprot);
           isset_column_predicate = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
           isset_consistency_level = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_column_parent)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_index_clause)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_column_predicate)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_consistency_level)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Exemplo n.º 2
0
 public get_indexed_slices_args(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level) : this() {
   this.Column_parent = column_parent;
   this.Index_clause = index_clause;
   this.Column_predicate = column_predicate;
   this.Consistency_level = consistency_level;
 }
Exemplo n.º 3
0
 public void send_get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("get_indexed_slices", TMessageType.Call, seqid_));
   get_indexed_slices_args args = new get_indexed_slices_args();
   args.Column_parent = column_parent;
   args.Index_clause = index_clause;
   args.Column_predicate = column_predicate;
   args.Consistency_level = consistency_level;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Exemplo n.º 4
0
 public IAsyncResult send_get_indexed_slices(AsyncCallback callback, object state, ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
Exemplo n.º 5
0
      /// <summary>
      /// Returns the subset of columns specified in SlicePredicate for the rows matching the IndexClause
      /// @deprecated use get_range_slices instead with range.row_filter specified
      /// </summary>
      /// <param name="column_parent"></param>
      /// <param name="index_clause"></param>
      /// <param name="column_predicate"></param>
      /// <param name="consistency_level"></param>
      public List<KeySlice> get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level)
      {
        #if !SILVERLIGHT
        send_get_indexed_slices(column_parent, index_clause, column_predicate, consistency_level);
        return recv_get_indexed_slices();

        #else
        var asyncResult = Begin_get_indexed_slices(null, null, column_parent, index_clause, column_predicate, consistency_level);
        return End_get_indexed_slices(asyncResult);

        #endif
      }
Exemplo n.º 6
0
 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_parent = new ColumnParent();
           Column_parent.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Index_clause = new IndexClause();
           Index_clause.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Column_predicate = new SlicePredicate();
           Column_predicate.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }