lg_kvstore exists key
lg_kvstore get key
lg_kvstore set key value
lg_kvstore create key value
The logbook database provides a generic key value store. This key value store contains information provided when the database is created but can also be used to associate arbitrary values with keywords. A sort of persistent array with textual indices. The lg_kvstore command provides a command line utility to manipulate that store.
The first, and mandatory parameter is a verb that tells the command what it is supposed to do:
Accepts one more parameter, a key. If the key exists in the store, the exit status of the command will be 1. If not it will be 0. This allows shell scripts to test for the existence of keys in the store.
Accepts one more parameter, a key. The value of the key is output to stdout.
Requires two parmeters, in order a key and value. If the key already exists, its value is modified to value. If the key does not exist, it is created with the specified value.
Requires two parameters, in order a key and value. The key must not exist in the key value store. If it does an error is returned. If it does not, it is created with the specified value.