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

chore: add jsonpath evaluate #2586

Merged
merged 3 commits into from
Feb 14, 2024
Merged

chore: add jsonpath evaluate #2586

merged 3 commits into from
Feb 14, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Feb 13, 2024

No description provided.

src/core/json/path.cc Outdated Show resolved Hide resolved
src/core/json/path.cc Outdated Show resolved Hide resolved
BorysTheDev
BorysTheDev previously approved these changes Feb 14, 2024
Copy link
Contributor

@BorysTheDev BorysTheDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see bugs, but it's hard to read this code. If possible apply comments

Comment on lines 95 to 98
if (it == obj_->array_range().end()) {
return nullptr;
}
return &*it;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: return it == obj_->array_range().end() ? nullptr : &*it;

BorysTheDev
BorysTheDev previously approved these changes Feb 14, 2024
dranikpg
dranikpg previously approved these changes Feb 14, 2024
src/core/json/path.cc Outdated Show resolved Hide resolved
Comment on lines 54 to 60

using AdvanceResult = nonstd::expected<const JsonType*, MatchStatus>;

class Item {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments what those classes contain wouldn't hurt 🙂 Because otherwise you have to figure it out based on their usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

src/core/json/path.cc Outdated Show resolved Hide resolved
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
dranikpg
dranikpg previously approved these changes Feb 14, 2024
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange merged commit ded3341 into main Feb 14, 2024
10 checks passed
@romange romange deleted the Pr1 branch February 14, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants