Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
BrisingrAerowing

OpenKVS - A Key-Value Store for OpenComputers

Recommended Posts

OpenKVS is a basic Key-Value store for OpenComputers, based off of the Tincan library.

 

API:

kvs.set(key, value) -- Sets a key-value pair. Returns the set value
kvs.get(key) -- Gets the value for the specified key. Returns that value
kvs.delete(key) -- Deletes the specified key-value pair. Returns nil
kvs.exists(key) -- Returns true if the specified key exists.
kvs.decr(key, amount) -- Decrements the specified numeric key by the specified amount, or 1 if not specified.
kvs.incr(key, amount) -- Increments the specified numeric key by the specified amount, or 1 if not specified.
kvs.load(file) -- Loads the specified file into the store
kvs.save(file) -- Saves the store into the specified file

 

Download:

wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/openkvs/openkvs.lua /lib/openkvs.lua

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.