etaty / rediscala

Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
Apache License 2.0
790 stars 142 forks source link

Add scan commands #95

Closed actsasbuffoon closed 8 years ago

actsasbuffoon commented 9 years ago

There's been an open issue in the issue tracker for a while about adding support for new commands from Redis 2.8: https://github.com/etaty/rediscala/issues/21

This adds support for SCAN, ZSCAN, SSCAN, and HSCAN. They're all fairly low level, as they return the cursor and leave the rest up to the caller. It would be convenient to have higher-level methods for iterating over the entire result, but I figured this was a decent starting point.

My apologies about the tests. The scan commands are all quite non-deterministic, which makes them challenging to test. I'm happy to take suggestions about how to improve these.

etaty commented 9 years ago

Maybe launch Scan Test with his own redis Server?

actsasbuffoon commented 9 years ago

@etaty: Maybe launch Scan Test with his own redis Server?

I'm not sure I understand. Do you mean I should put the scan commands in a separate test file and run them with a different Redis process?

etaty commented 9 years ago

Yes sorry, You can use RedisStandaloneServer https://github.com/etaty/rediscala/search?utf8=%E2%9C%93&q=RedisStandaloneServer or withRedisServer https://github.com/etaty/rediscala/search?utf8=%E2%9C%93&q=withRedisServer

acaloiaro commented 9 years ago

@actsasbuffoon This looks like good work. I am interested in seeing these commands in rediscala as well.

etaty commented 8 years ago

thanks It should be in 1.6.0-SNAPSHOT in the next hour

etaty commented 8 years ago

"com.github.etaty" %% "rediscala" % "1.6.0-SNAPSHOT"