/
Store Library

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 information

  • MyStore:get() to get information

  • MyStore:info() to return all stored data

  • MyStore:reset() to empty the store (deletes all stored data)

  • MyStore:delete() to delete the store database file

Try it out in the Translator:

Screen Shot 2024-02-26 at 12.21.18 PM.png

 

Related content

Custom Installation
Custom Installation
Read with this
Configuration Management
Configuration Management
More like this
FHIR Profiling Tool
FHIR Profiling Tool
Read with this
Using Custom Fields in Scripts
Using Custom Fields in Scripts
More like this
Epic FHIR Adapter
Epic FHIR Adapter
Read with this
Executing SQL Statements
Executing SQL Statements
More like this