You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v4-to-v5.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ To override just a specific option, use the following functions:
39
39
40
40
## Quit VS Disconnect
41
41
42
-
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.
42
+
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.
43
43
44
44
Rather than using `client.quit()`, your code should use `client.close()` or `client.disconnect()`.
45
45
@@ -48,17 +48,31 @@ TODO difference between `close` and `disconnect`...
48
48
## Scan Iterators
49
49
50
50
TODO
51
+
Yields chunks instead of individual items. Allows multi key operations.
52
+
See the [Scan Iterators guide](./scan-iterators.md).
51
53
52
-
Yields chunks instead of individual items:
54
+
## Legacy Mode
55
+
56
+
TODO
53
57
54
58
```javascript
55
-
forawait (constchunkofclient.scanIterator()) {
56
-
// `chunk` type is `Array<string>`
57
-
// will allow multi keys operations
58
-
awaitclient.del(chunk);
59
-
}
59
+
constclient=createClient(),
60
+
legacyClient =client.legacy();
61
+
62
+
// use `client` for the new API
63
+
awaitclient.set('key', 'value');
64
+
65
+
// use `legacyClient` for the "legacy" callback API
0 commit comments