Hi! I finally got up and running on my Mac and spent a few evenings learning RSM and creating this. The developer experience with HDK3/RSM is starting to feel really good - super fast compile times etc!
Key-Value Storage Zome
A Zome for persisting key/value pairs - a simple general “database” for Holochain apps. The API is very close to the Web storage specifications for localStorage
and sessionStorage
There is no sample UI yet but I hope to be able to add that in the near future. Have a look at the tests also, they run through all functionality.
Functions | |
---|---|
create_store | Creates a named key/value store. |
get_store | Returns store information, or error if no store with the given name. |
set_item | Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously. |
get_item | Returns the current value associated with the given key, or error if the given key does not exist. |
remove_item | Removes the key/value pair with the given key, if a key/value pair with the given key exists. |
length | Returns the number of keys in the store |
keys | Returns a list with all the keys in the store |
key | Returns the name of the nth key, or Error if n is greater than or equal to the number of key value pairs. |
clear | Removes all key/value pairs, if there are any. |