Method: Aerospike::CDT::MapOperation.decrement

Defined in:
lib/aerospike/cdt/map_operation.rb

.decrement(bin_name, key, decr, ctx: nil, policy: MapPolicy::DEFAULT) ⇒ Object

Create map decrement operation. Server decrements values by decr 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.



210
211
212
# File 'lib/aerospike/cdt/map_operation.rb', line 210

def self.decrement(bin_name, key, decr, ctx: nil, policy: MapPolicy::DEFAULT)
  MapOperation.new(Operation::CDT_MODIFY, DECREMENT, bin_name, key, decr, policy.order[:attr], ctx: ctx)
end