1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Files
node-redis/packages/time-series/lib/commands/MGET_SELECTED_LABELS.ts
Bobby I. 20c16e0c2c (docs) add jsdoc comments to command parsers (#2984)
* (docs) bloom: add jsdocs for all commands

* (docs) json: add jsdocs

* (docs) search: add jsdocs for all commands

* (docs) jsdocs for std commands

* (docs) jsdoc comments to time series commands
2025-06-03 14:38:07 +03:00

25 lines
1.2 KiB
TypeScript

import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { Command, BlobStringReply, NullReply } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
import { TsMGetOptions, parseLatestArgument, parseFilterArgument } from './MGET';
import { parseSelectedLabelsArguments } from './helpers';
import { createTransformMGetLabelsReply } from './MGET_WITHLABELS';
export default {
IS_READ_ONLY: true,
/**
* Gets the last samples matching a specific filter with selected labels
* @param parser - The command parser
* @param filter - Filter to match time series keys
* @param selectedLabels - Labels to include in the output
* @param options - Optional parameters for the command
*/
parseCommand(parser: CommandParser, filter: RedisVariadicArgument, selectedLabels: RedisVariadicArgument, options?: TsMGetOptions) {
parser.push('TS.MGET');
parseLatestArgument(parser, options?.LATEST);
parseSelectedLabelsArguments(parser, selectedLabels);
parseFilterArgument(parser, filter);
},
transformReply: createTransformMGetLabelsReply<BlobStringReply | NullReply>(),
} as const satisfies Command;