Class: Cql::Protocol::Response

Inherits:
Object
  • Object
show all
Extended by:
Decoding
Defined in:
lib/cql/protocol/response.rb

Class Method Summary collapse

Methods included from Decoding

read_byte!, read_bytes!, read_consistency!, read_decimal!, read_double!, read_float!, read_inet!, read_int!, read_long!, read_long_string!, read_option!, read_short!, read_short_bytes!, read_string!, read_string_list!, read_string_map!, read_string_multimap!, read_uuid!, read_varint!

Class Method Details

.decode!(opcode, buffer, trace_id) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/cql/protocol/response.rb', line 8

def self.decode!(opcode, buffer, trace_id)
  response_class = RESPONSE_TYPES[opcode]
  if response_class
    response_class.decode!(buffer, trace_id)
  else
    raise UnsupportedOperationError, "The operation #{opcode} is not supported"
  end
end