stefanwille / crystal-redis

Full featured Redis client for Crystal
MIT License
381 stars 61 forks source link

Slice values support #110

Open Hamdy opened 3 years ago

Hamdy commented 3 years ago

Bases on comment :: https://github.com/stefanwille/crystal-redis/issues/47#issuecomment-349623431

aurimasniekis commented 3 years ago

Hi, any progress on this?

philipp-classen commented 3 years ago

Support for binary data would be useful. When I tried with the PR, writing binary data worked. Yet reading will still result in everything being wrapped as String. At least, in the pub/sub API that I tried, I had to change the API from String to String | Bytes: https://github.com/Hamdy/crystal-redis/blob/22c24afe811f7fa119cf59e223c8e8dea832dd5f/src/redis/strategy/subscription_loop.cr#L54

Changing the API from String to String | Bytes is a breaking change. I wonder if there is a good solution.

niko commented 2 years ago

Any progress here? I just stumbled over this … being able to store binary data would really come in handy right now.

robacarp commented 2 years ago

This is a fine approach, but in order to be merged it would need to have some tests written around it so that it doesn't silently start to fail in the future.