Closed arianf closed 1 year ago
This is by design. Redis hash values can only be strings, you either have not to set that key, or to cast that nil to an empty string.
@byroot it seems interesting that we auto convert integers to strings
but don't do something like
when nil then ''
Yes, because integers have an unambiguous string representation, so it's easy to know that's what the caller expects.
Casting nil
to ""
however is super opiniated, other languages would cast it to "null"
or something.
Also nil
is much more likely to be a mistake.
Ahh I see thanks for the explanation
It raises an error:
Previously: