cassandra-driver 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/cassandra/cluster/client.rb +2 -0
- data/lib/cassandra/cluster/schema.rb +3 -3
- data/lib/cassandra/future.rb +6 -0
- data/lib/cassandra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjJiMTUxNjdlNWI3Y2M3Mzk3NzFiMjQ4NDEzMGNlMTJiYmQyM2Q2MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTIzZjE2NzFjNTI5YTEyZDUxMWUxMjdiYzEwOTg2Nzc0YzhjZDFjZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmNiNDQxMmI3OTdhN2FhOTA3Njc2NjlhMmE1ZTkzNTRmOWZkNjVjNTRiZTc5
|
10
|
+
MjViMDFkMWU1NzRhODIxY2UxMWUxNGVjMGE1N2Y0ZTZlMzQ1NDA5YjFlNDcw
|
11
|
+
MDk3ZTdjNjM2YjUyMjIwOTZmY2VkN2M4OTY3NGVmNWUzYTgwZGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmMwN2E5NmIyNWJlNTE3ZjEyMzM0MDI4MmU0NzFlMTM5MGQ5YjkzYWE3ZTk4
|
14
|
+
OGI2NDZjNTI0MzA1NjdlMjUxYTBiMTFkY2VmZTZmNWEwZjk1MWFiMjlmNDc3
|
15
|
+
ZmViMDVkNjFkMGU3ZGNmYTgwZjg2YzkxODI5YTE0NzE4NzMxMGI=
|
data/README.md
CHANGED
@@ -83,7 +83,7 @@ gem install cassandra-driver
|
|
83
83
|
Install via Gemfile
|
84
84
|
|
85
85
|
```ruby
|
86
|
-
gem 'cassandra-driver'
|
86
|
+
gem 'cassandra-driver'
|
87
87
|
```
|
88
88
|
|
89
89
|
__Note__: if you want to use compression you should also install [snappy](http://rubygems.org/gems/snappy) or [lz4-ruby](http://rubygems.org/gems/lz4-ruby). [Read more about compression.](http://datastax.github.io/ruby-driver/features/#compression)
|
@@ -93,7 +93,7 @@ __Note__: if you want to use compression you should also install [snappy](http:/
|
|
93
93
|
|
94
94
|
Some of the new features added to the driver have unfortunately led to changes in the original cql-rb API. In the examples directory, you can find [an example of how to wrap the ruby driver to achieve almost complete interface parity with cql-rb](https://github.com/datastax/ruby-driver/blob/master/examples/cql-rb-wrapper.rb) to assist you with gradual upgrade.
|
95
95
|
|
96
|
-
## What's new in v1.1.
|
96
|
+
## What's new in v1.1.1
|
97
97
|
|
98
98
|
Current release introduces the following new features:
|
99
99
|
|
@@ -213,6 +213,8 @@ module Cassandra
|
|
213
213
|
end
|
214
214
|
|
215
215
|
def batch(statement, options)
|
216
|
+
return @futures.error(Errors::ClientError.new("Batch statements are not supported by the current version of Apache Cassandra")) if @connection_options.protocol_version < 2
|
217
|
+
|
216
218
|
timeout = options.timeout
|
217
219
|
keyspace = @keyspace
|
218
220
|
plan = @load_balancing_policy.plan(keyspace, statement, options)
|
@@ -225,7 +225,7 @@ module Cassandra
|
|
225
225
|
max_index = nil
|
226
226
|
|
227
227
|
columns.each do |cl|
|
228
|
-
if cl['type'].upcase == 'CLUSTERING_KEY'
|
228
|
+
if cl['type'].to_s.upcase == 'CLUSTERING_KEY'
|
229
229
|
index = cl['component_index'] || 0
|
230
230
|
|
231
231
|
if max_index.nil? || index > max_index
|
@@ -284,7 +284,7 @@ module Cassandra
|
|
284
284
|
next if row['column_name'].empty?
|
285
285
|
|
286
286
|
column = create_column(row)
|
287
|
-
type = row['type']
|
287
|
+
type = row['type'].to_s
|
288
288
|
index = row['component_index'] || 0
|
289
289
|
|
290
290
|
case type.upcase
|
@@ -321,7 +321,7 @@ module Cassandra
|
|
321
321
|
|
322
322
|
if column['index_type'].nil?
|
323
323
|
index = nil
|
324
|
-
elsif column['index_type'].upcase == 'CUSTOM' || !column['index_options']
|
324
|
+
elsif column['index_type'].to_s.upcase == 'CUSTOM' || !column['index_options']
|
325
325
|
index = Column::Index.new(column['index_name'])
|
326
326
|
else
|
327
327
|
options = ::JSON.load(column['index_options'])
|
data/lib/cassandra/future.rb
CHANGED
@@ -201,6 +201,7 @@ module Cassandra
|
|
201
201
|
end
|
202
202
|
end
|
203
203
|
end
|
204
|
+
promise.future
|
204
205
|
end
|
205
206
|
end
|
206
207
|
|
@@ -233,6 +234,11 @@ module Cassandra
|
|
233
234
|
@@factory.all(*futures)
|
234
235
|
end
|
235
236
|
|
237
|
+
# Returns a new promise instance
|
238
|
+
def self.promise
|
239
|
+
@@factory.promise
|
240
|
+
end
|
241
|
+
|
236
242
|
# @private
|
237
243
|
def initialize(signal)
|
238
244
|
@signal = signal
|
data/lib/cassandra/version.rb
CHANGED