A Gimbal plugin to allow storage of data in a SQLite database.
First, you need to install the plugin to your project:
# with npm
npm install --save-dev @modus/gimbal-plugin-sqlite
# or with yarn
yarn add --dev @modus/gimbal-plugin-sqlite
Next, you need to add the plugin to your Gimbal configuration file:
plugins:
- '@modus/gimbal-plugin-sqlite'
{
"plugins": ["@modus/gimbal-plugin-sqlite"]
}
modules.exports = {
plugins: ['@modus/gimbal-plugin-sqlite'],
};
By default, this plugin will save the database to ./gimbal.db
. In order to change this, pass it as a plugin config:
plugins:
- plugin: '@modus/gimbal-plugin-sqlite'
file: artifacts/gimbal_tests.db
Allows for getting and saving last value reports. To enable this support, you need to set lastValue
on the plugin config:
plugins:
- plugin: '@modus/gimbal-plugin-sqlite'
lastValue: true
By default, this will use gimbal_archive
as the table. To change these values, pass an object to the lastValue
config:
plugins:
- plugin: '@modus/gimbal-plugin-sqlite'
lastValue:
table: test_runs
If the table does not exist, the follow SQL will be executed:
CREATE TABLE IF NOT EXISTS <table_name> (command TEXT, date INTEGER, report BLOB);