Method: Aerospike::CDT::MapOperation.increment
- Defined in:
- lib/aerospike/cdt/map_operation.rb
.increment(bin_name, key, incr, ctx: nil, policy: MapPolicy::DEFAULT) ⇒ Object
Create map increment operation. Server increments values by incr for all items identified by key and returns final result. Valid only for numbers.
The map policy dictates the type of map to create when it does not exist. The map policy also specifies the mode used when writing items to the map.
199 200 201 |
# File 'lib/aerospike/cdt/map_operation.rb', line 199 def self.increment(bin_name, key, incr, ctx: nil, policy: MapPolicy::DEFAULT) MapOperation.new(Operation::CDT_MODIFY, INCREMENT, bin_name, key, incr, policy.order[:attr], ctx: ctx) end |