You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
wip
This commit is contained in:
@@ -39,7 +39,7 @@ To override just a specific option, use the following functions:
|
|||||||
|
|
||||||
## Quit VS Disconnect
|
## Quit VS Disconnect
|
||||||
|
|
||||||
The `QUIT` command has been deprecated in Redis 7.2 and should now also be considered deprecated in Node-Redis. Instead of sending a `QUIT` command to the server, the client can simply close the network connection.
|
The `QUIT` command has been deprecated in Redis 7.2 and should now also be considered deprecated in Node-Redis. Instead of sending a `QUIT` command to the server, the client can simply close the network connection.
|
||||||
|
|
||||||
Rather than using `client.quit()`, your code should use `client.close()` or `client.disconnect()`.
|
Rather than using `client.quit()`, your code should use `client.close()` or `client.disconnect()`.
|
||||||
|
|
||||||
@@ -48,17 +48,31 @@ TODO difference between `close` and `disconnect`...
|
|||||||
## Scan Iterators
|
## Scan Iterators
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
Yields chunks instead of individual items. Allows multi key operations.
|
||||||
|
See the [Scan Iterators guide](./scan-iterators.md).
|
||||||
|
|
||||||
Yields chunks instead of individual items:
|
## Legacy Mode
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
for await (const chunk of client.scanIterator()) {
|
const client = createClient(),
|
||||||
// `chunk` type is `Array<string>`
|
legacyClient = client.legacy();
|
||||||
// will allow multi keys operations
|
|
||||||
await client.del(chunk);
|
// use `client` for the new API
|
||||||
}
|
await client.set('key', 'value');
|
||||||
|
|
||||||
|
// use `legacyClient` for the "legacy" callback API
|
||||||
|
legacyClient.set('key', 'value', (err, reply) => {
|
||||||
|
// ...
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Isolation Pool
|
||||||
|
|
||||||
|
TODO
|
||||||
|
The `isolationPool` has been moved to it's on class `ClientPool`. You can create pool from a client using `client.createPool()`.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Some command arguments/replies have changed to align more closely to data types returned by Redis:
|
Some command arguments/replies have changed to align more closely to data types returned by Redis:
|
||||||
@@ -85,6 +99,10 @@ Some command arguments/replies have changed to align more closely to data types
|
|||||||
- `SCRIPT EXISTS`: `Array<boolean>` -> `Array<number>` [^boolean-to-number]
|
- `SCRIPT EXISTS`: `Array<boolean>` -> `Array<number>` [^boolean-to-number]
|
||||||
- `SISMEMBER`: `boolean` -> `number` [^boolean-to-number]
|
- `SISMEMBER`: `boolean` -> `number` [^boolean-to-number]
|
||||||
- `SMISMEMBER`: `Array<boolean>` -> `Array<number>` [^boolean-to-number]
|
- `SMISMEMBER`: `Array<boolean>` -> `Array<number>` [^boolean-to-number]
|
||||||
|
- `TS.ADD`: `boolean` -> `number` [^boolean-to-number]
|
||||||
|
- `GEOSEARCH_WITH`/`GEORADIUS_WITH`: `GeoReplyWith` -> `GEO_REPLY_WITH` [^enum-to-constants]
|
||||||
|
- `GEORADIUSSTORE` -> `GEORADIUS_STORE`
|
||||||
|
- `GEORADIUSBYMEMBERSTORE` -> `GEORADIUSBYMEMBER_STORE`
|
||||||
|
|
||||||
[^enum-to-constants]: TODO
|
[^enum-to-constants]: TODO
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user