Class: Hyperion::Riak::BucketStrategy
- Inherits:
-
Object
- Object
- Hyperion::Riak::BucketStrategy
- Defined in:
- lib/hyperion/riak/optimized_filter_order.rb
Instance Method Summary collapse
- #can_optimize? ⇒ Boolean
- #filters ⇒ Object
-
#initialize(filters, bucket_name) ⇒ BucketStrategy
constructor
A new instance of BucketStrategy.
- #optimal_index_field ⇒ Object
- #optimal_index_value ⇒ Object
Constructor Details
#initialize(filters, bucket_name) ⇒ BucketStrategy
Returns a new instance of BucketStrategy.
87 88 89 90 |
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 87 def initialize(filters, bucket_name) @filters = filters @bucket_name = bucket_name end |
Instance Method Details
#can_optimize? ⇒ Boolean
92 93 94 |
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 92 def can_optimize? true end |
#filters ⇒ Object
104 105 106 |
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 104 def filters @filters end |
#optimal_index_field ⇒ Object
96 97 98 |
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 96 def optimal_index_field '$bucket' end |
#optimal_index_value ⇒ Object
100 101 102 |
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 100 def optimal_index_value @bucket_name end |