incrementFieldBy method

Future<RedisReply> incrementFieldBy(
  1. String key,
  2. String field,
  3. num value
)

HINCRBY or HINCRBYFLOAT - Increments a field from a Hash (int or float)

Implementation

Future<RedisReply> incrementFieldBy(
    String key, String field, num value) async {
  if (value is int) return command('HINCRBY', [key, field, '$value']);
  return command('HINCRBYFLOAT', [key, field, '$value']);
}