You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
31 lines
636 B
TypeScript
31 lines
636 B
TypeScript
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
|
|
|
export const FIRST_KEY_INDEX = 1;
|
|
|
|
export const IS_READ_ONLY = true;
|
|
|
|
interface CursorReadOptions {
|
|
COUNT?: number;
|
|
}
|
|
|
|
export function transformArguments(
|
|
index: RedisCommandArgument,
|
|
cursor: number,
|
|
options?: CursorReadOptions
|
|
): RedisCommandArguments {
|
|
const args = [
|
|
'FT.CURSOR',
|
|
'READ',
|
|
index,
|
|
cursor.toString()
|
|
];
|
|
|
|
if (options?.COUNT) {
|
|
args.push('COUNT', options.COUNT.toString());
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
export { transformReply } from './AGGREGATE_WITHCURSOR';
|