Class: Cql::Protocol::SchemaChangeResultResponse
- Inherits:
-
ResultResponse
- Object
- Response
- ResultResponse
- Cql::Protocol::SchemaChangeResultResponse
- Defined in:
- lib/cql/protocol/responses/schema_change_result_response.rb
Instance Attribute Summary collapse
-
#change ⇒ Object
readonly
Returns the value of attribute change.
-
#keyspace ⇒ Object
readonly
Returns the value of attribute keyspace.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Attributes inherited from ResultResponse
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(change, keyspace, table, trace_id) ⇒ SchemaChangeResultResponse
constructor
A new instance of SchemaChangeResultResponse.
- #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(change, keyspace, table, trace_id) ⇒ SchemaChangeResultResponse
Returns a new instance of SchemaChangeResultResponse.
8 9 10 11 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 8 def initialize(change, keyspace, table, trace_id) super(trace_id) @change, @keyspace, @table = change, keyspace, table end |
Instance Attribute Details
#change ⇒ Object (readonly)
Returns the value of attribute change.
6 7 8 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 6 def change @change end |
#keyspace ⇒ Object (readonly)
Returns the value of attribute keyspace.
6 7 8 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 6 def keyspace @keyspace end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
6 7 8 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 6 def table @table end |
Class Method Details
.decode!(buffer, trace_id = nil) ⇒ Object
13 14 15 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 13 def self.decode!(buffer, trace_id=nil) new(read_string!(buffer), read_string!(buffer), read_string!(buffer), trace_id) end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
17 18 19 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 17 def eql?(other) self.change == other.change && self.keyspace == other.keyspace && self.table == other.table end |
#hash ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 22 def hash @h ||= begin h = 0 h = ((h & 0xffffffff) * 31) ^ @change.hash h = ((h & 0xffffffff) * 31) ^ @keyspace.hash h = ((h & 0xffffffff) * 31) ^ @table.hash h end end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/cql/protocol/responses/schema_change_result_response.rb', line 32 def to_s %(RESULT SCHEMA_CHANGE #@change "#@keyspace" "#@table") end |