nrk / redis-lua

A Lua client library for the redis key value storage system.
MIT License
731 stars 239 forks source link

`nil` argument wrongly gets converted to empty string #52

Open Habbie opened 7 years ago

Habbie commented 7 years ago

From the protocol docs:

The client library API should not return an empty string, but a nil object, when the server replies with a Null Bulk String. For example a Ruby library should return 'nil' while a C library should return NULL (or set a special flag in the reply object), and so forth.

There is no language on nils in commands, and sending an actual nil makes Redis complain. This leads me to believe there is simply no valid situation in which you pass nil to a command. Because of that, I think the 'map to empty' fix for #29 is wrong.