1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-22 05:32:45 +03:00

implement some GEO commands, improve scan generic transformer, expose RPUSHX

This commit is contained in:
leibale
2021-07-19 16:39:09 -04:00
parent c72aab2fc2
commit a10b276144
24 changed files with 924 additions and 59 deletions

View File

@@ -0,0 +1,23 @@
import { TransformArgumentsReply } from '.';
import { GeoSearchFrom, GeoSearchBy, GeoReplyWith, GeoSearchOptions, transformGeoMembersWithReply } from './generic-transformers';
import { transformArguments as geoSearchTransformArguments } from './GEOSEARCH';
export { FIRST_KEY_INDEX, IS_READ_ONLY } from './GEOSEARCH';
export function transformArguments(
key: string,
from: GeoSearchFrom,
by: GeoSearchBy,
replyWith: Array<GeoReplyWith>,
options?: GeoSearchOptions
): TransformArgumentsReply {
const args: TransformArgumentsReply = geoSearchTransformArguments(key, from, by, options);
args.push(...replyWith);
args.preserve = replyWith;
return args;
}
export const transformReply = transformGeoMembersWithReply;