sessionm-cassandra_object 2.2.24 → 2.2.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,8 +50,8 @@ module CassandraObject
50
50
  results.size <= 1 && !expects_array ? results.first : results
51
51
  end
52
52
 
53
- def find_all_by_expression(expression)
54
- multi_get_by_expression(expression).values
53
+ def find_all_by_expression(expression, options={})
54
+ multi_get_by_expression(expression, options).values
55
55
  end
56
56
 
57
57
  private
@@ -74,9 +74,11 @@ module CassandraObject
74
74
  instantiate_many(attribute_results)
75
75
  end
76
76
 
77
- def multi_get_by_expression(expression)
77
+ def multi_get_by_expression(expression, options={})
78
+ options = options.reverse_merge(:consistency => thrift_read_consistency)
79
+
78
80
  attribute_results = ActiveSupport::Notifications.instrument("multi_get_by_expression.cassandra_object", column_family: column_family, expression: expression) do
79
- intermediate_results = connection.get_indexed_slices(column_family, expression, consistency: thrift_read_consistency)
81
+ intermediate_results = connection.get_indexed_slices(column_family, expression, options)
80
82
  connection.send(:multi_columns_to_hash!, column_family, intermediate_results)
81
83
  end
82
84
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sessionm-cassandra_object'
5
- s.version = '2.2.24'
5
+ s.version = '2.2.26'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 2
8
- - 24
9
- version: 2.2.24
8
+ - 26
9
+ version: 2.2.26
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Koziarski
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-02 00:00:00 -04:00
19
+ date: 2011-09-04 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency