tDigestCreate method

Future tDigestCreate(
  1. String key, {
  2. int? compression,
  3. bool forceRun = false,
})

TDIGEST.CREATE key COMPRESSION compression Allocates memory and initializes a new t-digest.

Implementation

Future<dynamic> tDigestCreate(
  String key, {
  int? compression,
  bool forceRun = false,
}) async {
  await checkValkeySupport('TDIGEST.CREATE', forceRun: forceRun);
  final cmd = <dynamic>['TDIGEST.CREATE', key];
  if (compression != null) {
    cmd.addAll(['COMPRESSION', compression]);
  }
  return execute(cmd);
}