Commit 4fb787c
authored
This changes the return of a nil result through the `RedisValueArrayProcessor` so that it's a `[]` instead of a single element `[ nil ]` in our handling.
This affects the following commands, which are multibulk when a count is provided (even if it's 1), otherwise they are bulkstring. This change affects the non-count case when it's null. Instead of a single element array with a nil value, we'd return an empty array as the Redis surface area intends:
- `LPOP`/`RPOP`
- `SRANDMEMBER`
- `SPOP`
The other usages of `RedisValueArrayProcessor` are _always_ multibulk and are not affected:
- `HMGET`
- `HKEYS`
- `HVALS`
- `LRANGE`
- `MGET`
- `SDIFF`
- `SINTER`
- `SUNION`
- `SMEMBERS`
- `SORT`
- `XCLAIM`
- `Z(REV)RANGE`
- `Z(REV)RANGEBYLEX`
- `Z(REV)RANGEBYSCORE`
1 parent 34ba699 commit 4fb787c
File tree
3 files changed
+23
-1
lines changed- docs
- src/StackExchange.Redis
- tests/StackExchange.Redis.Tests
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1253 | 1256 | | |
1254 | 1257 | | |
1255 | 1258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
228 | 246 | | |
229 | 247 | | |
0 commit comments