If the key is open for writing, remove it, and setup the key to * accept new writes as an empty key (that will be created on demand). * On success REDISMODULE_OK is returned. If the key is not open for * writing REDISMODULE_ERR is returned. */
| 2333 | * On success REDISMODULE_OK is returned. If the key is not open for |
| 2334 | * writing REDISMODULE_ERR is returned. */ |
| 2335 | int RM_DeleteKey(RedisModuleKey *key) { |
| 2336 | if (!(key->mode & REDISMODULE_WRITE)) return REDISMODULE_ERR; |
| 2337 | if (key->value) { |
| 2338 | dbDelete(key->db,key->key); |
| 2339 | key->value = NULL; |
| 2340 | } |
| 2341 | return REDISMODULE_OK; |
| 2342 | } |
| 2343 | |
| 2344 | /* If the key is open for writing, unlink it (that is delete it in a |
| 2345 | * non-blocking way, not reclaiming memory immediately) and setup the key to |
no test coverage detected