Skip to content

Commit 51e54b8

Browse files
Update sets.md
1 parent 1ed1e0e commit 51e54b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ds/sets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Here are some important set commands:
1414

1515
Use `SADD` to create and update a set. Each `SADD` command will return the number of added members. If you try to add a member that is already in the set, `0` is returned.
1616

17-
```redis Create a set
17+
```redis:[run_confirmation=true] Create a set
1818
SADD bike:1:addons "whitewall tires"
1919
SADD bike:1:addons "bell" "reflectors"
2020
SADD bike:1:addons "bell"
@@ -24,7 +24,7 @@ Notice that the `SADD` command is variadic.
2424

2525
`SREM` is used to remove members of a set. It returns `1` if the member is in the set, or `0` if it is not.
2626

27-
```redis Remove set members
27+
```redis:[run_confirmation=true] Remove set members
2828
SREM bike:1:addons "bell"
2929
SREM bike:1:addons "sissy bar"
3030
```
@@ -44,7 +44,7 @@ SMEMBERS bike:1:addons
4444

4545
`SUNION` combines two or more sets and returns all their elements.
4646

47-
```redis SUNION usage
47+
```redis:[run_confirmation=true] SUNION usage
4848
SADD bike:1:special_addons "sparkle coat finish" "banana seat"
4949
SUNION bike:1:addons bike:1:special_addons
5050
```
@@ -56,7 +56,7 @@ Sets have two ways to return one or more random members of a set:
5656

5757
Each command takes a key and, optionally, a count as arguments. `SPOP` removes and returns a random member, whereas `SRANDMEMBER` just returns the randomly selected members without removing them.
5858

59-
```redis SPOP/SRANDMEMBER usage
59+
```redis:[run_confirmation=true] SPOP/SRANDMEMBER usage
6060
SMEMBERS bike:1:addons
6161
SRANDMEMBER bike:1:addons
6262
SPOP bike:1:addons

0 commit comments

Comments
 (0)