Function increment

  • Increments the map entry identified by the given key by the value incr. 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.

    • Optionalincr: number

      The value to increment the map entry by. Use negative value to decrement map entry.

    • 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.

MMNEPVFCICPMFPCPTTAAATR