/// <summary> /// Increment the specified field of an hash stored at key, and representing a floating point number, by the specified increment. If the field does not exist, it is set to 0 before performing the operation. /// </summary> /// <param name="hashField">The field in the hash to increment.</param> /// <param name="value">The amount to increment by.</param> /// <returns>The value at field after the increment operation.</returns> /// <remarks>The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation.</remarks> /// <remarks>https://redis.io/commands/hincrbyfloat</remarks> public Task <double> IncrementAsync(string hashField, double value) { return(RedisDb.HashIncrementAsync(KeyName, hashField, value)); }
/// <summary> /// Increments the number stored at field in the hash stored at key by increment. If key does not exist, a new key holding a hash is created. If field does not exist or holds a string that cannot be interpreted as integer, the value is set to 0 before the operation is performed. /// </summary> /// <param name="hashField">The field in the hash to increment.</param> /// <param name="value">The amount to increment by.</param> /// <returns>The value at field after the increment operation.</returns> /// <remarks>The range of values supported by HINCRBY is limited to 64 bit signed integers.</remarks> /// <remarks>https://redis.io/commands/hincrby</remarks> public Task <long> IncrementAsync(string hashField, long value = 1) { return(RedisDb.HashIncrementAsync(KeyName, hashField, value)); }