You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-03 04:01:40 +03:00
* (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
25 lines
1.2 KiB
TypeScript
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;
|