public RequestFrame GetFrame(short streamId) { var wb = new BEBinaryWriter(); wb.WriteFrameHeader((byte)ProtocolVersion, _headerFlags, streamId, OpCode); wb.WriteLongString(_cqlQuery); _queryOptions.Write(wb, (byte)ProtocolVersion, false); return(wb.GetFrame()); }
public RequestFrame GetFrame(short streamId) { var wb = new BEBinaryWriter(); wb.WriteFrameHeader((byte)ProtocolVersion, (byte)_headerFlags, streamId, OpCode); if (Payload != null) { wb.WriteBytesMap(Payload); } wb.WriteLongString(Query); return(wb.GetFrame()); }
public RequestFrame GetFrame(short streamId) { var wb = new BEBinaryWriter(); if (Payload != null) { _headerFlags |= FrameHeader.HeaderFlag.CustomPayload; } wb.WriteFrameHeader((byte)ProtocolVersion, (byte)_headerFlags, streamId, OpCode); if (Payload != null) { //A custom payload for this request wb.WriteBytesMap(Payload); } wb.WriteLongString(_cqlQuery); _queryOptions.Write(wb, (byte)ProtocolVersion, false); return(wb.GetFrame()); }
public void WriteToBatch(byte protocolVersion, BEBinaryWriter 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); } } }
public void WriteToBatch(byte protocolVersion, BEBinaryWriter 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); } } }
public RequestFrame GetFrame(short streamId) { var wb = new BEBinaryWriter(); wb.WriteFrameHeader((byte)ProtocolVersion, _headerFlags, streamId, OpCode); wb.WriteLongString(_cqlQuery); _queryOptions.Write(wb, (byte)ProtocolVersion, false); return wb.GetFrame(); }
public RequestFrame GetFrame(short streamId) { var wb = new BEBinaryWriter(); if (Payload != null) { _headerFlags |= FrameHeader.HeaderFlag.CustomPayload; } wb.WriteFrameHeader((byte)ProtocolVersion, (byte)_headerFlags, streamId, OpCode); if (Payload != null) { //A custom payload for this request wb.WriteBytesMap(Payload); } wb.WriteLongString(_cqlQuery); _queryOptions.Write(wb, (byte)ProtocolVersion, false); return wb.GetFrame(); }