You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
29 lines
836 B
TypeScript
29 lines
836 B
TypeScript
import { CommandParser } from '@redis/client/dist/lib/client/parser';
|
|
import { SimpleStringReply, Command, RedisArgument } from '@redis/client/dist/lib/RESP/types';
|
|
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
|
|
|
|
export interface FtSynUpdateOptions {
|
|
SKIPINITIALSCAN?: boolean;
|
|
}
|
|
|
|
export default {
|
|
NOT_KEYED_COMMAND: true,
|
|
IS_READ_ONLY: true,
|
|
parseCommand(
|
|
parser: CommandParser,
|
|
index: RedisArgument,
|
|
groupId: RedisArgument,
|
|
terms: RedisVariadicArgument,
|
|
options?: FtSynUpdateOptions
|
|
) {
|
|
parser.push('FT.SYNUPDATE', index, groupId);
|
|
|
|
if (options?.SKIPINITIALSCAN) {
|
|
parser.push('SKIPINITIALSCAN');
|
|
}
|
|
|
|
parser.pushVariadic(terms);
|
|
},
|
|
transformReply: undefined as unknown as () => SimpleStringReply<'OK'>
|
|
} as const satisfies Command;
|