You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
fix DELETERULE
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { TimeSeriesAggregationType } from '.';
|
import { TimeSeriesAggregationType } from '.';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './DELETERULE';
|
import DELETERULE from './DELETERULE';
|
||||||
|
|
||||||
describe('DELETERULE', () => {
|
describe('DELETERULE', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('source', 'destination'),
|
DELETERULE.transformArguments('source', 'destination'),
|
||||||
['TS.DELETERULE', 'source', 'destination']
|
['TS.DELETERULE', 'source', 'destination']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,11 +1,14 @@
|
|||||||
export const FIRST_KEY_INDEX = 1;
|
import { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(sourceKey: string, destinationKey: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: 1,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(sourceKey: RedisArgument, destinationKey: RedisArgument) {
|
||||||
return [
|
return [
|
||||||
'TS.DELETERULE',
|
'TS.DELETERULE',
|
||||||
sourceKey,
|
sourceKey,
|
||||||
destinationKey
|
destinationKey
|
||||||
];
|
];
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => SimpleStringReply<'OK'>
|
||||||
export declare function transformReply(): 'OK';
|
} as const satisfies Command;
|
||||||
|
Reference in New Issue
Block a user