Class: Cql::Protocol::PreparedResultResponse
- Inherits:
-
ResultResponse
- Object
- Response
- ResultResponse
- Cql::Protocol::PreparedResultResponse
- Defined in:
- lib/cql/protocol/responses/prepared_result_response.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ PreparedResultResponse
constructor
A new instance of PreparedResultResponse.
- #to_s ⇒ Object
Methods inherited from ResultResponse
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(*args) ⇒ PreparedResultResponse
Returns a new instance of PreparedResultResponse.
8 9 10 |
# File 'lib/cql/protocol/responses/prepared_result_response.rb', line 8 def initialize(*args) @id, @metadata = args end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/cql/protocol/responses/prepared_result_response.rb', line 6 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/cql/protocol/responses/prepared_result_response.rb', line 6 def @metadata end |
Class Method Details
.decode!(buffer) ⇒ Object
12 13 14 15 16 |
# File 'lib/cql/protocol/responses/prepared_result_response.rb', line 12 def self.decode!(buffer) id = read_short_bytes!(buffer) = RowsResultResponse.(buffer) new(id, ) end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/cql/protocol/responses/prepared_result_response.rb', line 18 def to_s %(RESULT PREPARED #{id.each_byte.map { |x| x.to_s(16) }.join('')} #@metadata) end |