You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-13 10:02:24 +03:00
implement some GEO commands, improve scan generic transformer, expose RPUSHX
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
import { ScanOptions, transformScanArguments } from './generic-transformers';
|
||||
import { ScanOptions, pushScanArguments } from './generic-transformers';
|
||||
|
||||
export const IS_READ_ONLY = true;
|
||||
|
||||
export interface ScanCommandOptions extends ScanOptions {
|
||||
TYPE?: string;
|
||||
}
|
||||
|
||||
export function transformArguments(cursor: number, options?: ScanCommandOptions): Array<string> {
|
||||
const args = [
|
||||
'SCAN',
|
||||
...transformScanArguments(cursor, options)
|
||||
];
|
||||
|
||||
const args = pushScanArguments(['SCAN'], cursor, options);
|
||||
|
||||
if (options?.TYPE) {
|
||||
args.push('TYPE', options.TYPE);
|
||||
}
|
||||
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user