Skip to content
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

Address issues with argument parsing for del command and multi commands #178

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cfredhart
Copy link

@cfredhart cfredhart commented Feb 7, 2021

  • Fix RedisClient.del so that it properly handles multiple keys for multi del.
  • Add a check in multi.js's _command function to flatten the argument list if it comes as a single element array whose only element is an array. node-redis appears to handle this scenario.
  • Add unit test provided in issue multi(cmds).exec hangs with no output #135.

@cfredhart cfredhart changed the title Fix RedisClient.del so that it properly handles multiple keys for multi del. Address issues with argument parsing for del command and multi commands Feb 9, 2021
mikkopiu added a commit to espoon-voltti/evaka that referenced this pull request May 10, 2021
…-mock

- Unfortunately redis-mock currently has an open issue (yeahoffline/redis-mock#135) and an un-merged fix for it (yeahoffline/redis-mock#178) that means it doesn't support multiple arguments (i.e. spread) for the `.del()` method -> to allow using the mock library in tests add support to AsyncRedisClient for using an array of keys instead of argument-per-key and always provide the keys to the underlying redis client as an array instead of using the spread operator
mikkopiu added a commit to espoon-voltti/evaka that referenced this pull request May 11, 2021
…-mock

- Unfortunately redis-mock currently has an open issue (yeahoffline/redis-mock#135) and an un-merged fix for it (yeahoffline/redis-mock#178) that means it doesn't support multiple arguments (i.e. spread) for the `.del()` method -> to allow using the mock library in tests add support to AsyncRedisClient for using an array of keys instead of argument-per-key and always provide the keys to the underlying redis client as an array instead of using the spread operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant