Patch to support RedisTimeSeries commands.
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.
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, $redis->${\"ts.create"} is one of workaround for redis modules.
but it looks bad knowhow. I want official support of Redis.pm.
in addition, there are "underlined" commands such asgeoradius_ro https://github.com/PerlRedis/perl-redis/issues/128
Maybe it’s time to introduce an other API, like $redis->command(‘KEYS’,’*’) ? It would become the main way to use the module, but we’d keep existing methods as shortcuts
Sounds like a viable option I think.
It sounds good, but there is already the "command" command https://redis.io/commands/command we should choice new method's name very carefully.
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.