-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
#503: Added support for JSON.TOGGLE #546
Conversation
Hi @JyotinderSingh, @lucifercr07 |
thanks for your contribution. this pr linked #503. In case of other person is doing the same work, should notice issue with the assigned. because json.toggle change the original json, should add integration test in tests/json_test.go |
Made all the changes that you requested and committed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, the changes are good overall, left one minor comment.
Hi @TheRanomial , @srivastava-yash, I have found a solution for our problem with expr.Set(). Please refer to PR #585 for your reference and please let me know if you find any issues in the code as well. |
@TheRanomial please go through the linked PR and also the comments I've left. You can modify this implementation accordingly. Please add additional test cases too (to verify behavior where multiple keys are being toggled as being discussed in other comments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, I have left some comments.
Hii @JyotinderSingh Implemented all the changes that you requested and tests are working fine. |
internal/eval/eval.go
Outdated
|
||
if modified { | ||
obj.Value = jsonData | ||
store.Put(key, obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you resolved this without addressing it. I have fixed it with my commits though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for this. I thought that part was necessary so i didn't remove it
Fixes: #503
Added support and tests for JSON.TOGGLE command