Closed Mordil closed 5 years ago
That's actually normal. Redis stores expects the members as strings, even if they were to represent numbers in the end.
So is it expected that users of the package don't try to store integers as such, and should send it as RedisData(bulk:)
or RedisData(stringLiteral:)
?
All Redis commands need to be sent as BulkStrings
Most cases of learning this will be solved with #131 being merged.
When executing the
SADD
command with aRedisData(integerLiteral:)
Redis throws the error:ERR Protocol error: expected '$', got ':'
The rejected stream input:
"*3\r\n$9\r\nSISMEMBER\r\n$30\r\nGSAPI_GEOFENCING_ON_SITE_COUNT\r\n:31\r\n"
If I use
RedisData(stringLiteral:)
instead, Redis accepts the stream.Accepted stream input::
"*3\r\n$9\r\nSISMEMBER\r\n$30\r\nGSAPI_GEOFENCING_ON_SITE_COUNT\r\n$2\r\n31\r\n"