[OpenSIPS-Users] redis HMGET nil value problem
vladpaiu at opensips.org
Thu May 28 15:28:11 CEST 2015
Currently, only STRING and INTEGER data types are supported - no NULL
support in the cachedb raw interface.
Please open a GITHUB issue for this and will fix it as soon as possible.
On 28.05.2015 16:21, Jayesh Nambiar wrote:
> I'm using cache_raw queries to get data from redis and I have a
> problem with accessing nil values that gets returned from it.
> For eg I do the following:
> cache_raw_query("redis:myRedis HMGET one two three", "$avp(result)");
> Here the value of one is abc, two is not present in redis and three is
> xyz. Now if I access the values, I ideally expect it to be the following:
> $(avp(result)) = xyz, $(avp(result)) = <null> and
> $(avp(result)) = abc.
> But since key two is not present in redis for whatever reasons, the
> result I get back is:
> $(avp(result)) = xyz
> $(avp(result)) = abc
> $(avp(result)) = <null>
> This actually makes my value matching go for a toss. Is there a better
> solution to access the array that is returned back from redis or at
> least store the value as NULL in that array element of avp. Any help
> is greatly appreciated.
> - Jayesh
> Users mailing list
> Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users