-
Notifications
You must be signed in to change notification settings - Fork 991
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
feat: allow querying of json objects stored as strings #4399
Conversation
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.
Maybe add a unit test?
Signed-off-by: Roman Gershman <[email protected]>
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.
What are we trying to achieve here? As I understand from the issue submitted by the user, they will store JSON just as blob strings. In this case, the basic GET
command will be used to get the JSON blob.
Also, we are converting the blob string into JsonType
here. Can you confirm that the reordering of elements does not occur after this conversion?
Redis does not support this behavior:
127.0.0.1:6379> SET mykey '{"name": "John", "age": 30}'
OK
127.0.0.1:6379> JSON.GET mykey
(error) Existing key has wrong Redis type
And still other JSON commands are not supported.
Yes, it's an extra behavior that allows some runtime flexibility - a user can query strings that hold json objects. The main thing - it extends Redis behavior, so I do not see a problem here. |
Are we going to support all other |
I think we may support additional read only commands but for now I would not rush to do so. Lets wait to see if community finds it useful. |
No description provided.