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

feat: search json support + client tests #1210

Merged
merged 3 commits into from May 16, 2023

Conversation

dranikpg
Copy link
Contributor

Adds:

  • Support for json values in search
  • Basic python test for search

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg marked this pull request as ready for review May 14, 2023 07:26
@dranikpg dranikpg requested a review from chakaz May 14, 2023 07:26
Comment on lines +25 to +29
struct IndexData {
enum DataType { HASH, JSON };

// Get numeric OBJ_ code
uint8_t GetObjCode() const;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just didn't want to include redis headers here, so that's why I didn't set enum values

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that these types are not even enums in our redis headers anyway :)

chakaz
chakaz previously approved these changes May 15, 2023
@@ -121,7 +127,42 @@ struct StringMapAccessor : public BaseAccessor {
StringMap* hset_;
};

// Accessor for json values
struct JsonAccessor : public BaseAccessor {
JsonAccessor(JsonType* json) : json_{json} {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make this constructor explicit

Comment on lines +25 to +29
struct IndexData {
enum DataType { HASH, JSON };

// Get numeric OBJ_ code
uint8_t GetObjCode() const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that these types are not even enums in our redis headers anyway :)

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg
Copy link
Contributor Author

@chakaz please re-approve

@dranikpg dranikpg merged commit 7f54715 into dragonflydb:main May 16, 2023
6 checks passed
dranikpg added a commit to dranikpg/dragonfly that referenced this pull request May 18, 2023
* feat: search json support + client tests

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

* fix: small fixes

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

* fix: small fixes

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg deleted the search-json-tests branch May 28, 2023 09:17
romange pushed a commit that referenced this pull request Jun 1, 2023
* feat: search json support + client tests

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

* fix: small fixes

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

* fix: small fixes

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
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

2 participants