cassandra-driver 2.1.7-java → 3.0.0.beta.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -53
- data/lib/cassandra.rb +22 -3
- data/lib/cassandra/aggregate.rb +109 -0
- data/lib/cassandra/argument.rb +51 -0
- data/lib/cassandra/auth/providers/password.rb +7 -4
- data/lib/cassandra/cluster.rb +14 -3
- data/lib/cassandra/cluster/client.rb +56 -34
- data/lib/cassandra/cluster/connector.rb +6 -6
- data/lib/cassandra/cluster/control_connection.rb +204 -251
- data/lib/cassandra/cluster/metadata.rb +2 -0
- data/lib/cassandra/cluster/schema.rb +131 -209
- data/lib/cassandra/cluster/schema/cql_type_parser.rb +104 -0
- data/lib/cassandra/cluster/schema/fetchers.rb +1174 -0
- data/lib/cassandra/cluster/schema/{type_parser.rb → fqcn_type_parser.rb} +7 -3
- data/lib/cassandra/column.rb +2 -2
- data/lib/cassandra/driver.rb +27 -9
- data/lib/cassandra/errors.rb +179 -25
- data/lib/cassandra/execution/info.rb +8 -1
- data/lib/cassandra/execution/options.rb +34 -0
- data/lib/cassandra/execution/trace.rb +42 -10
- data/lib/cassandra/function.rb +150 -0
- data/lib/cassandra/future.rb +66 -35
- data/lib/cassandra/host.rb +7 -4
- data/lib/cassandra/keyspace.rb +112 -13
- data/lib/cassandra/load_balancing.rb +1 -1
- data/lib/cassandra/protocol.rb +9 -3
- data/lib/cassandra/protocol/coder.rb +434 -155
- data/lib/cassandra/protocol/cql_byte_buffer.rb +43 -0
- data/lib/cassandra/protocol/cql_protocol_handler.rb +4 -1
- data/lib/cassandra/protocol/request.rb +4 -0
- data/lib/cassandra/protocol/requests/auth_response_request.rb +5 -1
- data/lib/cassandra/protocol/requests/batch_request.rb +7 -2
- data/lib/cassandra/protocol/requests/credentials_request.rb +5 -1
- data/lib/cassandra/protocol/requests/execute_request.rb +16 -10
- data/lib/cassandra/protocol/requests/prepare_request.rb +12 -3
- data/lib/cassandra/protocol/requests/query_request.rb +20 -11
- data/lib/cassandra/protocol/responses/already_exists_error_response.rb +4 -4
- data/lib/cassandra/protocol/responses/error_response.rb +14 -14
- data/lib/cassandra/protocol/responses/function_failure_error_response.rb +41 -0
- data/lib/cassandra/protocol/responses/prepared_result_response.rb +12 -9
- data/lib/cassandra/protocol/responses/raw_rows_result_response.rb +5 -3
- data/lib/cassandra/protocol/responses/read_failure_error_response.rb +43 -0
- data/lib/cassandra/protocol/responses/read_timeout_error_response.rb +4 -4
- data/lib/cassandra/protocol/responses/ready_response.rb +5 -1
- data/lib/cassandra/protocol/responses/result_response.rb +3 -3
- data/lib/cassandra/protocol/responses/rows_result_response.rb +2 -2
- data/lib/cassandra/protocol/responses/schema_change_event_response.rb +25 -24
- data/lib/cassandra/protocol/responses/schema_change_result_response.rb +20 -23
- data/lib/cassandra/protocol/responses/set_keyspace_result_response.rb +2 -2
- data/lib/cassandra/protocol/responses/unavailable_error_response.rb +4 -4
- data/lib/cassandra/protocol/responses/unprepared_error_response.rb +4 -4
- data/lib/cassandra/protocol/responses/write_failure_error_response.rb +45 -0
- data/lib/cassandra/protocol/responses/write_timeout_error_response.rb +4 -4
- data/lib/cassandra/protocol/v1.rb +38 -13
- data/lib/cassandra/protocol/v3.rb +34 -29
- data/lib/cassandra/protocol/v4.rb +334 -0
- data/lib/cassandra/result.rb +10 -9
- data/lib/cassandra/retry.rb +17 -3
- data/lib/cassandra/retry/policies/default.rb +9 -3
- data/lib/cassandra/session.rb +15 -7
- data/lib/cassandra/statement.rb +5 -0
- data/lib/cassandra/statements/batch.rb +36 -12
- data/lib/cassandra/statements/bound.rb +2 -1
- data/lib/cassandra/statements/prepared.rb +106 -35
- data/lib/cassandra/statements/simple.rb +4 -2
- data/lib/cassandra/table.rb +70 -105
- data/lib/cassandra/time.rb +98 -0
- data/lib/cassandra/time_uuid.rb +1 -1
- data/lib/cassandra/tuple.rb +7 -0
- data/lib/cassandra/types.rb +472 -272
- data/lib/cassandra/udt.rb +10 -0
- data/lib/cassandra/util.rb +32 -1
- data/lib/cassandra/uuid.rb +6 -1
- data/lib/cassandra/uuid/generator.rb +7 -7
- data/lib/cassandra/version.rb +1 -1
- data/lib/cassandra_murmur3.jar +0 -0
- data/lib/datastax/cassandra.rb +5 -2
- metadata +27 -17
@@ -178,6 +178,16 @@ module Cassandra
|
|
178
178
|
map
|
179
179
|
end
|
180
180
|
|
181
|
+
def read_bytes_map
|
182
|
+
map = {}
|
183
|
+
map_size = read_unsigned_short
|
184
|
+
map_size.times do
|
185
|
+
key = read_string
|
186
|
+
map[key] = read_bytes
|
187
|
+
end
|
188
|
+
map
|
189
|
+
end
|
190
|
+
|
181
191
|
def read_string_multimap
|
182
192
|
map = {}
|
183
193
|
map_size = read_unsigned_short
|
@@ -188,6 +198,30 @@ module Cassandra
|
|
188
198
|
map
|
189
199
|
end
|
190
200
|
|
201
|
+
def read_smallint
|
202
|
+
n = read_short
|
203
|
+
return n if n <= 0x7fff
|
204
|
+
n - 0xffff - 1
|
205
|
+
rescue RangeError => e
|
206
|
+
raise Errors::DecodingError, "Not enough bytes available to decode a smallint: #{e.message}", e.backtrace
|
207
|
+
end
|
208
|
+
|
209
|
+
def read_tinyint
|
210
|
+
n = read_byte
|
211
|
+
return n if n <= 0x7f
|
212
|
+
n - 0xff - 1
|
213
|
+
rescue RangeError => e
|
214
|
+
raise Errors::DecodingError, "Not enough bytes available to decode a tinyint: #{e.message}", e.backtrace
|
215
|
+
end
|
216
|
+
|
217
|
+
def append_tinyint(n)
|
218
|
+
append([n].pack(Formats::CHAR_FORMAT))
|
219
|
+
end
|
220
|
+
|
221
|
+
def append_smallint(n)
|
222
|
+
append_short(n)
|
223
|
+
end
|
224
|
+
|
191
225
|
def append_int(n)
|
192
226
|
append([n].pack(Formats::INT_FORMAT))
|
193
227
|
end
|
@@ -256,6 +290,15 @@ module Cassandra
|
|
256
290
|
self
|
257
291
|
end
|
258
292
|
|
293
|
+
def append_bytes_map(map)
|
294
|
+
append_short(map.size)
|
295
|
+
map.each do |key, value|
|
296
|
+
append_string(key)
|
297
|
+
append_bytes(value)
|
298
|
+
end
|
299
|
+
self
|
300
|
+
end
|
301
|
+
|
259
302
|
def append_timestamp(timestamp)
|
260
303
|
append_long(timestamp.tv_sec * 1000000 + timestamp.tv_usec)
|
261
304
|
end
|
@@ -49,7 +49,10 @@ module Cassandra
|
|
49
49
|
|
50
50
|
@promises = Hash.new
|
51
51
|
|
52
|
-
if protocol_version >
|
52
|
+
if protocol_version > 3
|
53
|
+
@frame_encoder = V4::Encoder.new(@compressor, protocol_version)
|
54
|
+
@frame_decoder = V4::Decoder.new(self, @compressor)
|
55
|
+
elsif protocol_version > 2
|
53
56
|
@frame_encoder = V3::Encoder.new(@compressor, protocol_version)
|
54
57
|
@frame_decoder = V3::Decoder.new(self, @compressor)
|
55
58
|
else
|
@@ -23,16 +23,21 @@ module Cassandra
|
|
23
23
|
UNLOGGED_TYPE = 1
|
24
24
|
COUNTER_TYPE = 2
|
25
25
|
|
26
|
-
attr_reader :type, :timestamp
|
26
|
+
attr_reader :type, :timestamp, :payload
|
27
27
|
attr_accessor :consistency, :retries
|
28
28
|
|
29
|
-
def initialize(type, consistency, trace=false, serial_consistency = nil, timestamp = nil)
|
29
|
+
def initialize(type, consistency, trace=false, serial_consistency = nil, timestamp = nil, payload = nil)
|
30
30
|
super(0x0D, trace)
|
31
31
|
@type = type
|
32
32
|
@parts = []
|
33
33
|
@consistency = consistency
|
34
34
|
@serial_consistency = serial_consistency
|
35
35
|
@timestamp = timestamp
|
36
|
+
@payload = payload
|
37
|
+
end
|
38
|
+
|
39
|
+
def payload?
|
40
|
+
!!@payload
|
36
41
|
end
|
37
42
|
|
38
43
|
def clear
|
@@ -19,10 +19,10 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class ExecuteRequest < Request
|
22
|
-
attr_reader :metadata, :values, :request_metadata, :serial_consistency, :page_size, :paging_state, :timestamp
|
22
|
+
attr_reader :metadata, :values, :request_metadata, :serial_consistency, :page_size, :paging_state, :timestamp, :payload
|
23
23
|
attr_accessor :consistency, :retries, :id
|
24
24
|
|
25
|
-
def initialize(id, metadata, values, request_metadata, consistency, serial_consistency=nil, page_size=nil, paging_state=nil, trace=false, timestamp = nil)
|
25
|
+
def initialize(id, metadata, values, request_metadata, consistency, serial_consistency=nil, page_size=nil, paging_state=nil, trace=false, timestamp = nil, payload = nil)
|
26
26
|
raise ArgumentError, "Metadata for #{metadata.size} columns, but #{values.size} values given" if metadata.size != values.size
|
27
27
|
raise ArgumentError, %(No such consistency: #{consistency.inspect}) if consistency.nil? || !CONSISTENCIES.include?(consistency)
|
28
28
|
raise ArgumentError, %(No such consistency: #{serial_consistency.inspect}) unless serial_consistency.nil? || CONSISTENCIES.include?(serial_consistency)
|
@@ -37,6 +37,11 @@ module Cassandra
|
|
37
37
|
@page_size = page_size
|
38
38
|
@paging_state = paging_state
|
39
39
|
@timestamp = timestamp
|
40
|
+
@payload = payload
|
41
|
+
end
|
42
|
+
|
43
|
+
def payload?
|
44
|
+
!!@payload
|
40
45
|
end
|
41
46
|
|
42
47
|
def write(buffer, protocol_version, encoder)
|
@@ -81,14 +86,15 @@ module Cassandra
|
|
81
86
|
|
82
87
|
def hash
|
83
88
|
@h ||= begin
|
84
|
-
h =
|
85
|
-
h =
|
86
|
-
h =
|
87
|
-
h =
|
88
|
-
h =
|
89
|
-
h =
|
90
|
-
h =
|
91
|
-
h =
|
89
|
+
h = 17
|
90
|
+
h = 31 * h + @id.hash
|
91
|
+
h = 31 * h + @metadata.hash
|
92
|
+
h = 31 * h + @values.hash
|
93
|
+
h = 31 * h + @consistency.hash
|
94
|
+
h = 31 * h + @serial_consistency.hash
|
95
|
+
h = 31 * h + @page_size.hash
|
96
|
+
h = 31 * h + @paging_state.hash
|
97
|
+
h = 31 * h + @timestamp.hash
|
92
98
|
h
|
93
99
|
end
|
94
100
|
end
|
@@ -19,14 +19,19 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class PrepareRequest < Request
|
22
|
-
attr_reader :cql
|
22
|
+
attr_reader :cql, :payload
|
23
23
|
attr_accessor :consistency, :retries
|
24
24
|
|
25
|
-
def initialize(cql, trace=false)
|
25
|
+
def initialize(cql, trace=false, payload = nil)
|
26
26
|
raise ArgumentError, 'No CQL given!' unless cql
|
27
27
|
super(9, trace)
|
28
28
|
@cql = cql
|
29
29
|
@consistency = :one
|
30
|
+
@payload = payload
|
31
|
+
end
|
32
|
+
|
33
|
+
def payload?
|
34
|
+
!!@payload
|
30
35
|
end
|
31
36
|
|
32
37
|
def write(buffer, protocol_version, encoder)
|
@@ -43,7 +48,11 @@ module Cassandra
|
|
43
48
|
alias_method :==, :eql?
|
44
49
|
|
45
50
|
def hash
|
46
|
-
@h ||=
|
51
|
+
@h ||= begin
|
52
|
+
h = 17
|
53
|
+
h = 31 * h + @cql.hash
|
54
|
+
h
|
55
|
+
end
|
47
56
|
end
|
48
57
|
end
|
49
58
|
end
|
@@ -19,10 +19,10 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class QueryRequest < Request
|
22
|
-
attr_reader :cql, :values, :type_hints, :serial_consistency, :page_size, :paging_state, :timestamp
|
22
|
+
attr_reader :cql, :values, :type_hints, :serial_consistency, :page_size, :paging_state, :timestamp, :payload
|
23
23
|
attr_accessor :consistency, :retries
|
24
24
|
|
25
|
-
def initialize(cql, values, type_hints, consistency, serial_consistency = nil, page_size = nil, paging_state = nil, trace = false, names = EMPTY_LIST, timestamp = nil)
|
25
|
+
def initialize(cql, values, type_hints, consistency, serial_consistency = nil, page_size = nil, paging_state = nil, trace = false, names = EMPTY_LIST, timestamp = nil, payload = nil)
|
26
26
|
super(7, trace)
|
27
27
|
@cql = cql
|
28
28
|
@values = values
|
@@ -33,6 +33,11 @@ module Cassandra
|
|
33
33
|
@paging_state = paging_state
|
34
34
|
@names = names
|
35
35
|
@timestamp = timestamp
|
36
|
+
@payload = payload
|
37
|
+
end
|
38
|
+
|
39
|
+
def payload?
|
40
|
+
!!@payload
|
36
41
|
end
|
37
42
|
|
38
43
|
def write(buffer, protocol_version, encoder)
|
@@ -83,15 +88,19 @@ module Cassandra
|
|
83
88
|
alias_method :==, :eql?
|
84
89
|
|
85
90
|
def hash
|
86
|
-
h
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
91
|
+
@h ||= begin
|
92
|
+
h = 17
|
93
|
+
h = 31 * h + @cql.hash
|
94
|
+
h = 31 * h + @values.hash
|
95
|
+
h = 31 * h + @type_hints.hash
|
96
|
+
h = 31 * h + @consistency.hash
|
97
|
+
h = 31 * h + @serial_consistency.hash
|
98
|
+
h = 31 * h + @page_size.hash
|
99
|
+
h = 31 * h + @paging_state.hash
|
100
|
+
h = 31 * h + @names.hash
|
101
|
+
h = 31 * h + @timestamp.hash
|
102
|
+
h
|
103
|
+
end
|
95
104
|
end
|
96
105
|
end
|
97
106
|
end
|
@@ -21,15 +21,15 @@ module Cassandra
|
|
21
21
|
class AlreadyExistsErrorResponse < ErrorResponse
|
22
22
|
attr_reader :keyspace, :table
|
23
23
|
|
24
|
-
def initialize(code, message, keyspace, table)
|
25
|
-
super(code, message)
|
24
|
+
def initialize(custom_payload, warnings, code, message, keyspace, table)
|
25
|
+
super(custom_payload, warnings, code, message)
|
26
26
|
|
27
27
|
@keyspace = keyspace
|
28
28
|
@table = table
|
29
29
|
end
|
30
30
|
|
31
|
-
def to_error(statement
|
32
|
-
Errors::AlreadyExistsError.new(@message, statement, @keyspace, @table)
|
31
|
+
def to_error(keyspace, statement, options, hosts, consistency, retries)
|
32
|
+
Errors::AlreadyExistsError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries, @keyspace, @table)
|
33
33
|
end
|
34
34
|
|
35
35
|
def to_s
|
@@ -19,10 +19,10 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class ErrorResponse < Response
|
22
|
-
attr_reader :code, :message
|
22
|
+
attr_reader :code, :message, :custom_payload, :warnings
|
23
23
|
|
24
24
|
def initialize(*args)
|
25
|
-
@code, @message = args
|
25
|
+
@custom_payload, @warnings, @code, @message = args
|
26
26
|
end
|
27
27
|
|
28
28
|
def to_s
|
@@ -30,20 +30,20 @@ module Cassandra
|
|
30
30
|
%(ERROR 0x#{hex_code} "#@message")
|
31
31
|
end
|
32
32
|
|
33
|
-
def to_error(statement
|
33
|
+
def to_error(keyspace, statement, options, hosts, consistency, retries)
|
34
34
|
case @code
|
35
|
-
when 0x0000 then Errors::ServerError.new(@message)
|
36
|
-
when 0x000A then Errors::ProtocolError.new(@message)
|
37
|
-
when 0x0100 then Errors::AuthenticationError.new(@message)
|
38
|
-
when 0x1001 then Errors::OverloadedError.new(@message, statement)
|
39
|
-
when 0x1002 then Errors::IsBootstrappingError.new(@message, statement)
|
40
|
-
when 0x1003 then Errors::TruncateError.new(@message, statement)
|
41
|
-
when 0x2000 then Errors::SyntaxError.new(@message, statement)
|
42
|
-
when 0x2100 then Errors::UnauthorizedError.new(@message, statement)
|
43
|
-
when 0x2200 then Errors::InvalidError.new(@message, statement)
|
44
|
-
when 0x2300 then Errors::ConfigurationError.new(@message, statement)
|
35
|
+
when 0x0000 then Errors::ServerError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
36
|
+
when 0x000A then Errors::ProtocolError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
37
|
+
when 0x0100 then Errors::AuthenticationError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
38
|
+
when 0x1001 then Errors::OverloadedError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
39
|
+
when 0x1002 then Errors::IsBootstrappingError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
40
|
+
when 0x1003 then Errors::TruncateError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
41
|
+
when 0x2000 then Errors::SyntaxError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
42
|
+
when 0x2100 then Errors::UnauthorizedError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
43
|
+
when 0x2200 then Errors::InvalidError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
44
|
+
when 0x2300 then Errors::ConfigurationError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
45
45
|
else
|
46
|
-
Errors::ServerError.new(@message)
|
46
|
+
Errors::ServerError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
#--
|
4
|
+
# Copyright 2013-2015 DataStax, Inc.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#++
|
18
|
+
|
19
|
+
module Cassandra
|
20
|
+
module Protocol
|
21
|
+
class FunctionFailureErrorResponse < ErrorResponse
|
22
|
+
attr_reader :keyspace, :name, :signature
|
23
|
+
|
24
|
+
def initialize(custom_payload, warnings, code, message, keyspace, name, signature)
|
25
|
+
super(custom_payload, warnings, code, message)
|
26
|
+
|
27
|
+
@keyspace = keyspace
|
28
|
+
@name = name
|
29
|
+
@signature = signature
|
30
|
+
end
|
31
|
+
|
32
|
+
def to_error(keyspace, statement, options, hosts, consistency, retries)
|
33
|
+
Errors::FunctionCallError.new(@message, @custom_payload, @warnings, keyspace, statement, options, hosts, consistency, retries, @keyspace, @name, @signature)
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_s
|
37
|
+
"#{super} #{@keyspace} #{@name} #{@signature}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -19,11 +19,14 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class PreparedResultResponse < ResultResponse
|
22
|
-
attr_reader :id, :metadata, :result_metadata
|
23
|
-
|
24
|
-
def initialize(id, metadata, result_metadata, trace_id)
|
25
|
-
super(trace_id)
|
26
|
-
@id
|
22
|
+
attr_reader :id, :metadata, :result_metadata, :pk_idx
|
23
|
+
|
24
|
+
def initialize(custom_payload, warnings, id, metadata, result_metadata, pk_idx, trace_id)
|
25
|
+
super(custom_payload, warnings, trace_id)
|
26
|
+
@id = id
|
27
|
+
@metadata = metadata
|
28
|
+
@result_metadata = result_metadata
|
29
|
+
@pk_idx = pk_idx
|
27
30
|
end
|
28
31
|
|
29
32
|
def eql?(other)
|
@@ -33,10 +36,10 @@ module Cassandra
|
|
33
36
|
|
34
37
|
def hash
|
35
38
|
@h ||= begin
|
36
|
-
h =
|
37
|
-
h =
|
38
|
-
h =
|
39
|
-
h =
|
39
|
+
h = 17
|
40
|
+
h = 31 * h + @id.hash
|
41
|
+
h = 31 * h + @metadata.hash
|
42
|
+
h = 31 * h + @trace_id.hash
|
40
43
|
h
|
41
44
|
end
|
42
45
|
end
|
@@ -19,8 +19,8 @@
|
|
19
19
|
module Cassandra
|
20
20
|
module Protocol
|
21
21
|
class RawRowsResultResponse < RowsResultResponse
|
22
|
-
def initialize(protocol_version, raw_rows, paging_state, trace_id)
|
23
|
-
super(nil, nil, paging_state, trace_id)
|
22
|
+
def initialize(custom_payload, warnings, protocol_version, raw_rows, paging_state, trace_id)
|
23
|
+
super(custom_payload, warnings, nil, nil, paging_state, trace_id)
|
24
24
|
@protocol_version = protocol_version
|
25
25
|
@raw_rows = raw_rows
|
26
26
|
end
|
@@ -28,7 +28,9 @@ module Cassandra
|
|
28
28
|
def materialize(metadata)
|
29
29
|
@metadata = metadata
|
30
30
|
|
31
|
-
if @protocol_version ==
|
31
|
+
if @protocol_version == 4
|
32
|
+
@rows = Coder.read_values_v4(@raw_rows, @metadata)
|
33
|
+
elsif @protocol_version == 3
|
32
34
|
@rows = Coder.read_values_v3(@raw_rows, @metadata)
|
33
35
|
else
|
34
36
|
@rows = Coder.read_values_v1(@raw_rows, @metadata)
|