-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch to support RedisTimeSeries commands. #137
base: master
Are you sure you want to change the base?
Conversation
RedisTimeSeries https://oss.redislabs.com/redistimeseries/ . character was unsupported but now it works for command beginning with 'ts'. Assumption made that no other commands begin with 'ts'. usage: $redis->tscreate(....), tsadd(....) etc.
Hi, Thank you for your contribution. I'm not sure adding a dot after "ts" for all command that start with it is a good long term solution. There are other Redis modules, that all have a dot in the command name. It would be better to have Redis.pm to offer a better support of these "dotted" commands. I'll check out how other clients do |
FYI, in addition, there are "underlined" commands such as |
Maybe it’s time to introduce an other API, like $redis->command(‘KEYS’,’*’) ? |
Sounds like a viable option I think. |
It sounds good, but there is already the "command" command https://redis.io/commands/command |
what would be great at this point is to check how other Perl clients but also other language's clients do. If some of you have used other clients, please share your knowledge/experience |
A quick check of how clients for other languages do (from redis client list), yields that some provides a "wrapper" method like Do(..), Command(..) or Execute(..) for commands. Providing meaningful method names such as Set(..), Get(..), Incrby(..) etc. is very common. I believe that implementing a wrapper method like $redis->do(..) or similar as you suggest is the way forward. I don't see that there is any other way if we want to support commands having a dot in their names as (if memory serves) Perl does not support dot chars in sub names. |
RedisTimeSeries https://oss.redislabs.com/redistimeseries/
. character was unsupported but now it works for commands beginning with 'ts'.
Assumption made that no other commands begin with 'ts'.
usage: $redis->tscreate(....), tsadd(....) etc.
First pull request made so excuse me if I've missed something.
No tests written as I'm not sure how to do that.
Not sure the change is good enough but please review.