You've already forked node-redis
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:
10
README.md
10
README.md
@ -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()`:
|
||||
|
Reference in New Issue
Block a user