-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support JSON.MERGE Command #132
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #132 +/- ##
==========================================
+ Coverage 93.23% 93.25% +0.02%
==========================================
Files 78 78
Lines 4611 4625 +14
Branches 427 426 -1
==========================================
+ Hits 4299 4313 +14
Misses 189 189
Partials 123 123
☔ View full report in Codecov by Sentry. |
/// <param name="json">The value to set.</param> | ||
/// <returns>The disposition of the command</returns> | ||
/// <remarks><seealso href="https://redis.io/commands/json.merge"/></remarks> | ||
bool Merge(RedisKey key, RedisValue path, RedisValue json); |
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.
So clean!
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.
Looks like there's a breaking change in here (public class renamed) - so if that's right then make sure that this is marked as a break, if not revert. Also I think the docs on the merge command are just bad as they are a straight copy/pasta of JSON.SET
, when that's not quite accurate, probably need them to update what's in their commands.json but the merge command will merge the JSON value with the JSON value in the key to create a composite containing all the keys both object's. Really need more clarity behind how it works, but the way it's currently marked here isn't quite right (even if the argument list is fine and the code should work)
@@ -2,22 +2,17 @@ | |||
|
|||
namespace NRedisStack.Json.DataTypes; | |||
|
|||
public struct KeyValuePath | |||
public struct KeyPathValue |
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.
this is a breaking change, so if this is right, make sure to apply the label and put it in the notes
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.
this struct merged yesterday
bool MSet(KeyPathValue[] KeyPathValueList); | ||
|
||
/// <summary> | ||
/// Sets or updates the JSON value at a path. |
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 accurate?
Closes #129