@@ -166,11 +166,11 @@ module.exports = function (test, testCommon) {
166
166
} )
167
167
} ) )
168
168
169
- test ( 'ReadStream: readStream() with "start "' , makeTest ( function ( t , db , ctx , done ) {
169
+ test ( 'ReadStream: readStream() with "gte "' , makeTest ( function ( t , db , ctx , done ) {
170
170
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
171
171
t . ifError ( err )
172
172
173
- const rs = createReadStream ( db , { start : '50' } )
173
+ const rs = createReadStream ( db , { gte : '50' } )
174
174
rs . on ( 'data' , ctx . dataSpy )
175
175
rs . on ( 'end' , ctx . endSpy )
176
176
rs . on ( 'close' , function ( ) {
@@ -181,11 +181,11 @@ module.exports = function (test, testCommon) {
181
181
} )
182
182
} ) )
183
183
184
- test ( 'ReadStream: readStream() with "start " and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
184
+ test ( 'ReadStream: readStream() with "lte " and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
185
185
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
186
186
t . ifError ( err )
187
187
188
- const rs = createReadStream ( db , { start : '50' , reverse : true } )
188
+ const rs = createReadStream ( db , { lte : '50' , reverse : true } )
189
189
rs . on ( 'data' , ctx . dataSpy )
190
190
rs . on ( 'end' , ctx . endSpy )
191
191
rs . on ( 'close' , function ( ) {
@@ -196,12 +196,12 @@ module.exports = function (test, testCommon) {
196
196
} )
197
197
} ) )
198
198
199
- test ( 'ReadStream: readStream() with "start " being mid-way key (float)' , makeTest ( function ( t , db , ctx , done ) {
199
+ test ( 'ReadStream: readStream() with "gte " being mid-way key (float)' , makeTest ( function ( t , db , ctx , done ) {
200
200
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
201
201
t . ifError ( err )
202
202
203
203
// '49.5' doesn't actually exist but we expect it to start at '50' because '49' < '49.5' < '50' (in string terms as well as numeric)
204
- const rs = createReadStream ( db , { start : '49.5' } )
204
+ const rs = createReadStream ( db , { gte : '49.5' } )
205
205
rs . on ( 'data' , ctx . dataSpy )
206
206
rs . on ( 'end' , ctx . endSpy )
207
207
rs . on ( 'close' , function ( ) {
@@ -212,11 +212,11 @@ module.exports = function (test, testCommon) {
212
212
} )
213
213
} ) )
214
214
215
- test ( 'ReadStream: readStream() with "start " being mid-way key (float) and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
215
+ test ( 'ReadStream: readStream() with "lte " being mid-way key (float) and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
216
216
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
217
217
t . ifError ( err )
218
218
219
- const rs = createReadStream ( db , { start : '49.5' , reverse : true } )
219
+ const rs = createReadStream ( db , { lte : '49.5' , reverse : true } )
220
220
rs . on ( 'data' , ctx . dataSpy )
221
221
rs . on ( 'end' , ctx . endSpy )
222
222
rs . on ( 'close' , function ( ) {
@@ -227,13 +227,13 @@ module.exports = function (test, testCommon) {
227
227
} )
228
228
} ) )
229
229
230
- test ( 'ReadStream: readStream() with "start " being mid-way key (string)' , makeTest ( function ( t , db , ctx , done ) {
230
+ test ( 'ReadStream: readStream() with "gte " being mid-way key (string)' , makeTest ( function ( t , db , ctx , done ) {
231
231
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
232
232
t . ifError ( err )
233
233
234
234
// '499999' doesn't actually exist but we expect it to start at '50' because '49' < '499999' < '50' (in string terms)
235
235
// the same as the previous test but we're relying solely on string ordering
236
- const rs = createReadStream ( db , { start : '499999' } )
236
+ const rs = createReadStream ( db , { gte : '499999' } )
237
237
rs . on ( 'data' , ctx . dataSpy )
238
238
rs . on ( 'end' , ctx . endSpy )
239
239
rs . on ( 'close' , function ( ) {
@@ -244,11 +244,11 @@ module.exports = function (test, testCommon) {
244
244
} )
245
245
} ) )
246
246
247
- test ( 'ReadStream: readStream() with "end "' , makeTest ( function ( t , db , ctx , done ) {
247
+ test ( 'ReadStream: readStream() with "lte "' , makeTest ( function ( t , db , ctx , done ) {
248
248
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
249
249
t . ifError ( err )
250
250
251
- const rs = createReadStream ( db , { end : '50' } )
251
+ const rs = createReadStream ( db , { lte : '50' } )
252
252
rs . on ( 'data' , ctx . dataSpy )
253
253
rs . on ( 'end' , ctx . endSpy )
254
254
rs . on ( 'close' , function ( ) {
@@ -259,11 +259,11 @@ module.exports = function (test, testCommon) {
259
259
} )
260
260
} ) )
261
261
262
- test ( 'ReadStream: readStream() with "end " being mid-way key (float)' , makeTest ( function ( t , db , ctx , done ) {
262
+ test ( 'ReadStream: readStream() with "lte " being mid-way key (float)' , makeTest ( function ( t , db , ctx , done ) {
263
263
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
264
264
t . ifError ( err )
265
265
266
- const rs = createReadStream ( db , { end : '50.5' } )
266
+ const rs = createReadStream ( db , { lte : '50.5' } )
267
267
rs . on ( 'data' , ctx . dataSpy )
268
268
rs . on ( 'end' , ctx . endSpy )
269
269
rs . on ( 'close' , function ( ) {
@@ -274,11 +274,11 @@ module.exports = function (test, testCommon) {
274
274
} )
275
275
} ) )
276
276
277
- test ( 'ReadStream: readStream() with "end " being mid-way key (string)' , makeTest ( function ( t , db , ctx , done ) {
277
+ test ( 'ReadStream: readStream() with "lte " being mid-way key (string)' , makeTest ( function ( t , db , ctx , done ) {
278
278
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
279
279
t . ifError ( err )
280
280
281
- const rs = createReadStream ( db , { end : '50555555' } )
281
+ const rs = createReadStream ( db , { lte : '50555555' } )
282
282
rs . on ( 'data' , ctx . dataSpy )
283
283
rs . on ( 'end' , ctx . endSpy )
284
284
rs . on ( 'close' , function ( ) {
@@ -289,11 +289,11 @@ module.exports = function (test, testCommon) {
289
289
} )
290
290
} ) )
291
291
292
- test ( 'ReadStream: readStream() with "end " being mid-way key (float) and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
292
+ test ( 'ReadStream: readStream() with "gte " being mid-way key (float) and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
293
293
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
294
294
t . ifError ( err )
295
295
296
- const rs = createReadStream ( db , { end : '50.5' , reverse : true } )
296
+ const rs = createReadStream ( db , { gte : '50.5' , reverse : true } )
297
297
rs . on ( 'data' , ctx . dataSpy )
298
298
rs . on ( 'end' , ctx . endSpy )
299
299
rs . on ( 'close' , function ( ) {
@@ -303,11 +303,11 @@ module.exports = function (test, testCommon) {
303
303
} )
304
304
} ) )
305
305
306
- test ( 'ReadStream: readStream() with both "start " and "end "' , makeTest ( function ( t , db , ctx , done ) {
306
+ test ( 'ReadStream: readStream() with both "gte " and "lte "' , makeTest ( function ( t , db , ctx , done ) {
307
307
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
308
308
t . ifError ( err )
309
309
310
- const rs = createReadStream ( db , { start : 30 , end : 70 } )
310
+ const rs = createReadStream ( db , { gte : 30 , lte : 70 } )
311
311
rs . on ( 'data' , ctx . dataSpy )
312
312
rs . on ( 'end' , ctx . endSpy )
313
313
rs . on ( 'close' , function ( ) {
@@ -318,11 +318,11 @@ module.exports = function (test, testCommon) {
318
318
} )
319
319
} ) )
320
320
321
- test ( 'ReadStream: readStream() with both "start " and "end " and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
321
+ test ( 'ReadStream: readStream() with both "gte " and "lte " and "reverse=true"' , makeTest ( function ( t , db , ctx , done ) {
322
322
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
323
323
t . ifError ( err )
324
324
325
- const rs = createReadStream ( db , { start : 70 , end : 30 , reverse : true } )
325
+ const rs = createReadStream ( db , { gte : 30 , lte : 70 , reverse : true } )
326
326
rs . on ( 'data' , ctx . dataSpy )
327
327
rs . on ( 'end' , ctx . endSpy )
328
328
rs . on ( 'close' , function ( ) {
@@ -371,11 +371,11 @@ module.exports = function (test, testCommon) {
371
371
} )
372
372
} ) )
373
373
374
- test ( 'ReadStream: ReadStream, start =0' , makeTest ( function ( t , db , ctx , done ) {
374
+ test ( 'ReadStream: ReadStream, gte =0' , makeTest ( function ( t , db , ctx , done ) {
375
375
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
376
376
t . ifError ( err )
377
377
378
- const rs = createReadStream ( db , { start : 0 } )
378
+ const rs = createReadStream ( db , { gte : 0 } )
379
379
rs . on ( 'data' , ctx . dataSpy )
380
380
rs . on ( 'end' , ctx . endSpy )
381
381
rs . on ( 'close' , function ( ) {
@@ -387,11 +387,11 @@ module.exports = function (test, testCommon) {
387
387
388
388
// we don't expect any data to come out of here because the keys start at '00' not 0
389
389
// we just want to ensure that we don't kill the process
390
- test ( 'ReadStream: ReadStream, end =0' , makeTest ( function ( t , db , ctx , done ) {
390
+ test ( 'ReadStream: ReadStream, lte =0' , makeTest ( function ( t , db , ctx , done ) {
391
391
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
392
392
t . ifError ( err )
393
393
394
- const rs = createReadStream ( db , { end : 0 } )
394
+ const rs = createReadStream ( db , { lte : 0 } )
395
395
rs . on ( 'data' , ctx . dataSpy )
396
396
rs . on ( 'end' , ctx . endSpy )
397
397
rs . on ( 'close' , function ( ) {
@@ -451,11 +451,11 @@ module.exports = function (test, testCommon) {
451
451
} )
452
452
} ) )
453
453
454
- test ( 'ReadStream: readStream() with "start " and "limit"' , makeTest ( function ( t , db , ctx , done ) {
454
+ test ( 'ReadStream: readStream() with "gte " and "limit"' , makeTest ( function ( t , db , ctx , done ) {
455
455
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
456
456
t . ifError ( err )
457
457
458
- const rs = createReadStream ( db , { start : '20' , limit : 20 } )
458
+ const rs = createReadStream ( db , { gte : '20' , limit : 20 } )
459
459
rs . on ( 'data' , ctx . dataSpy )
460
460
rs . on ( 'end' , ctx . endSpy )
461
461
rs . on ( 'close' , function ( ) {
@@ -465,11 +465,11 @@ module.exports = function (test, testCommon) {
465
465
} )
466
466
} ) )
467
467
468
- test ( 'ReadStream: readStream() with "end " after "limit"' , makeTest ( function ( t , db , ctx , done ) {
468
+ test ( 'ReadStream: readStream() with "lte " after "limit"' , makeTest ( function ( t , db , ctx , done ) {
469
469
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
470
470
t . ifError ( err )
471
471
472
- const rs = createReadStream ( db , { end : '50' , limit : 20 } )
472
+ const rs = createReadStream ( db , { lte : '50' , limit : 20 } )
473
473
rs . on ( 'data' , ctx . dataSpy )
474
474
rs . on ( 'end' , ctx . endSpy )
475
475
rs . on ( 'close' , function ( ) {
@@ -479,11 +479,11 @@ module.exports = function (test, testCommon) {
479
479
} )
480
480
} ) )
481
481
482
- test ( 'ReadStream: readStream() with "end " before "limit"' , makeTest ( function ( t , db , ctx , done ) {
482
+ test ( 'ReadStream: readStream() with "lte " before "limit"' , makeTest ( function ( t , db , ctx , done ) {
483
483
db . batch ( ctx . sourceData . slice ( ) , function ( err ) {
484
484
t . ifError ( err )
485
485
486
- const rs = createReadStream ( db , { end : '30' , limit : 50 } )
486
+ const rs = createReadStream ( db , { lte : '30' , limit : 50 } )
487
487
rs . on ( 'data' , ctx . dataSpy )
488
488
rs . on ( 'end' , ctx . endSpy )
489
489
rs . on ( 'close' , function ( ) {
0 commit comments