Sha256: 666e1ccb4fa8b54696878c92bc7802ff4f85b8b36e8373519990b6f46b37e9f0

Contents?: true

Size: 354 Bytes

Versions: 4

Compression:

Stored size: 354 Bytes

Contents

--
-- Taken from http://tokyocabinet.sourceforge.net/tyrantdoc/#luaext
--

function incr (key, value)
  value = tonumber(value)
  if not value then
    return nil
  end
  local old = tonumber(_get(key))
  if old then
    value = value + old
  end
  if not _put(key, value) then
    return nil
  end
  return value
end

function hi()
   return "Hi!"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rufus-tokyo-1.0.7 spec/incr.lua
rufus-tokyo-1.0.6 spec/incr.lua
rufus-tokyo-1.0.5 spec/incr.lua
rufus-tokyo-1.0.4 spec/incr.lua