Class: Cql::Protocol::ResultResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/cql/protocol/responses/result_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance 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!

Constructor Details

#initialize(trace_id) ⇒ ResultResponse

Returns a new instance of ResultResponse.



8
9
10
# File 'lib/cql/protocol/responses/result_response.rb', line 8

def initialize(trace_id)
  @trace_id = trace_id
end

Instance Attribute Details

#trace_idObject (readonly)

Returns the value of attribute trace_id.



6
7
8
# File 'lib/cql/protocol/responses/result_response.rb', line 6

def trace_id
  @trace_id
end

Class Method Details

.decode!(buffer, trace_id = nil) ⇒ Object



12
13
14
15
16
17
# File 'lib/cql/protocol/responses/result_response.rb', line 12

def self.decode!(buffer, trace_id=nil)
  kind = read_int!(buffer)
  impl = RESULT_TYPES[kind]
  raise UnsupportedResultKindError, %(Unsupported result kind: #{kind}) unless impl
  impl.decode!(buffer, trace_id)
end

Instance Method Details

#void?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/cql/protocol/responses/result_response.rb', line 19

def void?
  false
end