You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in v3, calling send_command with hGetall command would result in a return of format
{
"key1": "value1",
"key2": "value2",
}
in v4, sendCommand with "hGetAll" returns ["key1", "value1", "key2", "value2"]. This seems like a breaking change between the versions that wasn't listed
Seems like running client.HGETALL however returns in object format. Is there a method to coerce the sendCommand return to be formatted correctly?
Environment:
Node.js Version: 16.13.2
Redis Server Version: Redis 6.2.6
Node Redis Version: 4.0.4
Platform: MacOS 12.1
The text was updated successfully, but these errors were encountered:
"Behind the scenes" if you will run hgetall it will return this ["key1", "value1", "key2", "value2"] - so basically running this directly will give you this result.
I would just recommend using the wrapped function that is part of this lib.
Ran into this issue as well. I switched to using the wrapped function but the results still return as an array. This seems to only happen when legacyMode = true. If I do not use legacyMode then results return as expected.
…red to v3 results (#2367)
* Ensure that transformReply is optionally passed through to commands in legacy mode within multi
* Execute transformReply on legacy #sendCommand
* Scope transform changes to hGetAll
* Extensible method of transforming legacy replies, expands RedisCommand interface
* check `TRANSFORM_LEGACY_REPLY` on client creation (rather then on command exec), add tests
Co-authored-by: Leibale Eidelman <[email protected]>
in v3, calling send_command with hGetall command would result in a return of format
in v4, sendCommand with "hGetAll" returns
["key1", "value1", "key2", "value2"]
. This seems like a breaking change between the versions that wasn't listedSeems like running
client.HGETALL
however returns in object format. Is there a method to coerce the sendCommand return to be formatted correctly?Environment:
The text was updated successfully, but these errors were encountered: