Skip to content

Commit 2fb97e2

Browse files
committed
SETNX command details
1 parent 51007e3 commit 2fb97e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/develop/clients/nodejs/migration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ command with an explicit method:
352352
client.setnx('bike:1', 'bike');
353353
```
354354

355-
`node-redis` doesn't provide a `SETNX` method but implements the same
356-
functionality with the `NX` option to the [`SET`]({{< relref "/commands/set" >}})
357-
command:
355+
`node-redis` provides a `SETNX` method but due to the command being deprecated the same
356+
functionality can be achieved with the `NX` option to the [`SET`]({{< relref "/commands/set" >}})
357+
command instead:
358358

359359
```js
360360
await client.set('bike:1', 'bike', {'NX': true});

0 commit comments

Comments
 (0)