Skip to content

Commit

Permalink
Added more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Burke Libbey committed Mar 2, 2012
1 parent d976a97 commit 580268d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/mexists.lua
@@ -1,6 +1,6 @@
local exists = {}
local existence
for _, key in ipairs(KEYS) do
table.insert(exists, redis.call('exists', key))
table.insert(exists, redis.call('exists', key))
end
return exists
return exists
8 changes: 8 additions & 0 deletions examples/mhmset.lua
@@ -0,0 +1,8 @@
local hash, key, value
for i = 1, #KEYS, 3 do
hash = KEYS[i]
key = KEYS[i + 1]
value = KEYS[i + 2]
redis.call('hset', hash, key, value)
end
return "OK"
8 changes: 8 additions & 0 deletions examples/mhmsetnx.lua
@@ -0,0 +1,8 @@
local hash, key, value
for i = 1, #KEYS, 3 do
hash = KEYS[i]
key = KEYS[i + 1]
value = KEYS[i + 2]
redis.call('hsetnx', hash, key, value)
end
return "OK"

0 comments on commit 580268d

Please sign in to comment.