You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
more commands
This commit is contained in:
@@ -1,19 +1,19 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './DEBUG_MEMORY';
|
import DEBUG_MEMORY from './DEBUG_MEMORY';
|
||||||
|
|
||||||
describe('DEBUG MEMORY', () => {
|
describe('DEBUG MEMORY', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('without path', () => {
|
it('without path', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
DEBUG_MEMORY.transformArguments('key'),
|
||||||
['JSON.DEBUG', 'MEMORY', 'key']
|
['JSON.DEBUG', 'MEMORY', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with path', () => {
|
it('with path', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', '$'),
|
DEBUG_MEMORY.transformArguments('key', '$'),
|
||||||
['JSON.DEBUG', 'MEMORY', 'key', '$']
|
['JSON.DEBUG', 'MEMORY', 'key', '$']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
export const FIRST_KEY_INDEX = 2;
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(key: string, path?: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: 2,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(key: RedisArgument, path?: RedisArgument) {
|
||||||
const args = ['JSON.DEBUG', 'MEMORY', key];
|
const args = ['JSON.DEBUG', 'MEMORY', key];
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -8,6 +11,6 @@ export function transformArguments(key: string, path?: string): Array<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './DEL';
|
import DEL from './DEL';
|
||||||
|
|
||||||
describe('DEL', () => {
|
describe('DEL', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('key', () => {
|
it('key', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
DEL.transformArguments('key'),
|
||||||
['JSON.DEL', 'key']
|
['JSON.DEL', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('key, path', () => {
|
it('key, path', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', '$.path'),
|
DEL.transformArguments('key', '$.path'),
|
||||||
['JSON.DEL', 'key', '$.path']
|
['JSON.DEL', 'key', '$.path']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -26,3 +26,4 @@ describe('DEL', () => {
|
|||||||
);
|
);
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
}, GLOBAL.SERVERS.OPEN);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
export const FIRST_KEY_INDEX = 1;
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(key: string, path?: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: 1,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(key: RedisArgument, path?: RedisArgument) {
|
||||||
const args = ['JSON.DEL', key];
|
const args = ['JSON.DEL', key];
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -8,6 +11,6 @@ export function transformArguments(key: string, path?: string): Array<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './FORGET';
|
import FORGET from './FORGET';
|
||||||
|
|
||||||
describe('FORGET', () => {
|
describe('FORGET', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('key', () => {
|
it('key', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
FORGET.transformArguments('key'),
|
||||||
['JSON.FORGET', 'key']
|
['JSON.FORGET', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('key, path', () => {
|
it('key, path', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', '$.path'),
|
FORGET.transformArguments('key', '$.path'),
|
||||||
['JSON.FORGET', 'key', '$.path']
|
['JSON.FORGET', 'key', '$.path']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
export const FIRST_KEY_INDEX = 1;
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(key: string, path?: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: 1,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(key: RedisArgument, path?: RedisArgument) {
|
||||||
const args = ['JSON.FORGET', key];
|
const args = ['JSON.FORGET', key];
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -8,6 +11,6 @@ export function transformArguments(key: string, path?: string): Array<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './DICTADD';
|
import DICTADD from './DICTADD';
|
||||||
|
|
||||||
describe('DICTADD', () => {
|
describe('DICTADD', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('string', () => {
|
it('string', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('dictionary', 'term'),
|
DICTADD.transformArguments('dictionary', 'term'),
|
||||||
['FT.DICTADD', 'dictionary', 'term']
|
['FT.DICTADD', 'dictionary', 'term']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Array', () => {
|
it('Array', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('dictionary', ['1', '2']),
|
DICTADD.transformArguments('dictionary', ['1', '2']),
|
||||||
['FT.DICTADD', 'dictionary', '1', '2']
|
['FT.DICTADD', 'dictionary', '1', '2']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
import { pushVariadicArguments, RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(dictionary: string, term: string | Array<string>): RedisCommandArguments {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(dictionary: RedisArgument, term: RedisVariadicArgument) {
|
||||||
return pushVariadicArguments(['FT.DICTADD', dictionary], term);
|
return pushVariadicArguments(['FT.DICTADD', dictionary], term);
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './DICTDEL';
|
import DICTDEL from './DICTDEL';
|
||||||
|
|
||||||
describe('DICTDEL', () => {
|
describe('DICTDEL', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('string', () => {
|
it('string', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('dictionary', 'term'),
|
DICTDEL.transformArguments('dictionary', 'term'),
|
||||||
['FT.DICTDEL', 'dictionary', 'term']
|
['FT.DICTDEL', 'dictionary', 'term']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Array', () => {
|
it('Array', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('dictionary', ['1', '2']),
|
DICTDEL.transformArguments('dictionary', ['1', '2']),
|
||||||
['FT.DICTDEL', 'dictionary', '1', '2']
|
['FT.DICTDEL', 'dictionary', '1', '2']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,8 +1,11 @@
|
|||||||
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
|
import { pushVariadicArguments, RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
||||||
|
|
||||||
export function transformArguments(dictionary: string, term: string | Array<string>): RedisCommandArguments {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(dictionary: RedisArgument, term: RedisVariadicArgument) {
|
||||||
return pushVariadicArguments(['FT.DICTDEL', dictionary], term);
|
return pushVariadicArguments(['FT.DICTDEL', dictionary], term);
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformArguments } from './EXPLAIN';
|
import EXPLAIN from './EXPLAIN';
|
||||||
|
|
||||||
describe('EXPLAIN', () => {
|
describe('EXPLAIN', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('simple', () => {
|
it('simple', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('index', '*'),
|
EXPLAIN.transformArguments('index', '*'),
|
||||||
['FT.EXPLAIN', 'index', '*']
|
['FT.EXPLAIN', 'index', '*']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with PARAMS', () => {
|
it('with PARAMS', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('index', '*', {
|
EXPLAIN.transformArguments('index', '*', {
|
||||||
PARAMS: {
|
PARAMS: {
|
||||||
param: 'value'
|
param: 'value'
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,7 @@ describe('EXPLAIN', () => {
|
|||||||
|
|
||||||
it('with DIALECT', () => {
|
it('with DIALECT', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('index', '*', {
|
EXPLAIN.transformArguments('index', '*', {
|
||||||
DIALECT: 1
|
DIALECT: 1
|
||||||
}),
|
}),
|
||||||
['FT.EXPLAIN', 'index', '*', 'DIALECT', '1']
|
['FT.EXPLAIN', 'index', '*', 'DIALECT', '1']
|
||||||
|
@@ -1,17 +1,19 @@
|
|||||||
|
import { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
import { Params, pushParamsArgs } from ".";
|
import { Params, pushParamsArgs } from ".";
|
||||||
|
|
||||||
export const IS_READ_ONLY = true;
|
export interface FtExplainOptions {
|
||||||
|
|
||||||
interface ExplainOptions {
|
|
||||||
PARAMS?: Params;
|
PARAMS?: Params;
|
||||||
DIALECT?: number;
|
DIALECT?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function transformArguments(
|
export default {
|
||||||
index: string,
|
FIRST_KEY_INDEX: undefined,
|
||||||
query: string,
|
IS_READ_ONLY: true,
|
||||||
options?: ExplainOptions
|
transformArguments(
|
||||||
): Array<string> {
|
index: RedisArgument,
|
||||||
|
query: RedisArgument,
|
||||||
|
options?: FtExplainOptions
|
||||||
|
) {
|
||||||
const args = ['FT.EXPLAIN', index, query];
|
const args = ['FT.EXPLAIN', index, query];
|
||||||
|
|
||||||
pushParamsArgs(args, options?.PARAMS);
|
pushParamsArgs(args, options?.PARAMS);
|
||||||
@@ -21,6 +23,6 @@ export function transformArguments(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => SimpleStringReply
|
||||||
export declare function transformReply(): string;
|
} as const satisfies Command;
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import { transformArguments } from './EXPLAINCLI';
|
import EXPLAINCLI from './EXPLAINCLI';
|
||||||
|
|
||||||
describe('EXPLAINCLI', () => {
|
describe('EXPLAINCLI', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('index', '*'),
|
EXPLAINCLI.transformArguments('index', '*'),
|
||||||
['FT.EXPLAINCLI', 'index', '*']
|
['FT.EXPLAINCLI', 'index', '*']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
export const IS_READ_ONLY = true;
|
import { RedisArgument, ArrayReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(index: string, query: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: true,
|
||||||
|
transformArguments(index: RedisArgument, query: RedisArgument) {
|
||||||
return ['FT.EXPLAINCLI', index, query];
|
return ['FT.EXPLAINCLI', index, query];
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => ArrayReply<BlobStringReply>
|
||||||
export declare function transformReply(): Array<string>;
|
} as const satisfies Command;
|
||||||
|
@@ -1,26 +1,26 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './SUGADD';
|
import SUGADD from './SUGADD';
|
||||||
|
|
||||||
describe('SUGADD', () => {
|
describe('SUGADD', () => {
|
||||||
describe('transformArguments', () => {
|
describe('transformArguments', () => {
|
||||||
it('without options', () => {
|
it('without options', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', 'string', 1),
|
SUGADD.transformArguments('key', 'string', 1),
|
||||||
['FT.SUGADD', 'key', 'string', '1']
|
['FT.SUGADD', 'key', 'string', '1']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with INCR', () => {
|
it('with INCR', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', 'string', 1, { INCR: true }),
|
SUGADD.transformArguments('key', 'string', 1, { INCR: true }),
|
||||||
['FT.SUGADD', 'key', 'string', '1', 'INCR']
|
['FT.SUGADD', 'key', 'string', '1', 'INCR']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with PAYLOAD', () => {
|
it('with PAYLOAD', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', 'string', 1, { PAYLOAD: 'payload' }),
|
SUGADD.transformArguments('key', 'string', 1, { PAYLOAD: 'payload' }),
|
||||||
['FT.SUGADD', 'key', 'string', '1', 'PAYLOAD', 'payload']
|
['FT.SUGADD', 'key', 'string', '1', 'PAYLOAD', 'payload']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,9 +1,14 @@
|
|||||||
interface SugAddOptions {
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
INCR?: true;
|
|
||||||
PAYLOAD?: string;
|
export interface FtSugAddOptions {
|
||||||
|
INCR?: boolean;
|
||||||
|
PAYLOAD?: RedisArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function transformArguments(key: string, string: string, score: number, options?: SugAddOptions): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(key: RedisArgument, string: RedisArgument, score: number, options?: FtSugAddOptions) {
|
||||||
const args = ['FT.SUGADD', key, string, score.toString()];
|
const args = ['FT.SUGADD', key, string, score.toString()];
|
||||||
|
|
||||||
if (options?.INCR) {
|
if (options?.INCR) {
|
||||||
@@ -15,6 +20,6 @@ export function transformArguments(key: string, string: string, score: number, o
|
|||||||
}
|
}
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './SUGDEL';
|
import SUGDEL from './SUGDEL';
|
||||||
|
|
||||||
describe('SUGDEL', () => {
|
describe('SUGDEL', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key', 'string'),
|
SUGDEL.transformArguments('key', 'string'),
|
||||||
['FT.SUGDEL', 'key', 'string']
|
['FT.SUGDEL', 'key', 'string']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,5 +1,10 @@
|
|||||||
export function transformArguments(key: string, string: string): Array<string> {
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
return ['FT.SUGDEL', key, string];
|
|
||||||
}
|
|
||||||
|
|
||||||
export { transformBooleanReply as transformReply } from '@redis/client/dist/lib/commands/generic-transformers';
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: false,
|
||||||
|
transformArguments(key: RedisArgument, string: RedisArgument) {
|
||||||
|
return ['FT.SUGDEL', key, string];
|
||||||
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply<0 | 1>
|
||||||
|
} as const satisfies Command;
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import testUtils, { GLOBAL } from '../test-utils';
|
import testUtils, { GLOBAL } from '../test-utils';
|
||||||
import { transformArguments } from './SUGLEN';
|
import SUGLEN from './SUGLEN';
|
||||||
|
|
||||||
describe('SUGLEN', () => {
|
describe('SUGLEN', () => {
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('key'),
|
SUGLEN.transformArguments('key'),
|
||||||
['FT.SUGLEN', 'key']
|
['FT.SUGLEN', 'key']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
export const IS_READ_ONLY = true;
|
import { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';
|
||||||
|
|
||||||
export function transformArguments(key: string): Array<string> {
|
export default {
|
||||||
|
FIRST_KEY_INDEX: undefined,
|
||||||
|
IS_READ_ONLY: true,
|
||||||
|
transformArguments(key: RedisArgument) {
|
||||||
return ['FT.SUGLEN', key];
|
return ['FT.SUGLEN', key];
|
||||||
}
|
},
|
||||||
|
transformReply: undefined as unknown as () => NumberReply
|
||||||
export declare function transformReply(): number;
|
} as const satisfies Command;
|
||||||
|
Reference in New Issue
Block a user