If the key is open for writing, set the specified string 'str' as the * value of the key, deleting the old value if any. * On success REDISMODULE_OK is returned. If the key is not open for * writing or there is an active iterator, REDISMODULE_ERR is returned. */
| 2450 | * On success REDISMODULE_OK is returned. If the key is not open for |
| 2451 | * writing or there is an active iterator, REDISMODULE_ERR is returned. */ |
| 2452 | int RM_StringSet(RedisModuleKey *key, RedisModuleString *str) { |
| 2453 | if (!(key->mode & REDISMODULE_WRITE) || key->iter) return REDISMODULE_ERR; |
| 2454 | RM_DeleteKey(key); |
| 2455 | genericSetKey(key->ctx->client,key->db,key->key,str,0,0); |
| 2456 | key->value = str; |
| 2457 | return REDISMODULE_OK; |
| 2458 | } |
| 2459 | |
| 2460 | /* Prepare the key associated string value for DMA access, and returns |
| 2461 | * a pointer and size (by reference), that the user can use to read or |
nothing calls this directly
no test coverage detected