Closed BeyondWUXF closed 1 year ago
After some thoughts, I think it might not be a good idea to return bool
for hset
. First of all, it's a little confusing to return false for this method (false, does not mean failing to send command, but means this is not a newly add item). Secondly, since hset
might take a list of (field, value) pairs, and in that case, it returns a long long
. This makes the return type inconsistent.
I'm wondering does this change, i.e. from bool
to long long
, makes your code incompatible? If you have any idea on it, feel free to share :)
Regards
Future<bool> hset(const StringView &key, const StringView &field, const StringView &val) { return _command<bool>(fmt::hset, key, field, val); }
This function returns true. So to be consistent, I change long to true. My code can be modified to fit, it doesn't matter
I've made this breaking change. Please check the latest code on master branch.
Regards
I'll try tomorrow.
Thanks for your contribution!
Regards