diff --git a/glide-core/src/protobuf/redis_request.proto b/glide-core/src/protobuf/redis_request.proto index eeb6df5945..66c115140a 100644 --- a/glide-core/src/protobuf/redis_request.proto +++ b/glide-core/src/protobuf/redis_request.proto @@ -129,12 +129,10 @@ enum RequestType { PTTL = 85; ZRemRangeByRank = 86; Persist = 87; - JsonSet = 88; - JsonGet = 89; - ZRemRangeByScore = 90; - Time = 91; - Zrank = 92; - Rename = 93; + ZRemRangeByScore = 88; + Time = 89; + Zrank = 90; + Rename = 91; } message Command { diff --git a/glide-core/src/socket_listener.rs b/glide-core/src/socket_listener.rs index bac3c88a99..efc18a3392 100644 --- a/glide-core/src/socket_listener.rs +++ b/glide-core/src/socket_listener.rs @@ -359,8 +359,6 @@ fn get_command(request: &Command) -> Option { RequestType::PTTL => Some(cmd("PTTL")), RequestType::ZRemRangeByRank => Some(cmd("ZREMRANGEBYRANK")), RequestType::Persist => Some(cmd("PERSIST")), - RequestType::JsonSet => Some(cmd("JSON.SET")), - RequestType::JsonGet => Some(cmd("JSON.GET")), RequestType::ZRemRangeByScore => Some(cmd("ZREMRANGEBYSCORE")), RequestType::Time => Some(cmd("TIME")), RequestType::Zrank => Some(cmd("ZRANK")), diff --git a/python/python/glide/async_commands/redis_modules/json.py b/python/python/glide/async_commands/redis_modules/json.py index 3237f031d0..fdc8d8178f 100644 --- a/python/python/glide/async_commands/redis_modules/json.py +++ b/python/python/glide/async_commands/redis_modules/json.py @@ -87,11 +87,11 @@ async def set( >>> await redisJson.set(client, "doc", "$", json_str) 'OK' # Indicates successful setting of the value at path '$' in the key stored at `doc`. """ - args = [key, path, value] + args = ["JSON.SET", key, path, value] if set_condition: args.append(set_condition.value) - return cast(Optional[TOK], await client._execute_command(RequestType.JsonSet, args)) + return cast(Optional[TOK], await client.custom_command(args)) async def get( @@ -128,7 +128,7 @@ async def get( >>> await redisJson.get(client, "doc", "$.non_existing_path") "[]" # Returns an empty array since the path '$.non_existing_path' does not exist in the JSON document stored at `doc`. """ - args = [key] + args = ["JSON.GET", key] if options: args.extend(options.get_options()) if paths: @@ -136,4 +136,4 @@ async def get( paths = [paths] args.extend(paths) - return cast(str, await client._execute_command(RequestType.JsonGet, args)) + return cast(str, await client.custom_command(args))