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

Support json.toggle and json.clear commands #51

Open
oshadmi opened this issue Jul 29, 2021 · 4 comments
Open

Support json.toggle and json.clear commands #51

oshadmi opened this issue Jul 29, 2021 · 4 comments
Labels
Difficulty: Introductory enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed up-for-grabs

Comments

@oshadmi
Copy link

oshadmi commented Jul 29, 2021

Add support for the following commands:
json.toggle
json.clear

@k-shrey
Copy link

k-shrey commented Aug 1, 2021

What do these commands do? Can you provide a link detailing them? Can't seem to find them here https://oss.redislabs.com/redisjson/commands/

@oshadmi
Copy link
Author

oshadmi commented Aug 1, 2021

Please see this comment

@Shivam010
Copy link
Collaborator

Thanks @oshadmi for the information.

I tried the commands and reviewed the provided test cases of (toggle, clear).

Correct me if I am wrong or I missed something, the specification of both of them is similar to that of json.del.

Syntax
JSON.CLEAR <key> [path]
JSON.TOGGLE <key> [path]

And json.clear returns 1 or 0 and error similar to that of json.del while json.toggle returns corresponding boolean value and error.

@Shivam010 Shivam010 added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed up-for-grabs labels Aug 1, 2021
@Shivam010
Copy link
Collaborator

@oshadmi Feel free to submit a PR, I would be happy to review the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Introductory enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed up-for-grabs
Projects
None yet
Development

No branches or pull requests

3 participants