zadd method

Future<int> zadd(
  1. String key,
  2. Map<Object, double> values
)

------------------------------ SortedSet ------------------------------ zadd

Implementation

/// zadd
Future<int> zadd(String key, Map<Object, double> values) async {
  Object result = await _runWithRetryNew(() async {
    return (await RespCommandsTier1(_client!).zadd(key, values));
  });

  if (result is RespType2<dynamic>) {
    return result.toInteger().payload;
  }

  return (result as RespType3<dynamic>).toInteger().payload;
}