diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2010-03-15 11:48:51 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2010-03-15 11:48:51 -0700 |
commit | d240e77d58c2cf686bef925cab93b5970129aeb7 (patch) | |
tree | 2be15ad8abebcbd6e45214d5905d56190c684d99 /redis/client.py | |
parent | 9ada0de4a3fc25cbba246d63eea674fcce814a54 (diff) | |
download | redis-py-d240e77d58c2cf686bef925cab93b5970129aeb7.tar.gz |
HDEL implemented
Diffstat (limited to 'redis/client.py')
-rw-r--r-- | redis/client.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py index 969f601..c5b3d52 100644 --- a/redis/client.py +++ b/redis/client.py @@ -175,8 +175,8 @@ class Redis(threading.local): """ RESPONSE_CALLBACKS = dict_merge( string_keys_to_dict( - 'AUTH DEL EXISTS EXPIRE MOVE MSETNX RENAMENX SADD SISMEMBER SMOVE ' - 'SETNX SREM ZADD ZREM', + 'AUTH DEL EXISTS EXPIRE HDEL MOVE MSETNX RENAMENX ' + 'SADD SISMEMBER SMOVE SETNX SREM ZADD ZREM', bool ), string_keys_to_dict( @@ -912,6 +912,10 @@ class Redis(threading.local): #### HASH COMMANDS #### + def hdel(self, name, key): + "Delete ``key`` from hash ``name``" + return self.format_bulk('HDEL', name, key) + def hget(self, name, key): "Return the value of ``key`` within the hash ``name``" return self.format_bulk('HGET', name, key) |