Skip to content
New issue

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

Add support for unlink #241

Merged
merged 2 commits into from
Sep 7, 2022
Merged

Add support for unlink #241

merged 2 commits into from
Sep 7, 2022

Conversation

gkorland
Copy link
Contributor

No description provided.

///
/// Will panic if `RedisModule_UnlinkKey` is missing in redismodule.h
pub fn unlink(&self) -> RedisResult {
unsafe { raw::RedisModule_UnlinkKey.unwrap()(self.key_inner) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RedisModule_UnlinkKey

On success REDISMODULE_OK is returned. If the key is not open for writing REDISMODULE_ERR is returned.

Consider returning the actual result

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thought about it, but for consistency I just copied the same API of delete

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we would like to fix both, when can we do such a breaking change in this module?
Since it may affect other consumers and not only RedisJSON, a config/feature-flag may help.

Copy link
Contributor

@oshadmi oshadmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@gkorland gkorland merged commit ba6dc70 into master Sep 7, 2022
@gkorland gkorland deleted the gkorland-unlink branch September 7, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants