We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In redis, when deleting a key that exists, a 1 is always returned.
127.0.0.1:6379> set foo bar OK 127.0.0.1:6379> del foo (integer) 1 127.0.0.1:6379>
When delete a key that does not exist, a 0 is always returned.
127.0.0.1:6379> keys * (empty array) 127.0.0.1:6379> del foo (integer) 0 127.0.0.1:6379>
Due to this line redismodule-rs always returns okay, on the delete of a key.
This also appears true for unlink unlink.
We should probably return either an OK/Error combination, or ints like Redis, but not always OK.
The text was updated successfully, but these errors were encountered:
It seems a "breaking" change (not backward compatible) (there's no such label yet)
Sorry, something went wrong.
Any preference on which? As a reference, redis-py and jedis copy the behaviour of the redis-cli and returns an int - so I'd vote for an int here.
@chayim I suggest returning Status (for example, see hash_del) (actually returningREDISMODULE_OK for int 0 and REDISMODULE_ERR for int 1)
Status
REDISMODULE_OK
0
REDISMODULE_ERR
1
No branches or pull requests
In redis, when deleting a key that exists, a 1 is always returned.
When delete a key that does not exist, a 0 is always returned.
Due to this line redismodule-rs always returns okay, on the delete of a key.
This also appears true for unlink unlink.
We should probably return either an OK/Error combination, or ints like Redis, but not always OK.
The text was updated successfully, but these errors were encountered: