node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

inclusive zrange

Open polearnik opened this issue 2 years ago • 1 comments

How I can make exclusive range with zrange?
I try

await redis.zRange('ticks:' + pair, '(123', end) 

but it end with error In file /commands/zrange.js I see that argument for min and max should be numbers

polearnik avatar Jul 04 '22 14:07 polearnik

https://github.com/redis/node-redis/blob/master/packages/client/lib/commands/ZRANGE.ts#L19 min and max type is RedisCommandArgument | number, and RedisCommandArgument is string | Buffer await redis.zRange('key', '(123', '(456') should work

leibale avatar Jul 04 '22 23:07 leibale