dice icon indicating copy to clipboard operation
dice copied to clipboard

#495: Implementation `JSON.FORGET` command

Open Nijin-P-S opened this issue 1 year ago • 6 comments

Implementation for Issue : 495

  • Add JSON.FORGET command implementation , refer : JSON.FORGET
  • Add Unit Test for JSON.FORGET
  • Add Integration Test for JSON.FORGET

Attaching below the screenshots of behavior of: 1. JSON.FORGET command in Redis:

Screenshot 2024-09-10 at 9 59 44 PM

2. JSON.FORGET command in dice Screenshot 2024-09-10 at 9 59 50 PM

Nijin-P-S avatar Sep 10 '24 16:09 Nijin-P-S

Thanks for contributing @Nijin-P-S . I see JSON.FORGET is just alias of JSON.DEL command in docs. So instead of writing same code again can we just call JSON.DEL command inside it.wdyt? Correct if me i am missing something.

kushal0511-not avatar Sep 10 '24 16:09 kushal0511-not

Yes @kushal0511-not , That should work.Calling the DEL function inside the JSON.FORGET would be better. Let me make the changes necessary and remove the excessive code.

Nijin-P-S avatar Sep 10 '24 17:09 Nijin-P-S

@kushal0511-not , Have updated the implementation to call the evalJSONDEL() thus reducing the code repeatation. Cross verified the unit tests, Integration tests and functionality, and is working as expected.

Attaching the screenshots:

  1. Unit Tests Screenshot 2024-09-10 at 10 41 22 PM

  2. Integration Test Screenshot 2024-09-10 at 10 41 48 PM

  3. Functionality Screenshot 2024-09-10 at 10 44 51 PM

Let me know if anything needs to be modified or added.

Thanks.

Nijin-P-S avatar Sep 10 '24 17:09 Nijin-P-S

@Nijin-P-S , LGTM Just one minor comment. Thanks for changes.

kushal0511-not avatar Sep 10 '24 17:09 kushal0511-not

@kushal0511-not , Made the changes.

Thanks.

Nijin-P-S avatar Sep 10 '24 17:09 Nijin-P-S

Hi @lucifercr07 , Made the necessary changes as mentioned, please have a look.

Thanks

Nijin-P-S avatar Sep 11 '24 13:09 Nijin-P-S