Function decrement

  • Decrements the map entry identified by the given key by the value decr. Valid only for numeric values.

    Parameters

    • bin: string

      The name of the bin. If the bin exists, it must contain a Map value; if it does not yet exist, a new Map may be created depending on the map policy's write mode.

    • key: string

      The map key.

    • decr: number

      The value to decrement the map entry by.

    • Optionalpolicy: policy.MapPolicy

      The map policy.

    Returns MapOperation

    Operation that can be passed to the Client#operate command.

    If a map entry with the given key does not exist, the map policy's write mode determines whether a new entry will be created same as for the put command. This operation may create a new map if the map bin is currently empty.

    This operation returns the new value of the map entry.

    since v4.0.0 - use increment function with negative value instead.

MMNEPVFCICPMFPCPTTAAATR