@@ -354,15 +354,15 @@ public SortedSetEntry[] SortedSetRangeByRankWithScores(
354354 long stop = - 1 ,
355355 Order order = Order . Ascending ,
356356 CommandFlags flags = CommandFlags . None )
357- => throw new NotImplementedException ( ) ;
357+ => Context ( flags ) . SortedSets ( ) . ZRangeWithScores ( key , start , stop , order ) . Wait ( SyncTimeout ) ;
358358
359359 public Task < SortedSetEntry [ ] > SortedSetRangeByRankWithScoresAsync (
360360 RedisKey key ,
361361 long start = 0 ,
362362 long stop = - 1 ,
363363 Order order = Order . Ascending ,
364364 CommandFlags flags = CommandFlags . None )
365- => throw new NotImplementedException ( ) ;
365+ => Context ( flags ) . SortedSets ( ) . ZRangeWithScores ( key , start , stop , order ) . AsTask ( ) ;
366366
367367 public RedisValue [ ] SortedSetRangeByScore (
368368 RedisKey key ,
@@ -373,7 +373,15 @@ public RedisValue[] SortedSetRangeByScore(
373373 long skip = 0 ,
374374 long take = - 1 ,
375375 CommandFlags flags = CommandFlags . None )
376- => throw new NotImplementedException ( ) ;
376+ => Context ( flags ) . SortedSets ( ) . ZRangeByScore ( key , ByScore ( start , stop , exclude , skip , take ) , order ) . Wait ( SyncTimeout ) ;
377+
378+ private static SortedSetCommands . ZRangeRequest ByScore ( double start , double stop , Exclude exclude , long skip , long take )
379+ {
380+ var req = SortedSetCommands . ZRangeRequest . ByScore ( start , stop , exclude ) ;
381+ req . Offset = skip ;
382+ req . Count = take ;
383+ return req ;
384+ }
377385
378386 public Task < RedisValue [ ] > SortedSetRangeByScoreAsync (
379387 RedisKey key ,
@@ -384,7 +392,7 @@ public Task<RedisValue[]> SortedSetRangeByScoreAsync(
384392 long skip = 0 ,
385393 long take = - 1 ,
386394 CommandFlags flags = CommandFlags . None )
387- => throw new NotImplementedException ( ) ;
395+ => Context ( flags ) . SortedSets ( ) . ZRangeByScore ( key , ByScore ( start , stop , exclude , skip , take ) , order ) . AsTask ( ) ;
388396
389397 public SortedSetEntry [ ] SortedSetRangeByScoreWithScores (
390398 RedisKey key ,
@@ -395,7 +403,7 @@ public SortedSetEntry[] SortedSetRangeByScoreWithScores(
395403 long skip = 0 ,
396404 long take = - 1 ,
397405 CommandFlags flags = CommandFlags . None )
398- => throw new NotImplementedException ( ) ;
406+ => Context ( flags ) . SortedSets ( ) . ZRangeByScoreWithScores ( key , ByScore ( start , stop , exclude , skip , take ) , order ) . Wait ( SyncTimeout ) ;
399407
400408 public Task < SortedSetEntry [ ] > SortedSetRangeByScoreWithScoresAsync (
401409 RedisKey key ,
@@ -406,7 +414,15 @@ public Task<SortedSetEntry[]> SortedSetRangeByScoreWithScoresAsync(
406414 long skip = 0 ,
407415 long take = - 1 ,
408416 CommandFlags flags = CommandFlags . None )
409- => throw new NotImplementedException ( ) ;
417+ => Context ( flags ) . SortedSets ( ) . ZRangeByScoreWithScores ( key , ByScore ( start , stop , exclude , skip , take ) , order ) . AsTask ( ) ;
418+
419+ private static SortedSetCommands . ZRangeRequest ByLex ( RedisValue start , RedisValue stop , Exclude exclude , long skip , long take )
420+ {
421+ var req = SortedSetCommands . ZRangeRequest . ByLex ( start , stop , exclude ) ;
422+ req . Offset = skip ;
423+ req . Count = take ;
424+ return req ;
425+ }
410426
411427 public RedisValue [ ] SortedSetRangeByValue (
412428 RedisKey key ,
@@ -416,7 +432,7 @@ public RedisValue[] SortedSetRangeByValue(
416432 long skip = 0 ,
417433 long take = - 1 ,
418434 CommandFlags flags = CommandFlags . None )
419- => throw new NotImplementedException ( ) ;
435+ => Context ( flags ) . SortedSets ( ) . ZRangeByLex ( key , ByLex ( min , max , exclude , skip , take ) ) . Wait ( SyncTimeout ) ;
420436
421437 public RedisValue [ ] SortedSetRangeByValue (
422438 RedisKey key ,
@@ -427,7 +443,7 @@ public RedisValue[] SortedSetRangeByValue(
427443 long skip = 0 ,
428444 long take = - 1 ,
429445 CommandFlags flags = CommandFlags . None )
430- => throw new NotImplementedException ( ) ;
446+ => Context ( flags ) . SortedSets ( ) . ZRangeByLex ( key , ByLex ( min , max , exclude , skip , take ) , order ) . Wait ( SyncTimeout ) ;
431447
432448 public Task < RedisValue [ ] > SortedSetRangeByValueAsync (
433449 RedisKey key ,
@@ -437,7 +453,7 @@ public Task<RedisValue[]> SortedSetRangeByValueAsync(
437453 long skip = 0 ,
438454 long take = - 1 ,
439455 CommandFlags flags = CommandFlags . None )
440- => throw new NotImplementedException ( ) ;
456+ => Context ( flags ) . SortedSets ( ) . ZRangeByLex ( key , ByLex ( min , max , exclude , skip , take ) ) . AsTask ( ) ;
441457
442458 public Task < RedisValue [ ] > SortedSetRangeByValueAsync (
443459 RedisKey key ,
@@ -448,68 +464,68 @@ public Task<RedisValue[]> SortedSetRangeByValueAsync(
448464 long skip = 0 ,
449465 long take = - 1 ,
450466 CommandFlags flags = CommandFlags . None )
451- => throw new NotImplementedException ( ) ;
467+ => Context ( flags ) . SortedSets ( ) . ZRangeByLex ( key , ByLex ( min , max , exclude , skip , take ) , order ) . AsTask ( ) ;
452468
453469 public bool SortedSetRemove ( RedisKey key , RedisValue member , CommandFlags flags = CommandFlags . None )
454- => throw new NotImplementedException ( ) ;
470+ => Context ( flags ) . SortedSets ( ) . ZRem ( key , member ) . Wait ( SyncTimeout ) ;
455471
456472 public long SortedSetRemove ( RedisKey key , RedisValue [ ] members , CommandFlags flags = CommandFlags . None )
457- => throw new NotImplementedException ( ) ;
473+ => Context ( flags ) . SortedSets ( ) . ZRem ( key , members ) . Wait ( SyncTimeout ) ;
458474
459475 public Task < bool > SortedSetRemoveAsync ( RedisKey key , RedisValue member , CommandFlags flags = CommandFlags . None )
460- => throw new NotImplementedException ( ) ;
476+ => Context ( flags ) . SortedSets ( ) . ZRem ( key , member ) . AsTask ( ) ;
461477
462478 public Task < long > SortedSetRemoveAsync (
463479 RedisKey key ,
464480 RedisValue [ ] members ,
465481 CommandFlags flags = CommandFlags . None )
466- => throw new NotImplementedException ( ) ;
482+ => Context ( flags ) . SortedSets ( ) . ZRem ( key , members ) . AsTask ( ) ;
467483
468484 public long SortedSetRemoveRangeByRank (
469485 RedisKey key ,
470486 long start ,
471487 long stop ,
472488 CommandFlags flags = CommandFlags . None )
473- => throw new NotImplementedException ( ) ;
489+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByRank ( key , start , stop ) . Wait ( SyncTimeout ) ;
474490
475491 public Task < long > SortedSetRemoveRangeByRankAsync (
476492 RedisKey key ,
477493 long start ,
478494 long stop ,
479495 CommandFlags flags = CommandFlags . None )
480- => throw new NotImplementedException ( ) ;
496+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByRank ( key , start , stop ) . AsTask ( ) ;
481497
482498 public long SortedSetRemoveRangeByScore (
483499 RedisKey key ,
484500 double start ,
485501 double stop ,
486502 Exclude exclude = Exclude . None ,
487503 CommandFlags flags = CommandFlags . None )
488- => throw new NotImplementedException ( ) ;
504+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByScore ( key , SortedSetCommands . ZRangeRequest . ByScore ( start , stop , exclude ) ) . Wait ( SyncTimeout ) ;
489505
490506 public Task < long > SortedSetRemoveRangeByScoreAsync (
491507 RedisKey key ,
492508 double start ,
493509 double stop ,
494510 Exclude exclude = Exclude . None ,
495511 CommandFlags flags = CommandFlags . None )
496- => throw new NotImplementedException ( ) ;
512+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByScore ( key , SortedSetCommands . ZRangeRequest . ByScore ( start , stop , exclude ) ) . AsTask ( ) ;
497513
498514 public long SortedSetRemoveRangeByValue (
499515 RedisKey key ,
500516 RedisValue min ,
501517 RedisValue max ,
502518 Exclude exclude = Exclude . None ,
503519 CommandFlags flags = CommandFlags . None )
504- => throw new NotImplementedException ( ) ;
520+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByScore ( key , SortedSetCommands . ZRangeRequest . ByLex ( min , max , exclude ) ) . Wait ( SyncTimeout ) ;
505521
506522 public Task < long > SortedSetRemoveRangeByValueAsync (
507523 RedisKey key ,
508524 RedisValue min ,
509525 RedisValue max ,
510526 Exclude exclude = Exclude . None ,
511527 CommandFlags flags = CommandFlags . None )
512- => throw new NotImplementedException ( ) ;
528+ => Context ( flags ) . SortedSets ( ) . ZRemRangeByScore ( key , SortedSetCommands . ZRangeRequest . ByLex ( min , max , exclude ) ) . AsTask ( ) ;
513529
514530 public IEnumerable < SortedSetEntry >
515531 SortedSetScan ( RedisKey key , RedisValue pattern , int pageSize , CommandFlags flags )
@@ -554,27 +570,27 @@ public bool SortedSetUpdate(
554570 double score ,
555571 SortedSetWhen when = SortedSetWhen . Always ,
556572 CommandFlags flags = CommandFlags . None )
557- => throw new NotImplementedException ( ) ;
573+ => Context ( flags ) . SortedSets ( ) . ZAdd ( key , when , member , score ) . Wait ( SyncTimeout ) ;
558574
559575 public long SortedSetUpdate (
560576 RedisKey key ,
561577 SortedSetEntry [ ] values ,
562578 SortedSetWhen when = SortedSetWhen . Always ,
563579 CommandFlags flags = CommandFlags . None )
564- => throw new NotImplementedException ( ) ;
580+ => Context ( flags ) . SortedSets ( ) . ZAdd ( key , when , values ) . Wait ( SyncTimeout ) ;
565581
566582 public Task < bool > SortedSetUpdateAsync (
567583 RedisKey key ,
568584 RedisValue member ,
569585 double score ,
570586 SortedSetWhen when = SortedSetWhen . Always ,
571587 CommandFlags flags = CommandFlags . None )
572- => throw new NotImplementedException ( ) ;
588+ => Context ( flags ) . SortedSets ( ) . ZAdd ( key , when , member , score ) . AsTask ( ) ;
573589
574590 public Task < long > SortedSetUpdateAsync (
575591 RedisKey key ,
576592 SortedSetEntry [ ] values ,
577593 SortedSetWhen when = SortedSetWhen . Always ,
578594 CommandFlags flags = CommandFlags . None )
579- => throw new NotImplementedException ( ) ;
595+ => Context ( flags ) . SortedSets ( ) . ZAdd ( key , when , values ) . AsTask ( ) ;
580596}
0 commit comments