1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-31 05:44:24 +03:00

buffers, buffers everywhere...

This commit is contained in:
leibale
2021-12-20 14:47:51 -05:00
parent 2733e225ae
commit a0de7967f9
237 changed files with 2322 additions and 1951 deletions

View File

@ -75,6 +75,16 @@ await client.hGetAll('key'); // { field1: 'value1', field2: 'value2' }
await client.hVals('key'); // ['value1', 'value2']
```
`Buffer`s are supported as well:
```typescript
await client.hSet('key', 'field', Buffer.from('value')); // 'OK'
await client.hGetAll(
commandOptions({ returnBuffers: true }),
'key'
); // { field: <Buffer 76 61 6c 75 65> }
```
### Unsupported Redis Commands
If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!) use `.sendCommand()`: