public int WriteFrame(short streamId, MemoryStream stream)
 {
     var wb = new FrameWriter(stream);
     wb.WriteFrameHeader((byte)ProtocolVersion, 0x00, streamId, OpCode);
     wb.WriteBytes(_token);
     return wb.Close();
 }
 public int WriteFrame(short streamId, MemoryStream stream, Serializer serializer)
 {
     var wb = new FrameWriter(stream, serializer);
     wb.WriteFrameHeader(0x00, streamId, OpCode);
     wb.WriteBytes(_token);
     return wb.Close();
 }
        public int WriteFrame(short streamId, MemoryStream stream, Serializer serializer)
        {
            var wb = new FrameWriter(stream, serializer);

            wb.WriteFrameHeader(0x00, streamId, OpCode);
            wb.WriteBytes(_token);
            return(wb.Close());
        }
Beispiel #4
0
        public int WriteFrame(short streamId, MemoryStream stream)
        {
            var wb = new FrameWriter(stream);

            wb.WriteFrameHeader((byte)ProtocolVersion, 0x00, streamId, OpCode);
            wb.WriteBytes(_token);
            return(wb.Close());
        }
Beispiel #5
0
 public void WriteToBatch(byte protocolVersion, FrameWriter wb)
 {
     wb.WriteByte(1); //prepared query
     wb.WriteShortBytes(_id);
     wb.WriteUInt16((ushort)_queryOptions.Values.Length);
     for (int i = 0; i < _metadata.Columns.Length; i++)
     {
         byte[] bytes = TypeCodec.Encode(protocolVersion, _queryOptions.Values[i]);
         wb.WriteBytes(bytes);
     }
 }
Beispiel #6
0
 public void WriteToBatch(byte protocolVersion, FrameWriter wb)
 {
     //not a prepared query
     wb.WriteByte(0);
     wb.WriteLongString(_cqlQuery);
     if (_queryOptions.Values == null || _queryOptions.Values.Length == 0)
     {
         //not values
         wb.WriteInt16(0);
     }
     else
     {
         wb.WriteUInt16((ushort)_queryOptions.Values.Length);
         for (var i = 0; i < _queryOptions.Values.Length; i++)
         {
             var bytes = TypeCodec.Encode(protocolVersion, _queryOptions.Values[i]);
             wb.WriteBytes(bytes);
         }
     }
 }
Beispiel #7
0
 protected override void WriteBody(FrameWriter wb)
 {
     wb.WriteBytes(_token);
 }
 public void WriteToBatch(byte protocolVersion, FrameWriter wb)
 {
     wb.WriteByte(1); //prepared query
     wb.WriteShortBytes(_id);
     wb.WriteUInt16((ushort) _queryOptions.Values.Length);
     for (int i = 0; i < _metadata.Columns.Length; i++)
     {
         byte[] bytes = TypeCodec.Encode(protocolVersion, _queryOptions.Values[i]);
         wb.WriteBytes(bytes);
     }
 }
Beispiel #9
0
 public void WriteToBatch(byte protocolVersion, FrameWriter wb)
 {
     //not a prepared query
     wb.WriteByte(0);
     wb.WriteLongString(_cqlQuery);
     if (_queryOptions.Values == null || _queryOptions.Values.Length == 0)
     {
         //not values
         wb.WriteInt16(0);
     }
     else
     {
         wb.WriteUInt16((ushort) _queryOptions.Values.Length);
         for (var i = 0; i < _queryOptions.Values.Length; i++)
         {
             var bytes = TypeCodec.Encode(protocolVersion, _queryOptions.Values[i]);
             wb.WriteBytes(bytes);
         }
     }
 }