Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ Here are some more examples:
local res, err = red:hmset("myhash", "field1", "Hello", "field2", "World")
```

```lua
-- RedisBloom commands contain a dot (use '__' instead)
local res, err = red:cf__exists("key", "item")
```

All these command methods returns a single result in success and `nil` otherwise. In case of errors or failures, it will also return a second value which is a string describing the error.

A Redis "status reply" results in a string typed return value with the "+" prefix stripped.
Expand Down
2 changes: 1 addition & 1 deletion lib/resty/redis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ end
setmetatable(_M, {__index = function(self, cmd)
local method =
function (self, ...)
return _do_cmd(self, cmd, ...)
return _do_cmd(self, cmd:gsub("__", "."), ...)
end

-- cache the lazily generated method in our
Expand Down