You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Support ZINTERCARD and SINTERCARD (#2040)
* Support ZINTERCARD and SINTERCARD * clean code * clean code Co-authored-by: leibale <leibale1998@gmail.com>
This commit is contained in:
21
packages/client/lib/commands/SINTERCARD.ts
Normal file
21
packages/client/lib/commands/SINTERCARD.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { RedisCommandArgument, RedisCommandArguments } from '.';
|
||||
import { pushVerdictArgument } from './generic-transformers';
|
||||
|
||||
export const FIRST_KEY_INDEX = 2;
|
||||
|
||||
export const IS_READ_ONLY = true;
|
||||
|
||||
export function transformArguments(
|
||||
keys: Array<RedisCommandArgument> | RedisCommandArgument,
|
||||
limit?: number
|
||||
): RedisCommandArguments {
|
||||
const args = pushVerdictArgument(['SINTERCARD'], keys);
|
||||
|
||||
if (limit) {
|
||||
args.push('LIMIT', limit.toString());
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
export declare function transformReply(): number;
|
Reference in New Issue
Block a user