tincan is a dead simple persistent key value store library. It's a simple module that persists a local table of numbers, strings, booleans and tables to disk. It provides the following helper functions for quick manipulation: tincan.put, tincan.get, tincan.delete, tincan.load and tincan.save. A more complete example is included in the tincan.lua file and has been copied below.
This is my first module and only the second thing I've done with lua since putting up Try Lua [0] over a year ago. Not sure if anyone will find this useful but figured it can't hurt to submit a rockspec. You can find the rockspec here [1]. [0] http://trylua.org [1] http://calminferno.net/lua/tincan/0.1-1/tincan-0.1-1.rockspec Example: local tincan = require("tincan") tincan.load() local uid = tincan.put("uid", 1) tincan.put("uid:" .. uid, {name = "Jane Doe", email = "[email protected]"}) uid = tincan.put("uid", uid + 1) tincan.put("uid:" .. uid, {name = "John Doe", email = "[email protected]"}) uid = tincan.put("uid", uid + 1) tincan.save() -- <more code here> local user = tincan.get("uid:1") print(user.name, user.email) -- James Turner [email protected] ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
