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
Conversation
1b43ca4
to
7f04d63
Compare
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
7f04d63
to
018dda4
Compare
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
struct IndexData { | ||
enum DataType { HASH, JSON }; | ||
|
||
// Get numeric OBJ_ code | ||
uint8_t GetObjCode() const; |
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 just didn't want to include redis headers here, so that's why I didn't set enum values
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 think that these types are not even enum
s in our redis headers anyway :)
src/server/search_family.cc
Outdated
@@ -121,7 +127,42 @@ struct StringMapAccessor : public BaseAccessor { | |||
StringMap* hset_; | |||
}; | |||
|
|||
// Accessor for json values | |||
struct JsonAccessor : public BaseAccessor { | |||
JsonAccessor(JsonType* json) : json_{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.
Please make this constructor explicit
struct IndexData { | ||
enum DataType { HASH, JSON }; | ||
|
||
// Get numeric OBJ_ code | ||
uint8_t GetObjCode() const; |
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 think that these types are not even enum
s in our redis headers anyway :)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@chakaz please re-approve |
* 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>
* 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>
Adds: