You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-12-12 21:21:15 +03:00
feat(client): add CAS/CAD, DELEX, DIGEST support (#3123)
* feat: add digest command and tests * feat: add delex command and tests * feat: add more conditional options to SET update tests
This commit is contained in:
17
packages/client/lib/commands/DIGEST.ts
Normal file
17
packages/client/lib/commands/DIGEST.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { CommandParser } from "../client/parser";
|
||||
import { Command, RedisArgument, SimpleStringReply } from "../RESP/types";
|
||||
|
||||
export default {
|
||||
IS_READ_ONLY: true,
|
||||
/**
|
||||
* Returns the XXH3 hash of a string value.
|
||||
*
|
||||
* @param parser - The Redis command parser
|
||||
* @param key - Key to get the digest of
|
||||
*/
|
||||
parseCommand(parser: CommandParser, key: RedisArgument) {
|
||||
parser.push("DIGEST");
|
||||
parser.pushKey(key);
|
||||
},
|
||||
transformReply: undefined as unknown as () => SimpleStringReply,
|
||||
} as const satisfies Command;
|
||||
Reference in New Issue
Block a user