You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
WIP
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
## Map keys and Set members
|
||||
|
||||
When decoding Map to `Map | object` or Set to `Set`, keys/members (respectively) of type "Simple String" or "Blob String" will be decoded as `string`s (ignoring flags) to allow lookup by type. If you need them as `Buffer`s, make sure to decode `Map`s/`Set`s as `Array`s.
|
||||
When decoding Map to `Map | object` or Set to `Set`, keys/members (respectively) of type "Simple String" or "Blob String" will be decoded as `string`s (ignoring type mapping) to allow lookup by type. If you need them as `Buffer`s, make sure to decode `Map`s/`Set`s as `Array`s.
|
||||
|
||||
## Not Implemented
|
||||
|
||||
|
@@ -13,11 +13,11 @@ await client.connect();
|
||||
|
||||
client.hGetAll('key'); // Record<string, string>
|
||||
|
||||
client.withFlags({
|
||||
client.withTypeMapping({
|
||||
[TYPES.MAP]: Map
|
||||
}).hGetAll('key'); // Map<string, string>
|
||||
|
||||
client.withFlags({
|
||||
client.withTypeMapping({
|
||||
[TYPES.MAP]: Map,
|
||||
[TYPES.BLOB_STRING]: Buffer
|
||||
}).hGetAll('key'); // Map<string, Buffer>
|
||||
|
Reference in New Issue
Block a user