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

fix #1650 - add support for Buffer in some commands, add GET_BUFFER command

This commit is contained in:
leibale
2021-09-13 19:49:39 -04:00
parent 1413a69a6b
commit 08837c8648
65 changed files with 300 additions and 227 deletions

View File

@@ -1,3 +1,5 @@
import { TransformArgumentsReply } from '.';
export const FIRST_KEY_INDEX = 1;
interface EX {
@@ -38,7 +40,7 @@ interface SetCommonOptions {
type SetOptions = SetTTL & SetGuards & (SetCommonOptions | {});
export function transformArguments(key: string, value: string, options?: SetOptions): Array<string> {
export function transformArguments(key: string | Buffer, value: string | Buffer, options?: SetOptions): TransformArgumentsReply {
const args = ['SET', key, value];
if (!options) {