Method: Aerospike::CDT::MapOperation.get_by_value_rel_rank_range
- Defined in:
- lib/aerospike/cdt/map_operation.rb
.get_by_value_rel_rank_range(bin_name, value, rank, count = nil, ctx: nil, return_type: nil) ⇒ Object
Create map get by value relative to rank range operation.
Server selects “count” map items nearest to value and greater by relative rank. If “count” is not specified, server selects map items nearest to value and greater by relative rank, until the end of the map.
Server returns selected data specified by return_type.
Examples for map [4=2,9=10,5=15,0=17]:
-
(value, rank, count) = [selected items]
-
(11, 1, 1) = [0=17]
-
(11, -1, 1) = [9=10]
Without count:
-
(value, rank) = [selected items]
-
(11, 1) = [0=17]
-
(11, -1) = [9=10, 5=15, 0=17]
574 575 576 577 578 579 580 |
# File 'lib/aerospike/cdt/map_operation.rb', line 574 def self.get_by_value_rel_rank_range(bin_name, value, rank, count = nil, ctx: nil, return_type: nil) if count MapOperation.new(Operation::CDT_READ, GET_BY_VALUE_REL_RANK_RANGE, bin_name, value, rank, count, ctx: ctx, return_type: return_type) else MapOperation.new(Operation::CDT_READ, GET_BY_VALUE_REL_RANK_RANGE, bin_name, value, rank, ctx: ctx, return_type: return_type) end end |