You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Support all GEORADIUS Commands (#2017)
* Support all GEORADIUS Commands * move store bool to options * simplify transformReply for store commands * clean code Co-authored-by: leibale <leibale1998@gmail.com>
This commit is contained in:
25
packages/client/lib/commands/GEORADIUS.ts
Normal file
25
packages/client/lib/commands/GEORADIUS.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { RedisCommandArgument, RedisCommandArguments } from '.';
|
||||
import { GeoSearchOptions, GeoCoordinates, pushGeoRadiusArguments, GeoUnits } from './generic-transformers';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
export const IS_READ_ONLY = true;
|
||||
|
||||
export function transformArguments(
|
||||
key: RedisCommandArgument,
|
||||
coordinates: GeoCoordinates,
|
||||
radius: number,
|
||||
unit: GeoUnits,
|
||||
options?: GeoSearchOptions
|
||||
): RedisCommandArguments {
|
||||
return pushGeoRadiusArguments(
|
||||
['GEORADIUS'],
|
||||
key,
|
||||
coordinates,
|
||||
radius,
|
||||
unit,
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
export declare function transformReply(): Array<RedisCommandArgument>;
|
Reference in New Issue
Block a user