You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
init time series
This commit is contained in:
31
packages/time-series/lib/commands/MGET.ts
Normal file
31
packages/time-series/lib/commands/MGET.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { pushVerdictArgument, pushVerdictArguments } from '@node-redis/client/lib/commands/generic-transformers';
|
||||
|
||||
export const IS_READ_ONLY = true;
|
||||
|
||||
interface WithLabels {
|
||||
WITHLABELS: true;
|
||||
}
|
||||
|
||||
interface SelectedLabels {
|
||||
SELECTED_LABELS: string | Array<string>;
|
||||
}
|
||||
|
||||
type MGetOptions = WithLabels & SelectedLabels;
|
||||
|
||||
export function transformArguments(filter: string, options?: MGetOptions): Array<string> {
|
||||
const args = ['TS.MGET'];
|
||||
|
||||
if (options?.WITHLABELS) {
|
||||
args.push('WITHLABELS');
|
||||
} else if (options?.SELECTED_LABELS) {
|
||||
pushVerdictArguments(args, options.SELECTED_LABELS);
|
||||
}
|
||||
|
||||
args.push('FILTER', filter);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
export function transformReply() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user