Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiping Yao committed Nov 23, 2023
1 parent b0e5b00 commit 0d78aa4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/types/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@
constexpr ssize_t NOT_FOUND_INDEX = -1;
constexpr ssize_t NOT_ARRAY = -2;

enum class NumOpEnum : uint8_t {
Incr = 1,
Mul = 2,
};

struct JsonValue {

enum class NumOpEnum : uint8_t {
Incr = 1,
Mul = 2,
};

JsonValue() = default;
explicit JsonValue(jsoncons::basic_json<char> value) : value(std::move(value)) {}

Expand Down
2 changes: 1 addition & 1 deletion src/types/redis_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Json : public Database {
rocksdb::Status write(Slice ns_key, JsonMetadata *metadata, const JsonValue &json_val);
rocksdb::Status read(const Slice &ns_key, JsonMetadata *metadata, JsonValue *value);
rocksdb::Status create(const std::string &ns_key, JsonMetadata &metadata, const std::string &value);
rocksdb::Status numop(NumOpEnum op, const std::string &user_key, const std::string &path, const std::string &value,
rocksdb::Status numop(JsonValue::NumOpEnum op, const std::string &user_key, const std::string &path, const std::string &value,
JsonValue *result);
};

Expand Down

0 comments on commit 0d78aa4

Please sign in to comment.