You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
27 lines
641 B
TypeScript
27 lines
641 B
TypeScript
import { RedisArgument, SimpleStringReply, Command } from '../RESP/types';
|
|
|
|
export interface XGroupSetIdOptions {
|
|
/** added in 7.0 */
|
|
ENTRIESREAD?: number;
|
|
}
|
|
|
|
export default {
|
|
FIRST_KEY_INDEX: 2,
|
|
IS_READ_ONLY: false,
|
|
transformArguments(
|
|
key: RedisArgument,
|
|
group: RedisArgument,
|
|
id: RedisArgument,
|
|
options?: XGroupSetIdOptions
|
|
) {
|
|
const args = ['XGROUP', 'SETID', key, group, id];
|
|
|
|
if (options?.ENTRIESREAD) {
|
|
args.push('ENTRIESREAD', options.ENTRIESREAD.toString());
|
|
}
|
|
|
|
return args;
|
|
},
|
|
transformReply: undefined as unknown as () => SimpleStringReply<'OK'>
|
|
} as const satisfies Command;
|