sessionm-cassandra_object 4.0.30 → 4.0.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d22346510347a1e1fd8c9015466fd09940323255
4
- data.tar.gz: e883011c9009049257f48e621ef8fb5187f3828f
3
+ metadata.gz: 050c07c081bb084f948f111400f1b416d091b1b8
4
+ data.tar.gz: 9531fe877770aa1843f7a7d1840aa06ce3243ae8
5
5
  SHA512:
6
- metadata.gz: bc74dc8f32f89ffb3626ccdb8b049d24ec276d509d48b4b76b5f4ad1625609495b2755cd101ef813c4687af46d6260b3a789d74012ddaa4e903ea9ed909bfaff
7
- data.tar.gz: 7e245e595735d8d23a28970e1d75667cd2c3e62eab0aa91d00bca3f7c39ddba9f04da1e03aa377828abf4786fc5d96adc3172f8ffcb4034089adaef736c76ff0
6
+ metadata.gz: 6f01fcc0d6fa7b43d4510955a4c80f816986f60587961fbc085bfa03543417c8236467688afb4726464dea8c950c2433e352c888fba3c7dcc00d88940a2ed6eb
7
+ data.tar.gz: eec1e1c61f637ecf51bdd035dcac2ddc97eb8c315aa8af15042435566608cd90fbff8b9370cbc49be4f8ff926a5d92b3975158bb67044fdaaf91c8c253370740
@@ -211,6 +211,14 @@ module CassandraObject
211
211
  async ? self.execute_async(query, execute_options(opts)) : self.execute(query, execute_options(opts))
212
212
  end
213
213
 
214
+ def count_range(column_family, options = {})
215
+ get_range_keys(column_family, options).length
216
+ end
217
+
218
+ def get_range_keys(column_family, options = {})
219
+ get_range(column_family,options.merge!(:count => 1)).keys
220
+ end
221
+
214
222
  def get_range(column_family, opts={}, &blk)
215
223
  key_count = opts[:key_count] || 100
216
224
  query = "SELECT #{KEY_FIELD} FROM \"#{column_family}\" LIMIT #{key_count}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sessionm-cassandra_object'
5
- s.version = '4.0.30'
5
+ s.version = '4.0.31'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sessionm-cassandra_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.30
4
+ version: 4.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-06 00:00:00.000000000 Z
12
+ date: 2017-12-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Cassandra ActiveModel
15
15
  email: doug@sessionm.com