class Cassandra::Protocol::RawRowsResultResponse

Public Class Methods

new(custom_payload, warnings, protocol_version, raw_rows, paging_state, trace_id, custom_type_handlers = nil) click to toggle source
Calls superclass method
   # File lib/cassandra/protocol/responses/raw_rows_result_response.rb
22 def initialize(custom_payload,
23                warnings,
24                protocol_version,
25                raw_rows,
26                paging_state,
27                trace_id,
28                custom_type_handlers = nil)
29   super(custom_payload, warnings, nil, nil, paging_state, trace_id)
30   @protocol_version = protocol_version
31   @raw_rows = raw_rows
32   @custom_type_handlers = custom_type_handlers
33 end

Public Instance Methods

materialize(metadata) click to toggle source
   # File lib/cassandra/protocol/responses/raw_rows_result_response.rb
35 def materialize(metadata)
36   @metadata = metadata
37 
38   @rows = if @protocol_version == 4
39             Coder.read_values_v4(@raw_rows, @metadata, @custom_type_handlers)
40           elsif @protocol_version == 3
41             Coder.read_values_v3(@raw_rows, @metadata)
42           else
43             Coder.read_values_v1(@raw_rows, @metadata)
44           end
45 
46   @rows
47 end
rows() click to toggle source
   # File lib/cassandra/protocol/responses/raw_rows_result_response.rb
49 def rows
50   raise Errors::DecodingError, 'Not materialized!' unless @rows
51   @rows
52 end
to_s() click to toggle source
   # File lib/cassandra/protocol/responses/raw_rows_result_response.rb
54 def to_s
55   %(RESULT ROWS (raw))
56 end