Store Library
The store library provides a simple method to store key/value pairs in a persistent storage mechanism (SQLite database). This library can be imported into Translator projects, the source code can be found here: https://bitbucket.org/interfaceware/store2_library/src/main/store.lua
The store library is simple to use. The store.connect("<database_name>")
function is first called with the name of the SQLite database to be used for the store. The database file with a “store“ table is automatically created and added to the Translator project.
local MyStore = store.connect(“myDatabase.db”)
Use the following functions:
MyStore:put()
to store informationMyStore:get()
to get informationMyStore:info()
to return all stored dataMyStore:reset()
to empty the store (deletes all stored data)MyStore:delete()
to delete the store database file
Try it out in the Translator: