Skip to content

Commit 06e91d0

Browse files
ljy1017010larry
andauthored
fix: XRangeOptions COUNT (#2791)
Co-authored-by: larry <[email protected]>
1 parent 6a3ea59 commit 06e91d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doctests/dt-streams.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ assert.equal(await client.xLen('race:france'), 3);
4949
// REMOVE_END
5050

5151
// STEP_START xRange
52-
const res4 = await client.xRange('race:france', '1691765278160-0', '+', 2);
52+
const res4 = await client.xRange('race:france', '1691765278160-0', '+', {COUNT: 2});
5353
console.log(res4); // >>> [('1692629576966-0', {'rider': 'Castilla', 'speed': '30.2', 'position': '1', 'location_id': '1'}), ('1692629594113-0', {'rider': 'Norem', 'speed': '28.8', 'position': '3', 'location_id': '1'})]
5454
// STEP_END
5555

@@ -121,22 +121,22 @@ console.log(res12); // >>> [('1692629576966-0', {'rider': 'Castilla', 'speed': '
121121
// STEP_END
122122

123123
// STEP_START xRange_step_1
124-
const res13 = await client.xRange('race:france', '-', '+', 2);
124+
const res13 = await client.xRange('race:france', '-', '+', {COUNT: 2});
125125
console.log(res13); // >>> [('1692629576966-0', {'rider': 'Castilla', 'speed': '30.2', 'position': '1', 'location_id': '1'}), ('1692629594113-0', {'rider': 'Norem', 'speed': '28.8', 'position': '3', 'location_id': '1'})]
126126
// STEP_END
127127

128128
// STEP_START xRange_step_2
129-
const res14 = await client.xRange('race:france', '(1692629594113-0', '+', 2);
129+
const res14 = await client.xRange('race:france', '(1692629594113-0', '+', {COUNT: 2});
130130
console.log(res14); // >>> [('1692629613374-0', {'rider': 'Prickett', 'speed': '29.7', 'position': '2', 'location_id': '1'}), ('1692629676124-0', {'rider': 'Castilla', 'speed': '29.9', 'position': '1', 'location_id': '2'})]
131131
// STEP_END
132132

133133
// STEP_START xRange_empty
134-
const res15 = await client.xRange('race:france', '(1692629676124-0', '+', 2);
134+
const res15 = await client.xRange('race:france', '(1692629676124-0', '+', {COUNT: 2});
135135
console.log(res15); // >>> []
136136
// STEP_END
137137

138138
// STEP_START xrevrange
139-
const res16 = await client.xRevRange('race:france', '+', '-', 1);
139+
const res16 = await client.xRevRange('race:france', '+', '-', {COUNT: 1});
140140
console.log(
141141
res16
142142
); // >>> [('1692629676124-0', {'rider': 'Castilla', 'speed': '29.9', 'position': '1', 'location_id': '2'})]

0 commit comments

Comments
 (0)